Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: typo in Management API interfaces #833

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/index.ts
Copy link
Contributor Author

@ryami333 ryami333 Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of whitespace/indentation changes because this file had not been correctly formatted with Prettier. See this PR where I set a formatting baseline. Once that is merged I can rebase this PR to make the diffs less noisy.

In the meantime, please hide whitespace changes in code-review.

EDIT: rebased onto main - no formatting changes here now.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
ISbStory,
ISbStoryData,
ISbStoryParams,
ISbContentMangmntAPI,
ISbContentManagementAPI,
ISbNode,
ThrottleFn,
IMemoryType,
Expand Down Expand Up @@ -265,7 +265,7 @@ class Storyblok {

public post(
slug: string,
params: ISbStoriesParams | ISbContentMangmntAPI,
params: ISbStoriesParams | ISbContentManagementAPI,
fetchOptions?: ISbCustomFetch
): Promise<ISbResponseData> {
const url = `/${slug}`
Expand All @@ -277,7 +277,7 @@ class Storyblok {

public put(
slug: string,
params: ISbStoriesParams | ISbContentMangmntAPI,
params: ISbStoriesParams | ISbContentManagementAPI,
fetchOptions?: ISbCustomFetch
): Promise<ISbResponseData> {
const url = `/${slug}`
Expand All @@ -289,7 +289,7 @@ class Storyblok {

public delete(
slug: string,
params: ISbStoriesParams | ISbContentMangmntAPI,
params: ISbStoriesParams | ISbContentManagementAPI,
fetchOptions?: ISbCustomFetch
): Promise<ISbResponseData> {
const url = `/${slug}`
Expand Down
6 changes: 3 additions & 3 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export type MarkSchema = {
(node: ISbNode): object
}

export interface ISbContentMangmntAPI<
export interface ISbContentManagementAPI<
Content = ISbComponentType<string> & { [index: string]: any },
> {
story: {
Expand All @@ -287,7 +287,7 @@ export interface ISbContentMangmntAPI<
translated_slugs_attributes?: {
path: string
name: string | null
lang: ISbContentMangmntAPI['lang']
lang: ISbContentManagementAPI['lang']
}[]
}
force_update?: '1' | unknown
Expand All @@ -296,7 +296,7 @@ export interface ISbContentMangmntAPI<
lang?: string
}

export interface ISbManagmentApiResult {
export interface ISbManagementApiResult {
data: any
headers: any
}
Expand Down
Loading