UNPKG

@pfantato/printful-ts

Version:

Typescript SDK to integrate with Printful

22 lines (21 loc) 739 B
import { z } from 'zod'; import { type Options } from 'ky'; import { Locale, PrintfulConfig, OAuthScopeValue } from '@printful-ts/schemas'; type RequestOptions = Options & { validateResponseSchema?: boolean; locale?: Locale; store_id?: number; checkScopes?: Array<OAuthScopeValue>; }; export declare abstract class PrintfulApiService { private privateToken; private baseUrl; private version; private api; constructor(config: PrintfulConfig); protected getBaseUrl(): string; protected isAllowed(scopes: Array<OAuthScopeValue>): Promise<boolean>; private configure; protected request<T>(endpoint: string, requestOptions?: RequestOptions, schema?: z.ZodSchema<T>): Promise<T>; } export {};