@janbox/contentful-marketplace-sdk 1.0.0 → 1.0.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.
@@ -3,7 +3,7 @@ import { Entry, EntrySys } from 'contentful';
3
3
  import { HyperlinkEntry } from './hyperlink';
4
4
  type BannerCollectionEntry = Entry<TypeBannerCollectionSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
5
5
  type GraphQLEntrySys = Pick<EntrySys, "id">;
6
- type BannerCollectionGraphQLItem = {
6
+ export type BannerCollectionGraphQLItem = {
7
7
  sys: GraphQLEntrySys;
8
8
  bannersCollection: {
9
9
  items: Array<{
@@ -21,13 +21,8 @@ type BannerCollectionGraphQLItem = {
21
21
  }>;
22
22
  };
23
23
  } & Pick<BannerCollectionEntry["fields"], "name" | "slot" | "platform">;
24
- type BannerCollectionGraphQLResponse = {
25
- bannerCollectionCollection: {
26
- items: Array<BannerCollectionGraphQLItem>;
27
- };
28
- };
29
24
  export type ListBannerCollectionEntriesResponse = {
30
- data: BannerCollectionGraphQLResponse["bannerCollectionCollection"]["items"];
25
+ data: BannerCollectionGraphQLItem[];
31
26
  };
32
27
  export declare const listBannerCollectionEntries: ({ slot, limit, platform, marketCode, language, }: {
33
28
  slot: BannerCollectionEntry["fields"]["slot"];
@@ -1,14 +1,14 @@
1
1
  import { TypeBlogPostSkeleton } from '../types';
2
2
  import { Entry, EntrySys } from 'contentful';
3
- export type BlogPostEntry = Entry<TypeBlogPostSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
3
+ type BlogPostEntry = Entry<TypeBlogPostSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
4
4
  type GraphQLEntrySys = Pick<EntrySys, "id">;
5
5
  type GraphQLAsset = {
6
- url: string | null;
6
+ url: string;
7
7
  width: number | null;
8
8
  height: number | null;
9
- contentType: string | null;
9
+ contentType: string;
10
10
  };
11
- type BlogPostGraphQLItem = {
11
+ export type BlogPostGraphQLItem = {
12
12
  sys: GraphQLEntrySys;
13
13
  category: {
14
14
  sys: GraphQLEntrySys;
@@ -17,7 +17,7 @@ type BlogPostGraphQLItem = {
17
17
  } | null;
18
18
  featuredImage: GraphQLAsset | null;
19
19
  } & Pick<BlogPostEntry["fields"], "title" | "shortDescription" | "slug">;
20
- type BlogPostDetailGraphQLItem = BlogPostGraphQLItem & {
20
+ export type BlogPostDetailGraphQLItem = BlogPostGraphQLItem & {
21
21
  author: {
22
22
  sys: GraphQLEntrySys;
23
23
  name: string;
@@ -34,13 +34,8 @@ type BlogPostDetailGraphQLItem = BlogPostGraphQLItem & {
34
34
  metaRobots: string[] | null;
35
35
  } | null;
36
36
  };
37
- type BlogPostGraphQLResponse = {
38
- blogPostCollection: {
39
- items: Array<BlogPostGraphQLItem>;
40
- };
41
- };
42
37
  export type ListBlogPostEntriesResponse = {
43
- data: BlogPostGraphQLResponse["blogPostCollection"]["items"];
38
+ data: BlogPostGraphQLItem[];
44
39
  };
45
40
  export type FindBlogPostEntryResponse = {
46
41
  data: BlogPostDetailGraphQLItem;
@@ -1,22 +1,18 @@
1
- import { TypeBrandCollectionSkeleton } from '../types';
1
+ import { TypeBrandCollectionSkeleton, TypeBrandSkeleton } from '../types';
2
2
  import { Entry, EntrySys } from 'contentful';
3
- import { BrandEntry } from './brand';
3
+ type BrandEntry = Entry<TypeBrandSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
4
4
  type BrandCollectionEntry = Entry<TypeBrandCollectionSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
5
5
  type GraphQLEntrySys = Pick<EntrySys, "id">;
6
- type BrandCollectionGraphQLResponse = {
7
- brandCollectionCollection: {
6
+ export type BrandCollectionGraphQLItem = {
7
+ sys: GraphQLEntrySys;
8
+ brandsCollection: {
8
9
  items: Array<{
9
10
  sys: GraphQLEntrySys;
10
- brandsCollection: {
11
- items: Array<{
12
- sys: GraphQLEntrySys;
13
- } & Pick<BrandEntry["fields"], "name" | "slug">>;
14
- };
15
- } & Pick<BrandCollectionEntry["fields"], "name" | "slot">>;
11
+ } & Pick<BrandEntry["fields"], "name" | "slug">>;
16
12
  };
17
- };
13
+ } & Pick<BrandCollectionEntry["fields"], "name" | "slot">;
18
14
  export type ListBrandCollectionEntriesResponse = {
19
- data: BrandCollectionGraphQLResponse["brandCollectionCollection"]["items"];
15
+ data: BrandCollectionGraphQLItem[];
20
16
  };
21
17
  export declare const listBrandCollectionEntries: ({ limit, marketCode, language, }?: {
22
18
  limit?: number;
@@ -16,11 +16,11 @@ type GraphQLSeo = {
16
16
  metaKeywords: string[] | null;
17
17
  metaRobots: string[] | null;
18
18
  };
19
- type DocCategoryGraphQLItem = {
19
+ export type DocCategoryGraphQLItem = {
20
20
  sys: GraphQLEntrySys;
21
21
  seo: GraphQLSeo | null;
22
22
  } & Pick<DocCategoryEntry["fields"], "title" | "slug" | "description" | "order">;
23
- type DocArticleGraphQLItem = {
23
+ export type DocArticleGraphQLItem = {
24
24
  sys: GraphQLEntrySys;
25
25
  category: ({
26
26
  sys: GraphQLEntrySys;
@@ -36,27 +36,17 @@ type DocArticleGraphQLItem = {
36
36
  } | null;
37
37
  seo: GraphQLSeo | null;
38
38
  } & Pick<DocArticleEntry["fields"], "title" | "slug">;
39
- type DocCategoryGraphQLResponse = {
40
- documentationCategoryCollection: {
41
- items: Array<DocCategoryGraphQLItem>;
42
- };
43
- };
44
- type DocArticleGraphQLResponse = {
45
- documentationArticleCollection: {
46
- items: Array<DocArticleGraphQLItem>;
47
- };
48
- };
49
39
  export type ListDocCategoryEntriesResponse = {
50
- data: DocCategoryGraphQLResponse["documentationCategoryCollection"]["items"];
40
+ data: DocCategoryGraphQLItem[];
51
41
  };
52
42
  export type FindDocCategoryEntryResponse = {
53
43
  data: DocCategoryGraphQLItem;
54
44
  };
55
45
  export type ListDocArticleEntriesResponse = {
56
- data: DocArticleGraphQLResponse["documentationArticleCollection"]["items"];
46
+ data: DocArticleGraphQLItem[];
57
47
  };
58
48
  export type FindDocArticleEntryResponse = {
59
- data: DocArticleGraphQLResponse["documentationArticleCollection"]["items"][number];
49
+ data: DocArticleGraphQLItem;
60
50
  };
61
51
  export declare const listDocCategoryEntries: ({ marketCode, language, limit, skip, }?: {
62
52
  marketCode?: string;
@@ -3,20 +3,16 @@ import { Entry, EntrySys } from 'contentful';
3
3
  import { HyperlinkEntry } from './hyperlink';
4
4
  type HyperlinkCollectionEntry = Entry<TypeHyperlinkCollectionSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
5
5
  type GraphQLEntrySys = Pick<EntrySys, "id">;
6
- type HyperlinkCollectionGraphQLResponse = {
7
- hyperlinkCollectionCollection: {
6
+ export type HyperlinkCollectionGraphQLItem = {
7
+ sys: GraphQLEntrySys;
8
+ linksCollection: {
8
9
  items: Array<{
9
10
  sys: GraphQLEntrySys;
10
- linksCollection: {
11
- items: Array<{
12
- sys: GraphQLEntrySys;
13
- } & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | "includesMarketCode">>;
14
- };
15
- } & Pick<HyperlinkCollectionEntry["fields"], "name" | "slot" | "order">>;
11
+ } & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | "includesMarketCode">>;
16
12
  };
17
- };
13
+ } & Pick<HyperlinkCollectionEntry["fields"], "name" | "slot" | "order">;
18
14
  export type ListHyperlinkCollectionEntriesResponse = {
19
- data: HyperlinkCollectionGraphQLResponse["hyperlinkCollectionCollection"]["items"];
15
+ data: HyperlinkCollectionGraphQLItem[];
20
16
  };
21
17
  export declare const listHyperlinkCollectionEntries: ({ marketCode, language, }?: {
22
18
  marketCode?: string;
@@ -2,15 +2,11 @@ import { TypeKeywordCollectionSkeleton } from '../types';
2
2
  import { Entry, EntrySys } from 'contentful';
3
3
  type KeywordCollectionEntry = Entry<TypeKeywordCollectionSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
4
4
  type GraphQLEntrySys = Pick<EntrySys, "id">;
5
- type KeywordCollectionGraphQLResponse = {
6
- keywordCollectionCollection: {
7
- items: Array<{
8
- sys: GraphQLEntrySys;
9
- } & Pick<KeywordCollectionEntry["fields"], "name" | "slot" | "keywords">>;
10
- };
11
- };
5
+ export type KeywordCollectionGraphQLItem = {
6
+ sys: GraphQLEntrySys;
7
+ } & Pick<KeywordCollectionEntry["fields"], "name" | "slot" | "keywords">;
12
8
  export type ListKeywordCollectionEntriesResponse = {
13
- data: KeywordCollectionGraphQLResponse["keywordCollectionCollection"]["items"];
9
+ data: KeywordCollectionGraphQLItem[];
14
10
  };
15
11
  export declare const listKeywordCollectionEntries: ({ limit, marketCode, language, }?: {
16
12
  limit?: number;
package/dist/index.js CHANGED
@@ -1165,9 +1165,12 @@ query${o} {
1165
1165
  }
1166
1166
  }
1167
1167
  }
1168
- `, { hyperlinkCollectionCollection: c } = await p.graphqlQuery(i, {
1169
- ...a
1170
- });
1168
+ `, { hyperlinkCollectionCollection: c } = await p.graphqlQuery(
1169
+ i,
1170
+ {
1171
+ ...a
1172
+ }
1173
+ );
1171
1174
  return {
1172
1175
  data: c.items
1173
1176
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/contentful-marketplace-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,3 +0,0 @@
1
- import { TypeBrandSkeleton } from '../types';
2
- import { Entry } from 'contentful';
3
- export type BrandEntry = Entry<TypeBrandSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;