@financial-times/cp-content-pipeline-schema 3.2.0 → 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.
@@ -854,4 +854,11 @@ export class CapiResponse {
854
854
  }
855
855
  return null
856
856
  }
857
+
858
+ clientName(): string | null {
859
+ if ('clientName' in this.capiData && this.capiData.clientName) {
860
+ return this.capiData.clientName
861
+ }
862
+ return null
863
+ }
857
864
  }
@@ -33,6 +33,7 @@ const articleMetadataSchema = baseMetadataSchema.pick({
33
33
  comments: true,
34
34
  containedIn: true,
35
35
  publication: true,
36
+ clientName: true,
36
37
  })
37
38
 
38
39
  const articleMediaSchema = baseMediaSchema.pick({
@@ -233,6 +233,7 @@ export const baseMetadataSchema = z.object({
233
233
  .object({ labelType: z.string(), sequence: z.string() })
234
234
  .optional(),
235
235
  publication: z.array(z.string()).optional(),
236
+ clientName: z.string().optional(),
236
237
  })
237
238
 
238
239
  export const baseContentSchema = z.object({
@@ -74,6 +74,7 @@ const resolvers = {
74
74
  ...contentResolvers,
75
75
  containedIn: (parent) => parent.containedIn(),
76
76
  publication: (parent) => parent.publication() ?? null,
77
+ clientName: (parent) => parent.clientName() ?? null,
77
78
  indicators: (parent) => {
78
79
  return {
79
80
  isPartnerContent: parent.isPartnerContent(),