11// This file is auto-generated by @hey-api/openapi-ts
22
3- import type { Options as ClientOptions , TDataShape , Client } from '@hey-api/client-fetch' ;
4- import type { GetCheckFormExtensionData , GetCheckFormExtensionResponse , GetContentByTypeData , GetContentByTypeResponse , GetContentTypesData , GetContentTypesResponse , PostUpdateSubscriptionData , PostUpdateSubscriptionResponse , GetSubscriptionHooksData , GetSubscriptionHooksResponse , PostValidateUserData , PostValidateUserResponse } from './types.gen' ;
5- import { client as _heyApiClient } from './client.gen' ;
3+ import type { Client , Options as Options2 , TDataShape } from '@hey-api/client-fetch' ;
64
7- export type Options < TData extends TDataShape = TDataShape , ThrowOnError extends boolean = boolean > = ClientOptions < TData , ThrowOnError > & {
5+ import { client } from './client.gen' ;
6+ import type { GetCheckFormExtensionData , GetCheckFormExtensionErrors , GetCheckFormExtensionResponses , GetContentByTypeData , GetContentByTypeErrors , GetContentByTypeResponses , GetContentTypesData , GetContentTypesErrors , GetContentTypesResponses , GetSubscriptionHooksData , GetSubscriptionHooksErrors , GetSubscriptionHooksResponses , PostUpdateSubscriptionData , PostUpdateSubscriptionErrors , PostUpdateSubscriptionResponses , PostValidateUserData , PostValidateUserErrors , PostValidateUserResponses } from './types.gen' ;
7+
8+ export type Options < TData extends TDataShape = TDataShape , ThrowOnError extends boolean = boolean > = Options2 < TData , ThrowOnError > & {
89 /**
910 * You can provide a client instance returned by `createClient()` instead of
1011 * individual options. This might be also useful if you want to implement a
@@ -18,9 +19,9 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
1819 meta ?: Record < string , unknown > ;
1920} ;
2021
21- export class ZapierService {
22+ export class Zapier {
2223 public static getCheckFormExtension < ThrowOnError extends boolean = true > ( options ?: Options < GetCheckFormExtensionData , ThrowOnError > ) {
23- return ( options ?. client ?? _heyApiClient ) . get < GetCheckFormExtensionResponse , unknown , ThrowOnError > ( {
24+ return ( options ?. client ?? client ) . get < GetCheckFormExtensionResponses , GetCheckFormExtensionErrors , ThrowOnError > ( {
2425 security : [
2526 {
2627 scheme : 'bearer' ,
@@ -33,7 +34,7 @@ export class ZapierService {
3334 }
3435
3536 public static getContentByType < ThrowOnError extends boolean = true > ( options : Options < GetContentByTypeData , ThrowOnError > ) {
36- return ( options . client ?? _heyApiClient ) . get < GetContentByTypeResponse , unknown , ThrowOnError > ( {
37+ return ( options . client ?? client ) . get < GetContentByTypeResponses , GetContentByTypeErrors , ThrowOnError > ( {
3738 security : [
3839 {
3940 scheme : 'bearer' ,
@@ -46,7 +47,7 @@ export class ZapierService {
4647 }
4748
4849 public static getContentTypes < ThrowOnError extends boolean = true > ( options ?: Options < GetContentTypesData , ThrowOnError > ) {
49- return ( options ?. client ?? _heyApiClient ) . get < GetContentTypesResponse , unknown , ThrowOnError > ( {
50+ return ( options ?. client ?? client ) . get < GetContentTypesResponses , GetContentTypesErrors , ThrowOnError > ( {
5051 security : [
5152 {
5253 scheme : 'bearer' ,
@@ -59,7 +60,7 @@ export class ZapierService {
5960 }
6061
6162 public static postUpdateSubscription < ThrowOnError extends boolean = true > ( options ?: Options < PostUpdateSubscriptionData , ThrowOnError > ) {
62- return ( options ?. client ?? _heyApiClient ) . post < PostUpdateSubscriptionResponse , unknown , ThrowOnError > ( {
63+ return ( options ?. client ?? client ) . post < PostUpdateSubscriptionResponses , PostUpdateSubscriptionErrors , ThrowOnError > ( {
6364 security : [
6465 {
6566 scheme : 'bearer' ,
@@ -76,7 +77,7 @@ export class ZapierService {
7677 }
7778
7879 public static getSubscriptionHooks < ThrowOnError extends boolean = true > ( options ?: Options < GetSubscriptionHooksData , ThrowOnError > ) {
79- return ( options ?. client ?? _heyApiClient ) . get < GetSubscriptionHooksResponse , unknown , ThrowOnError > ( {
80+ return ( options ?. client ?? client ) . get < GetSubscriptionHooksResponses , GetSubscriptionHooksErrors , ThrowOnError > ( {
8081 security : [
8182 {
8283 scheme : 'bearer' ,
@@ -89,7 +90,7 @@ export class ZapierService {
8990 }
9091
9192 public static postValidateUser < ThrowOnError extends boolean = true > ( options ?: Options < PostValidateUserData , ThrowOnError > ) {
92- return ( options ?. client ?? _heyApiClient ) . post < PostValidateUserResponse , unknown , ThrowOnError > ( {
93+ return ( options ?. client ?? client ) . post < PostValidateUserResponses , PostValidateUserErrors , ThrowOnError > ( {
9394 security : [
9495 {
9596 scheme : 'bearer' ,
@@ -104,5 +105,4 @@ export class ZapierService {
104105 }
105106 } ) ;
106107 }
107-
108- }
108+ }
0 commit comments