Skip to content

Commit

Permalink
Merge pull request #535 from schabibi1/feat/new-regions-ap-ca
Browse files Browse the repository at this point in the history
feat(SDK-106): update to React SDK 3
  • Loading branch information
alexjoverm authored Dec 20, 2023
2 parents 5c30f3f + 686990b commit cf5b395
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 16 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ That's it! All the features are enabled for you: the _API Client_ for interactin
Possible values:
- `eu` (default): For spaces created in EU
- `us` : For spaces created in the US
- `ap`: For spaces created in Australia
- `ca`: For spaces created in Canada
- `cn` : For spaces created in China

Full example for a space created in the US:
Expand Down
4 changes: 2 additions & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prepublishOnly": "npm run build && cp ../README.md ./"
},
"dependencies": {
"@storyblok/react": "^2.4.7",
"@storyblok/react": "^3.0.0",
"gatsby-source-filesystem": "^5.12.1",
"isomorphic-fetch": "^3.0.0",
"json-stringify-safe": "^5.0.1"
Expand Down Expand Up @@ -92,4 +92,4 @@
"gatsby-plugin",
"gatsby-source-storyblok"
]
}
}
1 change: 0 additions & 1 deletion lib/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {
StoryblokBridgeConfigV2
} from '../types'


export const useStoryblokBridge = (
id: Number,
cb: (newStory) => void,
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions playground/gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const config: GatsbyConfig = {
accessToken: 'OurklwV5XsDJTIE1NJaD2wtt',
version: 'draft',
localAssets: true,
includeLinks: true,
}
},
],
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"gatsby"
],
"scripts": {
"develop": "ENABLE_GATSBY_REFRESH_ENDPOINT=true gatsby develop",
"develop": "gatsby develop",
"start": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
Expand Down
187 changes: 187 additions & 0 deletions playground/src/gatsby-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ type Query = {
readonly allSitePage: SitePageConnection;
readonly allSitePlugin: SitePluginConnection;
readonly allStoryblokEntry: StoryblokEntryConnection;
readonly allStoryblokLink: StoryblokLinkConnection;
readonly allStoryblokSpace: StoryblokSpaceConnection;
readonly directory: Maybe<Directory>;
readonly file: Maybe<File>;
Expand All @@ -792,6 +793,7 @@ type Query = {
readonly sitePage: Maybe<SitePage>;
readonly sitePlugin: Maybe<SitePlugin>;
readonly storyblokEntry: Maybe<StoryblokEntry>;
readonly storyblokLink: Maybe<StoryblokLink>;
readonly storyblokSpace: Maybe<StoryblokSpace>;
};

Expand Down Expand Up @@ -860,6 +862,14 @@ type Query_allStoryblokEntryArgs = {
};


type Query_allStoryblokLinkArgs = {
filter: InputMaybe<StoryblokLinkFilterInput>;
limit: InputMaybe<Scalars['Int']>;
skip: InputMaybe<Scalars['Int']>;
sort: InputMaybe<ReadonlyArray<InputMaybe<StoryblokLinkSortInput>>>;
};


type Query_allStoryblokSpaceArgs = {
filter: InputMaybe<StoryblokSpaceFilterInput>;
limit: InputMaybe<Scalars['Int']>;
Expand Down Expand Up @@ -1053,6 +1063,25 @@ type Query_storyblokEntryArgs = {
};


type Query_storyblokLinkArgs = {
children: InputMaybe<NodeFilterListInput>;
id: InputMaybe<StringQueryOperatorInput>;
internal: InputMaybe<InternalFilterInput>;
internalId: InputMaybe<IntQueryOperatorInput>;
is_folder: InputMaybe<BooleanQueryOperatorInput>;
is_startpage: InputMaybe<BooleanQueryOperatorInput>;
name: InputMaybe<StringQueryOperatorInput>;
parent: InputMaybe<NodeFilterInput>;
parent_id: InputMaybe<IntQueryOperatorInput>;
path: InputMaybe<StringQueryOperatorInput>;
position: InputMaybe<IntQueryOperatorInput>;
published: InputMaybe<BooleanQueryOperatorInput>;
real_path: InputMaybe<StringQueryOperatorInput>;
slug: InputMaybe<StringQueryOperatorInput>;
uuid: InputMaybe<StringQueryOperatorInput>;
};


type Query_storyblokSpaceArgs = {
children: InputMaybe<NodeFilterListInput>;
domain: InputMaybe<StringQueryOperatorInput>;
Expand Down Expand Up @@ -2081,6 +2110,164 @@ type StoryblokEntrySortInput = {
readonly uuid: InputMaybe<SortOrderEnum>;
};

type StoryblokLink = Node & {
readonly children: ReadonlyArray<Node>;
readonly id: Scalars['ID'];
readonly internal: Internal;
readonly internalId: Maybe<Scalars['Int']>;
readonly is_folder: Maybe<Scalars['Boolean']>;
readonly is_startpage: Maybe<Scalars['Boolean']>;
readonly name: Maybe<Scalars['String']>;
readonly parent: Maybe<Node>;
readonly parent_id: Maybe<Scalars['Int']>;
readonly path: Maybe<Scalars['String']>;
readonly position: Maybe<Scalars['Int']>;
readonly published: Maybe<Scalars['Boolean']>;
readonly real_path: Maybe<Scalars['String']>;
readonly slug: Maybe<Scalars['String']>;
readonly uuid: Maybe<Scalars['String']>;
};

type StoryblokLinkConnection = {
readonly distinct: ReadonlyArray<Scalars['String']>;
readonly edges: ReadonlyArray<StoryblokLinkEdge>;
readonly group: ReadonlyArray<StoryblokLinkGroupConnection>;
readonly max: Maybe<Scalars['Float']>;
readonly min: Maybe<Scalars['Float']>;
readonly nodes: ReadonlyArray<StoryblokLink>;
readonly pageInfo: PageInfo;
readonly sum: Maybe<Scalars['Float']>;
readonly totalCount: Scalars['Int'];
};


type StoryblokLinkConnection_distinctArgs = {
field: StoryblokLinkFieldSelector;
};


type StoryblokLinkConnection_groupArgs = {
field: StoryblokLinkFieldSelector;
limit: InputMaybe<Scalars['Int']>;
skip: InputMaybe<Scalars['Int']>;
};


type StoryblokLinkConnection_maxArgs = {
field: StoryblokLinkFieldSelector;
};


type StoryblokLinkConnection_minArgs = {
field: StoryblokLinkFieldSelector;
};


type StoryblokLinkConnection_sumArgs = {
field: StoryblokLinkFieldSelector;
};

type StoryblokLinkEdge = {
readonly next: Maybe<StoryblokLink>;
readonly node: StoryblokLink;
readonly previous: Maybe<StoryblokLink>;
};

type StoryblokLinkFieldSelector = {
readonly children: InputMaybe<NodeFieldSelector>;
readonly id: InputMaybe<FieldSelectorEnum>;
readonly internal: InputMaybe<InternalFieldSelector>;
readonly internalId: InputMaybe<FieldSelectorEnum>;
readonly is_folder: InputMaybe<FieldSelectorEnum>;
readonly is_startpage: InputMaybe<FieldSelectorEnum>;
readonly name: InputMaybe<FieldSelectorEnum>;
readonly parent: InputMaybe<NodeFieldSelector>;
readonly parent_id: InputMaybe<FieldSelectorEnum>;
readonly path: InputMaybe<FieldSelectorEnum>;
readonly position: InputMaybe<FieldSelectorEnum>;
readonly published: InputMaybe<FieldSelectorEnum>;
readonly real_path: InputMaybe<FieldSelectorEnum>;
readonly slug: InputMaybe<FieldSelectorEnum>;
readonly uuid: InputMaybe<FieldSelectorEnum>;
};

type StoryblokLinkFilterInput = {
readonly children: InputMaybe<NodeFilterListInput>;
readonly id: InputMaybe<StringQueryOperatorInput>;
readonly internal: InputMaybe<InternalFilterInput>;
readonly internalId: InputMaybe<IntQueryOperatorInput>;
readonly is_folder: InputMaybe<BooleanQueryOperatorInput>;
readonly is_startpage: InputMaybe<BooleanQueryOperatorInput>;
readonly name: InputMaybe<StringQueryOperatorInput>;
readonly parent: InputMaybe<NodeFilterInput>;
readonly parent_id: InputMaybe<IntQueryOperatorInput>;
readonly path: InputMaybe<StringQueryOperatorInput>;
readonly position: InputMaybe<IntQueryOperatorInput>;
readonly published: InputMaybe<BooleanQueryOperatorInput>;
readonly real_path: InputMaybe<StringQueryOperatorInput>;
readonly slug: InputMaybe<StringQueryOperatorInput>;
readonly uuid: InputMaybe<StringQueryOperatorInput>;
};

type StoryblokLinkGroupConnection = {
readonly distinct: ReadonlyArray<Scalars['String']>;
readonly edges: ReadonlyArray<StoryblokLinkEdge>;
readonly field: Scalars['String'];
readonly fieldValue: Maybe<Scalars['String']>;
readonly group: ReadonlyArray<StoryblokLinkGroupConnection>;
readonly max: Maybe<Scalars['Float']>;
readonly min: Maybe<Scalars['Float']>;
readonly nodes: ReadonlyArray<StoryblokLink>;
readonly pageInfo: PageInfo;
readonly sum: Maybe<Scalars['Float']>;
readonly totalCount: Scalars['Int'];
};


type StoryblokLinkGroupConnection_distinctArgs = {
field: StoryblokLinkFieldSelector;
};


type StoryblokLinkGroupConnection_groupArgs = {
field: StoryblokLinkFieldSelector;
limit: InputMaybe<Scalars['Int']>;
skip: InputMaybe<Scalars['Int']>;
};


type StoryblokLinkGroupConnection_maxArgs = {
field: StoryblokLinkFieldSelector;
};


type StoryblokLinkGroupConnection_minArgs = {
field: StoryblokLinkFieldSelector;
};


type StoryblokLinkGroupConnection_sumArgs = {
field: StoryblokLinkFieldSelector;
};

type StoryblokLinkSortInput = {
readonly children: InputMaybe<NodeSortInput>;
readonly id: InputMaybe<SortOrderEnum>;
readonly internal: InputMaybe<InternalSortInput>;
readonly internalId: InputMaybe<SortOrderEnum>;
readonly is_folder: InputMaybe<SortOrderEnum>;
readonly is_startpage: InputMaybe<SortOrderEnum>;
readonly name: InputMaybe<SortOrderEnum>;
readonly parent: InputMaybe<NodeSortInput>;
readonly parent_id: InputMaybe<SortOrderEnum>;
readonly path: InputMaybe<SortOrderEnum>;
readonly position: InputMaybe<SortOrderEnum>;
readonly published: InputMaybe<SortOrderEnum>;
readonly real_path: InputMaybe<SortOrderEnum>;
readonly slug: InputMaybe<SortOrderEnum>;
readonly uuid: InputMaybe<SortOrderEnum>;
};

type StoryblokSpace = Node & {
readonly children: ReadonlyArray<Node>;
readonly domain: Maybe<Scalars['String']>;
Expand Down

0 comments on commit cf5b395

Please sign in to comment.