@typeform/api-client
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -22,7 +22,7 @@ import { Typeform } from './typeform-types'; | ||
}): Promise<Typeform.API.Forms.List>; | ||
update(args: { | ||
update<T extends boolean>(args: { | ||
uid: string; | ||
override?: boolean; | ||
data: Typeform.Form; | ||
}): Promise<Typeform.Form>; | ||
override?: T; | ||
data: T extends true ? Typeform.Form : Typeform.API.PATCH<'/settings/facebook_pixel' | '/settings/google_analytics' | '/settings/google_tag_manager' | '/settings/is_public' | '/settings/meta' | '/cui_settings' | '/theme' | '/title' | '/workspace'>[]; | ||
}): Promise<T extends true ? Typeform.Form : null>; | ||
copy(args: { | ||
@@ -29,0 +29,0 @@ uid: string; |
@@ -115,5 +115,5 @@ export declare namespace Typeform { | ||
} | ||
interface PATCH { | ||
op: string; | ||
path: string; | ||
interface PATCH<T extends string> { | ||
op: 'add' | 'remove' | 'replace'; | ||
path: T; | ||
value: any; | ||
@@ -120,0 +120,0 @@ } |
@@ -116,5 +116,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
} | ||
export interface PATCH { | ||
op: string | ||
path: string | ||
export interface PATCH<T extends string> { | ||
op: 'add' | 'remove' | 'replace' | ||
path: T | ||
value: any | ||
@@ -121,0 +121,0 @@ } |
import { Typeform } from './typeform-types'; | ||
export declare const createMemberPatchQuery: (members: string[], operation: string) => Typeform.API.PATCH[]; | ||
export declare const createMemberPatchQuery: (members: string[], operation: Typeform.API.PATCH<'/members'>['op']) => Typeform.API.PATCH<'/members'>[]; | ||
export declare const isMemberPropValid: (members: string | string[]) => boolean; | ||
export declare const rateLimit: () => Promise<unknown>; | ||
export declare const removeFormKeys: (input: any, removeKeys?: string[]) => unknown; |
@@ -29,4 +29,4 @@ import { Typeform } from './typeform-types'; | ||
id: string; | ||
data: Typeform.API.PATCH[]; | ||
data: Typeform.API.PATCH<'/name' | '/members'>[]; | ||
}): Promise<null>; | ||
} |
{ | ||
"name": "@typeform/api-client", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "JS SDK for Typeform API", | ||
@@ -5,0 +5,0 @@ "scripts": { |
1322726