@financial-times/cp-content-pipeline-schema 3.4.0 → 3.5.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.
- package/CHANGELOG.md +23 -0
- package/lib/datasources/capi.d.ts +0 -2
- package/lib/datasources/capi.js +10 -23
- package/lib/datasources/capi.js.map +1 -1
- package/lib/datasources/instrumented.js +4 -1
- package/lib/datasources/instrumented.js.map +1 -1
- package/lib/datasources/origami-image.d.ts +0 -2
- package/lib/datasources/origami-image.js +5 -19
- package/lib/datasources/origami-image.js.map +1 -1
- package/lib/datasources/twitter.d.ts +0 -2
- package/lib/datasources/twitter.js +2 -16
- package/lib/datasources/twitter.js.map +1 -1
- package/lib/datasources/url-management.js +5 -3
- package/lib/datasources/url-management.js.map +1 -1
- package/lib/fixtures/dummyContext.js +1 -1
- package/lib/generated/index.d.ts +69 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js.map +1 -1
- package/lib/model/Byline.js +11 -14
- package/lib/model/Byline.js.map +1 -1
- package/lib/model/CapiList.js +2 -0
- package/lib/model/CapiList.js.map +1 -1
- package/lib/model/CapiResponse.d.ts +7 -3
- package/lib/model/CapiResponse.js +125 -57
- package/lib/model/CapiResponse.js.map +1 -1
- package/lib/model/CapiResponse.test.js +92 -7
- package/lib/model/CapiResponse.test.js.map +1 -1
- package/lib/model/Clip.js +2 -0
- package/lib/model/Clip.js.map +1 -1
- package/lib/model/Concept.js +4 -10
- package/lib/model/Concept.js.map +1 -1
- package/lib/model/FlourishSource.js +5 -10
- package/lib/model/FlourishSource.js.map +1 -1
- package/lib/model/Image.js +10 -20
- package/lib/model/Image.js.map +1 -1
- package/lib/model/LeadFlourish.js +4 -10
- package/lib/model/LeadFlourish.js.map +1 -1
- package/lib/model/Person.js +5 -16
- package/lib/model/Person.js.map +1 -1
- package/lib/model/Picture.js +3 -0
- package/lib/model/Picture.js.map +1 -1
- package/lib/model/RichText.js +3 -0
- package/lib/model/RichText.js.map +1 -1
- package/lib/model/Topper.js +5 -16
- package/lib/model/Topper.js.map +1 -1
- package/lib/model/schemas/capi/internal-content.d.ts +1 -1
- package/lib/resolvers/content-tree/references/RawImage.js +2 -0
- package/lib/resolvers/content-tree/references/RawImage.js.map +1 -1
- package/lib/resolvers/content.d.ts +26 -1
- package/lib/resolvers/content.js +21 -1
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/index.d.ts +26 -1
- package/lib/resolvers/literal-union.js +1 -0
- package/lib/resolvers/literal-union.js.map +1 -1
- package/lib/types/connection.d.ts +21 -0
- package/lib/types/connection.js +5 -0
- package/lib/types/connection.js.map +1 -0
- package/package.json +1 -1
- package/queries/article.graphql +8 -2
- package/src/datasources/capi.ts +1 -14
- package/src/datasources/origami-image.ts +1 -13
- package/src/datasources/twitter.ts +1 -14
- package/src/fixtures/dummyContext.ts +1 -1
- package/src/generated/index.ts +71 -1
- package/src/index.ts +1 -0
- package/src/model/CapiResponse.test.ts +137 -7
- package/src/model/CapiResponse.ts +129 -37
- package/src/model/schemas/capi/internal-content.ts +1 -1
- package/src/resolvers/content.ts +31 -1
- package/src/types/connection.ts +28 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/content.graphql +40 -2
- package/lib/helpers/timeout-error.d.ts +0 -6
- package/lib/helpers/timeout-error.js +0 -15
- package/lib/helpers/timeout-error.js.map +0 -1
- package/src/helpers/timeout-error.ts +0 -13
package/typedefs/content.graphql
CHANGED
|
@@ -381,7 +381,15 @@ type LiveBlogPackage implements Content {
|
|
|
381
381
|
design: Design
|
|
382
382
|
|
|
383
383
|
"The child articles of this live blog package."
|
|
384
|
-
liveBlogPosts: [Content]
|
|
384
|
+
liveBlogPosts(count: Int): [Content]
|
|
385
|
+
|
|
386
|
+
"The child articles of this live blog package following the [Connections](https://relay.dev/graphql/connections.htm) spec."
|
|
387
|
+
liveBlogPostsConnection(
|
|
388
|
+
first: Int
|
|
389
|
+
after: String
|
|
390
|
+
last: Int
|
|
391
|
+
before: String
|
|
392
|
+
): ContentConnection
|
|
385
393
|
|
|
386
394
|
"The pinned article of this live blog package."
|
|
387
395
|
pinnedPost: Content
|
|
@@ -735,4 +743,34 @@ type ContentPackage implements Content {
|
|
|
735
743
|
|
|
736
744
|
"The optional table of contents for this content package."
|
|
737
745
|
tableOfContents: TableOfContents
|
|
738
|
-
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
type PageInfo {
|
|
749
|
+
"Whether a previous page of edges is available on request."
|
|
750
|
+
hasPreviousPage: Boolean!
|
|
751
|
+
|
|
752
|
+
"Whether a subsequent page of edges is available on request."
|
|
753
|
+
hasNextPage: Boolean!
|
|
754
|
+
|
|
755
|
+
"The cursor for the first edge."
|
|
756
|
+
startCursor: String
|
|
757
|
+
|
|
758
|
+
"The cursor for the last edge."
|
|
759
|
+
endCursor: String
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
type ContentEdge {
|
|
763
|
+
"The child article of this edge."
|
|
764
|
+
node: Content
|
|
765
|
+
|
|
766
|
+
"The opaque cursor for this edge that can be used for future requests."
|
|
767
|
+
cursor: String!
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
type ContentConnection {
|
|
771
|
+
"Pagination data for the connection."
|
|
772
|
+
pageInfo: PageInfo!
|
|
773
|
+
|
|
774
|
+
"A list of edges for the connection."
|
|
775
|
+
edges: [ContentEdge]!
|
|
776
|
+
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const errors_1 = require("@dotcom-reliability-kit/errors");
|
|
4
|
-
class TimeoutError extends errors_1.OperationalError {
|
|
5
|
-
constructor(timeout) {
|
|
6
|
-
super({
|
|
7
|
-
message: `Missed the timeout of ${timeout}ms`,
|
|
8
|
-
timeout,
|
|
9
|
-
});
|
|
10
|
-
this.name = 'TimeoutError';
|
|
11
|
-
this.code = 'TIMEOUT_ERROR';
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.default = TimeoutError;
|
|
15
|
-
//# sourceMappingURL=timeout-error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeout-error.js","sourceRoot":"","sources":["../../src/helpers/timeout-error.ts"],"names":[],"mappings":";;AAAA,2DAAiE;AAEjE,MAAqB,YAAa,SAAQ,yBAAgB;IAIxD,YAAY,OAAe;QACzB,KAAK,CAAC;YACJ,OAAO,EAAE,yBAAyB,OAAO,IAAI;YAC7C,OAAO;SACR,CAAC,CAAA;QAPJ,SAAI,GAAG,cAAc,CAAA;QACrB,SAAI,GAAG,eAAe,CAAA;IAOtB,CAAC;CACF;AAVD,+BAUC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OperationalError } from '@dotcom-reliability-kit/errors'
|
|
2
|
-
|
|
3
|
-
export default class TimeoutError extends OperationalError {
|
|
4
|
-
name = 'TimeoutError'
|
|
5
|
-
code = 'TIMEOUT_ERROR'
|
|
6
|
-
|
|
7
|
-
constructor(timeout: number) {
|
|
8
|
-
super({
|
|
9
|
-
message: `Missed the timeout of ${timeout}ms`,
|
|
10
|
-
timeout,
|
|
11
|
-
})
|
|
12
|
-
}
|
|
13
|
-
}
|