diff --git a/src/modules/channels/index.ts b/src/modules/channels/index.ts index 4ac57a2..9ee2da5 100644 --- a/src/modules/channels/index.ts +++ b/src/modules/channels/index.ts @@ -14,6 +14,7 @@ import { import { GET_CHANNEL_SOCIAL_CHANNELS } from '../../queries'; import { GET_CHANNEL_PRODUCTS } from '../../queries'; +import { ChannelProductsInterface } from 'types/channel-products'; export class Channels { constructor(protected client: ClientType) {} @@ -32,7 +33,7 @@ export class Channels { return response.data.socialChannels.data as ChannelInterface[]; } - public async getChannelProducts(id: string): Promise { + public async getChannelProducts(id: string): Promise { const response = await this.client.query({ query: GET_CHANNEL_PRODUCTS, variables: { id }, diff --git a/src/types/channel-products.ts b/src/types/channel-products.ts new file mode 100644 index 0000000..606dc77 --- /dev/null +++ b/src/types/channel-products.ts @@ -0,0 +1,8 @@ +import { VariantInterface } from './inventory'; + +export type ChannelProductsInterface = { + id: string; + name: string; + description: string; + variants?: VariantInterface[]; +};