@financial-times/cp-content-pipeline-schema 3.1.1 → 3.3.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 (35) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/generated/index.d.ts +12 -0
  3. package/lib/model/CapiResponse.d.ts +3 -1
  4. package/lib/model/CapiResponse.js +15 -4
  5. package/lib/model/CapiResponse.js.map +1 -1
  6. package/lib/model/CapiResponse.test.js +20 -0
  7. package/lib/model/CapiResponse.test.js.map +1 -1
  8. package/lib/model/schemas/capi/article.d.ts +9 -1
  9. package/lib/model/schemas/capi/article.js +2 -0
  10. package/lib/model/schemas/capi/article.js.map +1 -1
  11. package/lib/model/schemas/capi/audio.d.ts +4 -0
  12. package/lib/model/schemas/capi/base-schema.d.ts +10 -0
  13. package/lib/model/schemas/capi/base-schema.js +2 -0
  14. package/lib/model/schemas/capi/base-schema.js.map +1 -1
  15. package/lib/model/schemas/capi/content-package.d.ts +4 -0
  16. package/lib/model/schemas/capi/custom-code-component.d.ts +6 -0
  17. package/lib/model/schemas/capi/index.d.ts +26 -0
  18. package/lib/model/schemas/capi/list.d.ts +2 -2
  19. package/lib/model/schemas/capi/live-blog-package.d.ts +4 -0
  20. package/lib/model/schemas/capi/placeholder.d.ts +4 -0
  21. package/lib/model/schemas/capi/video.d.ts +4 -0
  22. package/lib/resolvers/content.d.ts +6 -0
  23. package/lib/resolvers/content.js +8 -0
  24. package/lib/resolvers/content.js.map +1 -1
  25. package/lib/resolvers/index.d.ts +6 -0
  26. package/package.json +1 -1
  27. package/queries/article.graphql +5 -0
  28. package/src/generated/index.ts +12 -0
  29. package/src/model/CapiResponse.test.ts +23 -0
  30. package/src/model/CapiResponse.ts +19 -4
  31. package/src/model/schemas/capi/article.ts +2 -0
  32. package/src/model/schemas/capi/base-schema.ts +2 -0
  33. package/src/resolvers/content.ts +8 -0
  34. package/tsconfig.tsbuildinfo +1 -1
  35. package/typedefs/content.graphql +12 -0
@@ -157,6 +157,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
157
157
  labelType: string;
158
158
  sequence: string;
159
159
  }>>;
160
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
161
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
160
162
  }, "id" | "type" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "standout" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed" | "topper" | "comments" | "containedIn">>, Pick<{
161
163
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
162
164
  id: import("zod").ZodString;
@@ -1413,6 +1415,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
1413
1415
  labelType: string;
1414
1416
  sequence: string;
1415
1417
  }>>;
1418
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1419
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
1416
1420
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
1417
1421
  title: import("zod").ZodString;
1418
1422
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -2230,6 +2234,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
2230
2234
  labelType: string;
2231
2235
  sequence: string;
2232
2236
  }>>;
2237
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
2238
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
2233
2239
  }, "id" | "type" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "standout" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed" | "topper" | "comments">>, Pick<{
2234
2240
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
2235
2241
  id: import("zod").ZodString;
@@ -3486,6 +3492,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
3486
3492
  labelType: string;
3487
3493
  sequence: string;
3488
3494
  }>>;
3495
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
3496
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
3489
3497
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
3490
3498
  title: import("zod").ZodString;
3491
3499
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -4267,6 +4275,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
4267
4275
  labelType: string;
4268
4276
  sequence: string;
4269
4277
  }>>;
4278
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
4279
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
4270
4280
  }, "id" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed">>, Pick<{
4271
4281
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
4272
4282
  id: import("zod").ZodString;
@@ -5523,6 +5533,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
5523
5533
  labelType: string;
5524
5534
  sequence: string;
5525
5535
  }>>;
5536
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
5537
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
5526
5538
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
5527
5539
  title: import("zod").ZodString;
5528
5540
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -5968,6 +5980,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
5968
5980
  labelType: string;
5969
5981
  sequence: string;
5970
5982
  }>>;
5983
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
5984
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
5971
5985
  }, "id" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed">>, Pick<{
5972
5986
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
5973
5987
  id: import("zod").ZodString;
@@ -7224,6 +7238,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
7224
7238
  labelType: string;
7225
7239
  sequence: string;
7226
7240
  }>>;
7241
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
7242
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
7227
7243
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
7228
7244
  title: import("zod").ZodString;
7229
7245
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -7614,6 +7630,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
7614
7630
  labelType: string;
7615
7631
  sequence: string;
7616
7632
  }>>;
7633
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
7634
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
7617
7635
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
7618
7636
  title: import("zod").ZodString;
7619
7637
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -7777,6 +7795,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
7777
7795
  labelType: string;
7778
7796
  sequence: string;
7779
7797
  }>>;
7798
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
7799
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
7780
7800
  }, "types" | "annotations">>, Pick<{
7781
7801
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
7782
7802
  id: import("zod").ZodString;
@@ -9033,6 +9053,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
9033
9053
  labelType: string;
9034
9054
  sequence: string;
9035
9055
  }>>;
9056
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
9057
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
9036
9058
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
9037
9059
  title: import("zod").ZodString;
9038
9060
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -9572,6 +9594,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
9572
9594
  labelType: string;
9573
9595
  sequence: string;
9574
9596
  }>>;
9597
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
9598
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
9575
9599
  }, "id" | "type" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "standout" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed" | "topper" | "comments" | "tableOfContents">>, Pick<{
9576
9600
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
9577
9601
  id: import("zod").ZodString;
@@ -10828,6 +10852,8 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
10828
10852
  labelType: string;
10829
10853
  sequence: string;
10830
10854
  }>>;
10855
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
10856
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
10831
10857
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
10832
10858
  title: import("zod").ZodString;
10833
10859
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -25,12 +25,12 @@ export declare const listSchema: z.ZodObject<{
25
25
  publishedDate: string;
26
26
  listType: "OpinionAnalysis" | "Promotional" | "Recommended" | "TopStories" | "TopStoriesBeta" | "KeyDevelopments";
27
27
  publishReference?: string | undefined;
28
+ publication?: string[] | undefined;
28
29
  items?: {
29
30
  id: string;
30
31
  apiUrl: string;
31
32
  }[] | undefined;
32
33
  layoutHint?: "landscape" | "standaloneimage" | "bigstory" | "assassination" | undefined;
33
- publication?: string[] | undefined;
34
34
  }, {
35
35
  id: string;
36
36
  apiUrl: string;
@@ -38,11 +38,11 @@ export declare const listSchema: z.ZodObject<{
38
38
  publishedDate: string;
39
39
  listType: "OpinionAnalysis" | "Promotional" | "Recommended" | "TopStories" | "TopStoriesBeta" | "KeyDevelopments";
40
40
  publishReference?: string | undefined;
41
+ publication?: string[] | undefined;
41
42
  items?: {
42
43
  id: string;
43
44
  apiUrl: string;
44
45
  }[] | undefined;
45
46
  layoutHint?: "landscape" | "standaloneimage" | "bigstory" | "assassination" | undefined;
46
- publication?: string[] | undefined;
47
47
  }>;
48
48
  export type List = z.input<typeof listSchema>;
@@ -155,6 +155,8 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
155
155
  labelType: string;
156
156
  sequence: string;
157
157
  }>>;
158
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
159
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
158
160
  }, "id" | "type" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "standout" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed" | "topper" | "comments">>, Pick<{
159
161
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
160
162
  id: import("zod").ZodString;
@@ -1411,6 +1413,8 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
1411
1413
  labelType: string;
1412
1414
  sequence: string;
1413
1415
  }>>;
1416
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1417
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
1414
1418
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
1415
1419
  title: import("zod").ZodString;
1416
1420
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -155,6 +155,8 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
155
155
  labelType: string;
156
156
  sequence: string;
157
157
  }>>;
158
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
159
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
158
160
  }, "id" | "type" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "standout" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed" | "topper" | "comments" | "containedIn">>, Pick<{
159
161
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
160
162
  id: import("zod").ZodString;
@@ -1411,6 +1413,8 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
1411
1413
  labelType: string;
1412
1414
  sequence: string;
1413
1415
  }>>;
1416
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1417
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
1414
1418
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
1415
1419
  title: import("zod").ZodString;
1416
1420
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -155,6 +155,8 @@ export declare const videoSchema: import("zod").ZodObject<import("zod").objectUt
155
155
  labelType: string;
156
156
  sequence: string;
157
157
  }>>;
158
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
159
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
158
160
  }, "id" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "lastModified" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed">>, Pick<{
159
161
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
160
162
  id: import("zod").ZodString;
@@ -1411,6 +1413,8 @@ export declare const videoSchema: import("zod").ZodObject<import("zod").objectUt
1411
1413
  labelType: string;
1412
1414
  sequence: string;
1413
1415
  }>>;
1416
+ publication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1417
+ clientName: import("zod").ZodOptional<import("zod").ZodString>;
1414
1418
  }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
1415
1419
  title: import("zod").ZodString;
1416
1420
  standfirst: import("zod").ZodOptional<import("zod").ZodString>;
@@ -33,6 +33,11 @@ declare const resolvers: {
33
33
  };
34
34
  Article: {
35
35
  containedIn: (parent: import("../model/CapiResponse").CapiResponse) => Promise<import("../model/CapiResponse").CapiResponse | null>;
36
+ publication: (parent: import("../model/CapiResponse").CapiResponse) => string[] | null;
37
+ clientName: (parent: import("../model/CapiResponse").CapiResponse) => string | null;
38
+ indicators: (parent: import("../model/CapiResponse").CapiResponse) => {
39
+ isPartnerContent: boolean | null;
40
+ };
36
41
  __resolveType?: import("../generated").TypeResolveFn<"Article" | "Placeholder" | "Video" | "Audio" | "LiveBlogPackage" | "LiveBlogPost" | "ContentPackage", import("../model/CapiResponse").CapiResponse, import("..").QueryContext> | undefined;
37
42
  accessLevel: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<"premium" | "subscribed" | "registered" | "free">>, import("../model/CapiResponse").CapiResponse, import("..").QueryContext, {}>;
38
43
  altStandfirst: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<import("../generated").AltStandfirst>>, import("../model/CapiResponse").CapiResponse, import("..").QueryContext, {}>;
@@ -276,6 +281,7 @@ declare const resolvers: {
276
281
  };
277
282
  Indicators: {
278
283
  isOpinion: (parent: import("../generated").Indicators) => boolean | null;
284
+ isPartnerContent: (parent: import("../generated").Indicators) => boolean | null;
279
285
  };
280
286
  Media: {
281
287
  url: (parent: import("../generated").Media) => string | null;
@@ -50,6 +50,13 @@ const resolvers = {
50
50
  Article: {
51
51
  ...contentResolvers,
52
52
  containedIn: (parent) => parent.containedIn(),
53
+ publication: (parent) => parent.publication() ?? null,
54
+ clientName: (parent) => parent.clientName() ?? null,
55
+ indicators: (parent) => {
56
+ return {
57
+ isPartnerContent: parent.isPartnerContent(),
58
+ };
59
+ },
53
60
  },
54
61
  Placeholder: {
55
62
  ...contentResolvers,
@@ -102,6 +109,7 @@ const resolvers = {
102
109
  // it from other Indicators types in the next major release.
103
110
  Indicators: {
104
111
  isOpinion: (parent) => parent.isOpinion ?? null,
112
+ isPartnerContent: (parent) => parent.isPartnerContent ?? null,
105
113
  },
106
114
  Media: {
107
115
  url: (parent) => parent.url ?? null,
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/resolvers/content.ts"],"names":[],"mappings":";;AAAA,4CAAwC;AAiBxC,2DAA0D;AAE1D,MAAM,gBAAgB,GAAqB;IACzC,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CA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UAAU,EAAE;QACV,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI;QAC/C,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,IAAI,IAAI;KAC9D;IAED,KAAK,EAAE;QACL,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI;QACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI;QAC7C,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI;QAC7C,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI;KAChD;IAED,eAAe,EAAE;QACf,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI;QAC/C,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI;KAC9C;CAgBF,CAAA;AAED,kBAAe,SAAS,CAAA"}
@@ -544,6 +544,11 @@ declare const resolvers: {
544
544
  };
545
545
  Article: {
546
546
  containedIn: (parent: import("../model/CapiResponse").CapiResponse) => Promise<import("../model/CapiResponse").CapiResponse | null>;
547
+ publication: (parent: import("../model/CapiResponse").CapiResponse) => string[] | null;
548
+ clientName: (parent: import("../model/CapiResponse").CapiResponse) => string | null;
549
+ indicators: (parent: import("../model/CapiResponse").CapiResponse) => {
550
+ isPartnerContent: boolean | null;
551
+ };
547
552
  __resolveType?: import("../generated").TypeResolveFn<"Article" | "Placeholder" | "Video" | "Audio" | "LiveBlogPackage" | "LiveBlogPost" | "ContentPackage", import("../model/CapiResponse").CapiResponse, import("..").QueryContext> | undefined;
548
553
  accessLevel: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<"premium" | "subscribed" | "registered" | "free">>, import("../model/CapiResponse").CapiResponse, import("..").QueryContext, {}>;
549
554
  altStandfirst: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<import("../generated").AltStandfirst>>, import("../model/CapiResponse").CapiResponse, import("..").QueryContext, {}>;
@@ -787,6 +792,7 @@ declare const resolvers: {
787
792
  };
788
793
  Indicators: {
789
794
  isOpinion: (parent: import("../generated").Indicators) => boolean | null;
795
+ isPartnerContent: (parent: import("../generated").Indicators) => boolean | null;
790
796
  };
791
797
  Media: {
792
798
  url: (parent: import("../generated").Media) => string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/cp-content-pipeline-schema",
3
- "version": "3.1.1",
3
+ "version": "3.3.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -644,6 +644,11 @@ fragment ArticleFields on Content {
644
644
  containedIn {
645
645
  ...PackageContainer
646
646
  }
647
+ publication
648
+ clientName
649
+ indicators {
650
+ isPartnerContent
651
+ }
647
652
  }
648
653
  ... on Placeholder {
649
654
  containedIn {
@@ -79,6 +79,8 @@ export type Article = Content & {
79
79
  readonly byline?: Maybe<StructuredContent>;
80
80
  /** A scalar representing whether the article can be syndicated, ie. published by a third party site. */
81
81
  readonly canBeSyndicated?: Maybe<Scalars['CanBeSyndicated']['output']>;
82
+ /** The sponsorship Client Name for commercial Partner Content articles */
83
+ readonly clientName?: Maybe<Scalars['String']['output']>;
82
84
  /** Whether comments are enabled on the article. */
83
85
  readonly commentsEnabled?: Maybe<Scalars['Boolean']['output']>;
84
86
  /** The parent article, indicating this article is a part of a series or package. */
@@ -91,6 +93,8 @@ export type Article = Content & {
91
93
  readonly firstPublishedDate: Scalars['String']['output'];
92
94
  /** The unique identifier of the article - a uuid or a url. */
93
95
  readonly id: Scalars['ID']['output'];
96
+ /** An object of several flags indicating the nature of the content */
97
+ readonly indicators?: Maybe<Indicators>;
94
98
  /** The concept to use for instant alert CTAs. */
95
99
  readonly instantAlertConcept?: Maybe<Concept>;
96
100
  /** An image object containing the url and the caption, to be displayed usually before the article content. */
@@ -99,6 +103,8 @@ export type Article = Content & {
99
103
  readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
100
104
  /** The party that originated the article, eg. 'FT'. */
101
105
  readonly originatingParty?: Maybe<Scalars['String']['output']>;
106
+ /** Array of publication IDs this article pertains to, e.g. 88fdde6c-2aa4-4f78-af02-9f680097cfd6 for FT Pink */
107
+ readonly publication?: Maybe<ReadonlyArray<Scalars['String']['output']>>;
102
108
  /** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
103
109
  readonly publishReference?: Maybe<Scalars['String']['output']>;
104
110
  /** The ISO string date the article was marked as published, eg. '2024-04-03T10:35:52.443Z'. */
@@ -1039,6 +1045,8 @@ export type ImageWideSourceSetArgs = {
1039
1045
  export type Indicators = {
1040
1046
  /** Whether the content is an opinion piece. */
1041
1047
  readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
1048
+ /** Whether the content is Commercial Partner Content. */
1049
+ readonly isPartnerContent?: Maybe<Scalars['Boolean']['output']>;
1042
1050
  };
1043
1051
 
1044
1052
  export type LayoutImage = Reference & {
@@ -2163,16 +2171,19 @@ export type ArticleResolvers<ContextType = QueryContext, ParentType extends Reso
2163
2171
  bodyXML: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2164
2172
  byline: Resolver<Maybe<ResolversTypes['StructuredContent']>, ParentType, ContextType, Partial<ArticleBylineArgs>>;
2165
2173
  canBeSyndicated: Resolver<Maybe<ResolversTypes['CanBeSyndicated']>, ParentType, ContextType>;
2174
+ clientName: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2166
2175
  commentsEnabled: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
2167
2176
  containedIn: Resolver<Maybe<ResolversTypes['Content']>, ParentType, ContextType>;
2168
2177
  design: Resolver<Maybe<ResolversTypes['Design']>, ParentType, ContextType>;
2169
2178
  editorialDesk: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2170
2179
  firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
2171
2180
  id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
2181
+ indicators: Resolver<Maybe<ResolversTypes['Indicators']>, ParentType, ContextType>;
2172
2182
  instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
2173
2183
  mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
2174
2184
  modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
2175
2185
  originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2186
+ publication: Resolver<Maybe<ReadonlyArray<ResolversTypes['String']>>, ParentType, ContextType>;
2176
2187
  publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2177
2188
  publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
2178
2189
  publishedTimestamp: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
@@ -2669,6 +2680,7 @@ export type ImageWideResolvers<ContextType = QueryContext, ParentType extends Re
2669
2680
 
2670
2681
  export type IndicatorsResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Indicators'] = ResolversParentTypes['Indicators']> = ResolversObject<{
2671
2682
  isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
2683
+ isPartnerContent: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
2672
2684
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
2673
2685
  }>;
2674
2686
 
@@ -105,4 +105,27 @@ describe('CAPI response', () => {
105
105
  )
106
106
  })
107
107
  })
108
+
109
+ describe('Partner content type articles', () => {
110
+ test('should have `isPartnerContent` set correctly as `true` when correct publication id is set', () => {
111
+ const article = cloneDeep({
112
+ ...baseCapiObject,
113
+ publication: [
114
+ 'http://www.ft.com/thing/724b5e36-6d45-4cf1-b1c2-3f676b21f21b',
115
+ ],
116
+ })
117
+ const capiResponse = new CapiResponse(article, context)
118
+
119
+ expect(capiResponse.isPartnerContent()).toBe(true)
120
+ })
121
+ test('should have `isPartnerContent` set correctly as `false` if publication field is not set', () => {
122
+ const article = cloneDeep({
123
+ ...baseCapiObject,
124
+ publication: null,
125
+ })
126
+ const capiResponse = new CapiResponse(article, context)
127
+
128
+ expect(capiResponse.isPartnerContent()).toBe(false)
129
+ })
130
+ })
108
131
  })
@@ -321,6 +321,14 @@ export class CapiResponse {
321
321
  return null
322
322
  }
323
323
 
324
+ isPartnerContent(): boolean | null {
325
+ return Boolean(
326
+ 'publication' in this.capiData &&
327
+ this.capiData.publication?.[0] ===
328
+ 'http://www.ft.com/thing/724b5e36-6d45-4cf1-b1c2-3f676b21f21b'
329
+ )
330
+ }
331
+
324
332
  canBeSyndicated(): LiteralUnionScalarValues<typeof CanBeSyndicated> {
325
333
  return this.capiData.canBeSyndicated
326
334
  }
@@ -840,10 +848,17 @@ export class CapiResponse {
840
848
  return null
841
849
  }
842
850
 
843
- isPartnerContent(): boolean {
844
- if ('editorialDesk' in this.capiData) {
845
- return this.capiData.editorialDesk === '/FT/Commercial/PartnerContent'
851
+ publication(): string[] | null {
852
+ if ('publication' in this.capiData && this.capiData.publication) {
853
+ return this.capiData.publication
846
854
  }
847
- return false
855
+ return null
856
+ }
857
+
858
+ clientName(): string | null {
859
+ if ('clientName' in this.capiData && this.capiData.clientName) {
860
+ return this.capiData.clientName
861
+ }
862
+ return null
848
863
  }
849
864
  }
@@ -32,6 +32,8 @@ const articleMetadataSchema = baseMetadataSchema.pick({
32
32
  topper: true,
33
33
  comments: true,
34
34
  containedIn: true,
35
+ publication: true,
36
+ clientName: true,
35
37
  })
36
38
 
37
39
  const articleMediaSchema = baseMediaSchema.pick({
@@ -232,6 +232,8 @@ export const baseMetadataSchema = z.object({
232
232
  tableOfContents: z
233
233
  .object({ labelType: z.string(), sequence: z.string() })
234
234
  .optional(),
235
+ publication: z.array(z.string()).optional(),
236
+ clientName: z.string().optional(),
235
237
  })
236
238
 
237
239
  export const baseContentSchema = z.object({
@@ -73,6 +73,13 @@ const resolvers = {
73
73
  Article: {
74
74
  ...contentResolvers,
75
75
  containedIn: (parent) => parent.containedIn(),
76
+ publication: (parent) => parent.publication() ?? null,
77
+ clientName: (parent) => parent.clientName() ?? null,
78
+ indicators: (parent) => {
79
+ return {
80
+ isPartnerContent: parent.isPartnerContent(),
81
+ }
82
+ },
76
83
  },
77
84
 
78
85
  Placeholder: {
@@ -135,6 +142,7 @@ const resolvers = {
135
142
  // it from other Indicators types in the next major release.
136
143
  Indicators: {
137
144
  isOpinion: (parent) => parent.isOpinion ?? null,
145
+ isPartnerContent: (parent) => parent.isPartnerContent ?? null,
138
146
  },
139
147
 
140
148
  Media: {