@botpress/client 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.cjs +15 -15
- package/dist/bundle.cjs.map +4 -4
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +372 -59
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ type SimplifyObject<T extends object> = T extends infer O ? {
|
|
|
31
31
|
[K in keyof O]: Simplify<O[K]>;
|
|
32
32
|
} : never;
|
|
33
33
|
type Simplify<T> = T extends (...args: infer A) => infer R ? (...args: SimplifyTuple<A>) => Simplify<R> : T extends Array<infer E> ? Array<Simplify<E>> : T extends ReadonlyArray<infer E> ? ReadonlyArray<Simplify<E>> : T extends Promise<infer R> ? Promise<Simplify<R>> : T extends Buffer ? Buffer : T extends object ? SimplifyObject<T> : T;
|
|
34
|
-
type Operation$
|
|
34
|
+
type Operation$6<C extends Record<string, AsyncFunc>> = Simplify<keyof {
|
|
35
35
|
[K in keyof C as C[K] extends AsyncFunc ? K : never]: C[K];
|
|
36
36
|
}>;
|
|
37
37
|
type Inputs<C extends Record<string, AsyncFunc>> = Simplify<{
|
|
38
|
-
[T in Operation$
|
|
38
|
+
[T in Operation$6<C>]: Parameters<C[Cast<T, keyof C>]>[0];
|
|
39
39
|
}>;
|
|
40
40
|
type Outputs<C extends Record<string, AsyncFunc>> = Simplify<{
|
|
41
|
-
[T in Operation$
|
|
41
|
+
[T in Operation$6<C>]: Awaited<ReturnType<C[Cast<T, keyof C>]>>;
|
|
42
42
|
}>;
|
|
43
43
|
|
|
44
44
|
type PageLister<R> = (t: {
|
|
@@ -58,21 +58,21 @@ declare class AsyncCollection<T> {
|
|
|
58
58
|
}): Promise<T[]>;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
type Primitive$
|
|
62
|
-
type Value$
|
|
63
|
-
type QueryValue$
|
|
64
|
-
type AnyQueryParams$
|
|
65
|
-
type HeaderValue$
|
|
66
|
-
type AnyHeaderParams$
|
|
67
|
-
type AnyBodyParams$
|
|
68
|
-
type ParsedRequest$
|
|
61
|
+
type Primitive$5 = string | number | boolean;
|
|
62
|
+
type Value$5<P extends Primitive$5> = P | P[] | Record<string, P>;
|
|
63
|
+
type QueryValue$5 = Value$5<string> | Value$5<boolean> | Value$5<number> | undefined;
|
|
64
|
+
type AnyQueryParams$5 = Record<string, QueryValue$5>;
|
|
65
|
+
type HeaderValue$5 = string | undefined;
|
|
66
|
+
type AnyHeaderParams$5 = Record<string, HeaderValue$5>;
|
|
67
|
+
type AnyBodyParams$5 = Record<string, any>;
|
|
68
|
+
type ParsedRequest$5 = {
|
|
69
69
|
method: string;
|
|
70
70
|
path: string;
|
|
71
|
-
query: AnyQueryParams$
|
|
72
|
-
headers: AnyHeaderParams$
|
|
73
|
-
body: AnyBodyParams$
|
|
71
|
+
query: AnyQueryParams$5;
|
|
72
|
+
headers: AnyHeaderParams$5;
|
|
73
|
+
body: AnyBodyParams$5;
|
|
74
74
|
};
|
|
75
|
-
declare const toAxiosRequest$
|
|
75
|
+
declare const toAxiosRequest$5: (req: ParsedRequest$5) => AxiosRequestConfig;
|
|
76
76
|
|
|
77
77
|
interface CreateConversationRequestHeaders$1 {
|
|
78
78
|
}
|
|
@@ -3149,14 +3149,14 @@ type TrackAnalyticsInput$1 = TrackAnalyticsRequestBody$1 & TrackAnalyticsRequest
|
|
|
3149
3149
|
interface TrackAnalyticsResponse$1 {
|
|
3150
3150
|
}
|
|
3151
3151
|
|
|
3152
|
-
type ClientProps$
|
|
3153
|
-
toAxiosRequest: typeof toAxiosRequest$
|
|
3154
|
-
toApiError: typeof toApiError$
|
|
3152
|
+
type ClientProps$b = {
|
|
3153
|
+
toAxiosRequest: typeof toAxiosRequest$5;
|
|
3154
|
+
toApiError: typeof toApiError$5;
|
|
3155
3155
|
};
|
|
3156
|
-
declare class Client$
|
|
3156
|
+
declare class Client$b {
|
|
3157
3157
|
private axiosInstance;
|
|
3158
3158
|
private props;
|
|
3159
|
-
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps$
|
|
3159
|
+
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps$b>);
|
|
3160
3160
|
readonly createConversation: (input: CreateConversationInput$1) => Promise<CreateConversationResponse$1>;
|
|
3161
3161
|
readonly getConversation: (input: GetConversationInput$1) => Promise<GetConversationResponse$1>;
|
|
3162
3162
|
readonly listConversations: (input: ListConversationsInput$1) => Promise<ListConversationsResponse$1>;
|
|
@@ -3206,21 +3206,21 @@ declare class Client$9 {
|
|
|
3206
3206
|
readonly listTagValues: (input: ListTagValuesInput$1) => Promise<ListTagValuesResponse$1>;
|
|
3207
3207
|
readonly trackAnalytics: (input: TrackAnalyticsInput$1) => Promise<TrackAnalyticsResponse$1>;
|
|
3208
3208
|
}
|
|
3209
|
-
declare function toApiError$
|
|
3209
|
+
declare function toApiError$5(err: unknown): Error;
|
|
3210
3210
|
|
|
3211
|
-
type IClient$
|
|
3212
|
-
type Operation$
|
|
3213
|
-
type ClientInputs$
|
|
3214
|
-
type ClientOutputs$
|
|
3215
|
-
type ClientProps$
|
|
3211
|
+
type IClient$5 = Simplify<Client$b>;
|
|
3212
|
+
type Operation$5 = Operation$6<IClient$5>;
|
|
3213
|
+
type ClientInputs$5 = Inputs<IClient$5>;
|
|
3214
|
+
type ClientOutputs$5 = Outputs<IClient$5>;
|
|
3215
|
+
type ClientProps$a = CommonClientProps & {
|
|
3216
3216
|
token: string;
|
|
3217
3217
|
botId: string;
|
|
3218
3218
|
integrationId?: string;
|
|
3219
3219
|
integrationAlias?: string;
|
|
3220
3220
|
};
|
|
3221
|
-
declare class Client$
|
|
3221
|
+
declare class Client$a extends Client$b {
|
|
3222
3222
|
readonly config: Readonly<ClientConfig>;
|
|
3223
|
-
constructor(clientProps: ClientProps$
|
|
3223
|
+
constructor(clientProps: ClientProps$a);
|
|
3224
3224
|
get list(): {
|
|
3225
3225
|
conversations: (props: {
|
|
3226
3226
|
tags?: {
|
|
@@ -3352,25 +3352,25 @@ declare class Client$8 extends Client$9 {
|
|
|
3352
3352
|
};
|
|
3353
3353
|
}
|
|
3354
3354
|
|
|
3355
|
-
declare namespace index$
|
|
3356
|
-
export { Client$
|
|
3355
|
+
declare namespace index$4 {
|
|
3356
|
+
export { Client$a as Client, type ClientInputs$5 as ClientInputs, type ClientOutputs$5 as ClientOutputs, type ClientProps$a as ClientProps, type Operation$5 as Operation };
|
|
3357
3357
|
}
|
|
3358
3358
|
|
|
3359
|
-
type Primitive$
|
|
3360
|
-
type Value$
|
|
3361
|
-
type QueryValue$
|
|
3362
|
-
type AnyQueryParams$
|
|
3363
|
-
type HeaderValue$
|
|
3364
|
-
type AnyHeaderParams$
|
|
3365
|
-
type AnyBodyParams$
|
|
3366
|
-
type ParsedRequest$
|
|
3359
|
+
type Primitive$4 = string | number | boolean;
|
|
3360
|
+
type Value$4<P extends Primitive$4> = P | P[] | Record<string, P>;
|
|
3361
|
+
type QueryValue$4 = Value$4<string> | Value$4<boolean> | Value$4<number> | undefined;
|
|
3362
|
+
type AnyQueryParams$4 = Record<string, QueryValue$4>;
|
|
3363
|
+
type HeaderValue$4 = string | undefined;
|
|
3364
|
+
type AnyHeaderParams$4 = Record<string, HeaderValue$4>;
|
|
3365
|
+
type AnyBodyParams$4 = Record<string, any>;
|
|
3366
|
+
type ParsedRequest$4 = {
|
|
3367
3367
|
method: string;
|
|
3368
3368
|
path: string;
|
|
3369
|
-
query: AnyQueryParams$
|
|
3370
|
-
headers: AnyHeaderParams$
|
|
3371
|
-
body: AnyBodyParams$
|
|
3369
|
+
query: AnyQueryParams$4;
|
|
3370
|
+
headers: AnyHeaderParams$4;
|
|
3371
|
+
body: AnyBodyParams$4;
|
|
3372
3372
|
};
|
|
3373
|
-
declare const toAxiosRequest$
|
|
3373
|
+
declare const toAxiosRequest$4: (req: ParsedRequest$4) => AxiosRequestConfig;
|
|
3374
3374
|
|
|
3375
3375
|
interface RunVrlRequestHeaders$1 {
|
|
3376
3376
|
}
|
|
@@ -14689,14 +14689,14 @@ interface IntrospectResponse$1 {
|
|
|
14689
14689
|
userId: string;
|
|
14690
14690
|
}
|
|
14691
14691
|
|
|
14692
|
-
type ClientProps$
|
|
14693
|
-
toAxiosRequest: typeof toAxiosRequest$
|
|
14694
|
-
toApiError: typeof toApiError$
|
|
14692
|
+
type ClientProps$9 = {
|
|
14693
|
+
toAxiosRequest: typeof toAxiosRequest$4;
|
|
14694
|
+
toApiError: typeof toApiError$4;
|
|
14695
14695
|
};
|
|
14696
|
-
declare class Client$
|
|
14696
|
+
declare class Client$9 {
|
|
14697
14697
|
private axiosInstance;
|
|
14698
14698
|
private props;
|
|
14699
|
-
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps$
|
|
14699
|
+
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps$9>);
|
|
14700
14700
|
readonly runVrl: (input: RunVrlInput$1) => Promise<RunVrlResponse$1>;
|
|
14701
14701
|
readonly getAccount: (input: GetAccountInput$1) => Promise<GetAccountResponse$1>;
|
|
14702
14702
|
readonly updateAccount: (input: UpdateAccountInput$1) => Promise<UpdateAccountResponse$1>;
|
|
@@ -14806,19 +14806,19 @@ declare class Client$7 {
|
|
|
14806
14806
|
readonly listActivities: (input: ListActivitiesInput$1) => Promise<ListActivitiesResponse$1>;
|
|
14807
14807
|
readonly introspect: (input: IntrospectInput$1) => Promise<IntrospectResponse$1>;
|
|
14808
14808
|
}
|
|
14809
|
-
declare function toApiError$
|
|
14809
|
+
declare function toApiError$4(err: unknown): Error;
|
|
14810
14810
|
|
|
14811
|
-
type IClient$
|
|
14812
|
-
type Operation$
|
|
14813
|
-
type ClientInputs$
|
|
14814
|
-
type ClientOutputs$
|
|
14815
|
-
type ClientProps$
|
|
14811
|
+
type IClient$4 = Simplify<Client$9>;
|
|
14812
|
+
type Operation$4 = Operation$6<IClient$4>;
|
|
14813
|
+
type ClientInputs$4 = Inputs<IClient$4>;
|
|
14814
|
+
type ClientOutputs$4 = Outputs<IClient$4>;
|
|
14815
|
+
type ClientProps$8 = CommonClientProps & {
|
|
14816
14816
|
workspaceId?: string;
|
|
14817
14817
|
token: string;
|
|
14818
14818
|
};
|
|
14819
|
-
declare class Client$
|
|
14819
|
+
declare class Client$8 extends Client$9 {
|
|
14820
14820
|
readonly config: Readonly<ClientConfig>;
|
|
14821
|
-
constructor(clientProps: ClientProps$
|
|
14821
|
+
constructor(clientProps: ClientProps$8);
|
|
14822
14822
|
get list(): {
|
|
14823
14823
|
publicIntegrations: (props: {
|
|
14824
14824
|
search?: string | undefined;
|
|
@@ -15012,6 +15012,319 @@ declare class Client$6 extends Client$7 {
|
|
|
15012
15012
|
};
|
|
15013
15013
|
}
|
|
15014
15014
|
|
|
15015
|
+
declare namespace index$3 {
|
|
15016
|
+
export { Client$8 as Client, type ClientInputs$4 as ClientInputs, type ClientOutputs$4 as ClientOutputs, type ClientProps$8 as ClientProps, type Operation$4 as Operation };
|
|
15017
|
+
}
|
|
15018
|
+
|
|
15019
|
+
type Primitive$3 = string | number | boolean;
|
|
15020
|
+
type Value$3<P extends Primitive$3> = P | P[] | Record<string, P>;
|
|
15021
|
+
type QueryValue$3 = Value$3<string> | Value$3<boolean> | Value$3<number> | undefined;
|
|
15022
|
+
type AnyQueryParams$3 = Record<string, QueryValue$3>;
|
|
15023
|
+
type HeaderValue$3 = string | undefined;
|
|
15024
|
+
type AnyHeaderParams$3 = Record<string, HeaderValue$3>;
|
|
15025
|
+
type AnyBodyParams$3 = Record<string, any>;
|
|
15026
|
+
type ParsedRequest$3 = {
|
|
15027
|
+
method: string;
|
|
15028
|
+
path: string;
|
|
15029
|
+
query: AnyQueryParams$3;
|
|
15030
|
+
headers: AnyHeaderParams$3;
|
|
15031
|
+
body: AnyBodyParams$3;
|
|
15032
|
+
};
|
|
15033
|
+
declare const toAxiosRequest$3: (req: ParsedRequest$3) => AxiosRequestConfig;
|
|
15034
|
+
|
|
15035
|
+
interface GetPlanRequestHeaders {
|
|
15036
|
+
}
|
|
15037
|
+
interface GetPlanRequestQuery {
|
|
15038
|
+
}
|
|
15039
|
+
interface GetPlanRequestParams {
|
|
15040
|
+
planId: string;
|
|
15041
|
+
}
|
|
15042
|
+
interface GetPlanRequestBody {
|
|
15043
|
+
}
|
|
15044
|
+
type GetPlanInput = GetPlanRequestBody & GetPlanRequestHeaders & GetPlanRequestQuery & GetPlanRequestParams;
|
|
15045
|
+
interface GetPlanResponse {
|
|
15046
|
+
id: string;
|
|
15047
|
+
name: string;
|
|
15048
|
+
description: string;
|
|
15049
|
+
providerProductId: string;
|
|
15050
|
+
prices: {
|
|
15051
|
+
[k: string]: {
|
|
15052
|
+
providerPriceId: string;
|
|
15053
|
+
amount: number;
|
|
15054
|
+
currency: "usd";
|
|
15055
|
+
interval: "month" | "year";
|
|
15056
|
+
metadata?: {
|
|
15057
|
+
[k: string]: string;
|
|
15058
|
+
};
|
|
15059
|
+
};
|
|
15060
|
+
};
|
|
15061
|
+
features: {
|
|
15062
|
+
[k: string]: any;
|
|
15063
|
+
};
|
|
15064
|
+
metadata?: {
|
|
15065
|
+
[k: string]: string;
|
|
15066
|
+
};
|
|
15067
|
+
}
|
|
15068
|
+
|
|
15069
|
+
interface ListPlansRequestHeaders {
|
|
15070
|
+
}
|
|
15071
|
+
interface ListPlansRequestQuery {
|
|
15072
|
+
}
|
|
15073
|
+
interface ListPlansRequestParams {
|
|
15074
|
+
}
|
|
15075
|
+
interface ListPlansRequestBody {
|
|
15076
|
+
}
|
|
15077
|
+
type ListPlansInput = ListPlansRequestBody & ListPlansRequestHeaders & ListPlansRequestQuery & ListPlansRequestParams;
|
|
15078
|
+
type ListPlansResponse = {
|
|
15079
|
+
id: string;
|
|
15080
|
+
name: string;
|
|
15081
|
+
description: string;
|
|
15082
|
+
providerProductId: string;
|
|
15083
|
+
prices: {
|
|
15084
|
+
[k: string]: {
|
|
15085
|
+
providerPriceId: string;
|
|
15086
|
+
amount: number;
|
|
15087
|
+
currency: "usd";
|
|
15088
|
+
interval: "month" | "year";
|
|
15089
|
+
metadata?: {
|
|
15090
|
+
[k: string]: string;
|
|
15091
|
+
};
|
|
15092
|
+
};
|
|
15093
|
+
};
|
|
15094
|
+
features: {
|
|
15095
|
+
[k: string]: any | null;
|
|
15096
|
+
};
|
|
15097
|
+
metadata?: {
|
|
15098
|
+
[k: string]: string;
|
|
15099
|
+
};
|
|
15100
|
+
}[];
|
|
15101
|
+
|
|
15102
|
+
interface GetAddonRequestHeaders {
|
|
15103
|
+
}
|
|
15104
|
+
interface GetAddonRequestQuery {
|
|
15105
|
+
}
|
|
15106
|
+
interface GetAddonRequestParams {
|
|
15107
|
+
addonId: string;
|
|
15108
|
+
}
|
|
15109
|
+
interface GetAddonRequestBody {
|
|
15110
|
+
}
|
|
15111
|
+
type GetAddonInput = GetAddonRequestBody & GetAddonRequestHeaders & GetAddonRequestQuery & GetAddonRequestParams;
|
|
15112
|
+
interface GetAddonResponse {
|
|
15113
|
+
id: string;
|
|
15114
|
+
name: string;
|
|
15115
|
+
description: string;
|
|
15116
|
+
providerProductId: string;
|
|
15117
|
+
prices: {
|
|
15118
|
+
[k: string]: {
|
|
15119
|
+
providerPriceId: string;
|
|
15120
|
+
amount: number;
|
|
15121
|
+
currency: "usd";
|
|
15122
|
+
interval: "month" | "year";
|
|
15123
|
+
metadata?: {
|
|
15124
|
+
[k: string]: string;
|
|
15125
|
+
};
|
|
15126
|
+
};
|
|
15127
|
+
};
|
|
15128
|
+
feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
15129
|
+
increment: number;
|
|
15130
|
+
metadata?: {
|
|
15131
|
+
[k: string]: string;
|
|
15132
|
+
};
|
|
15133
|
+
}
|
|
15134
|
+
|
|
15135
|
+
interface ListAddonsRequestHeaders {
|
|
15136
|
+
}
|
|
15137
|
+
interface ListAddonsRequestQuery {
|
|
15138
|
+
}
|
|
15139
|
+
interface ListAddonsRequestParams {
|
|
15140
|
+
}
|
|
15141
|
+
interface ListAddonsRequestBody {
|
|
15142
|
+
}
|
|
15143
|
+
type ListAddonsInput = ListAddonsRequestBody & ListAddonsRequestHeaders & ListAddonsRequestQuery & ListAddonsRequestParams;
|
|
15144
|
+
type ListAddonsResponse = {
|
|
15145
|
+
id: string;
|
|
15146
|
+
name: string;
|
|
15147
|
+
description: string;
|
|
15148
|
+
providerProductId: string;
|
|
15149
|
+
prices: {
|
|
15150
|
+
[k: string]: {
|
|
15151
|
+
providerPriceId: string;
|
|
15152
|
+
amount: number;
|
|
15153
|
+
currency: "usd";
|
|
15154
|
+
interval: "month" | "year";
|
|
15155
|
+
metadata?: {
|
|
15156
|
+
[k: string]: string;
|
|
15157
|
+
};
|
|
15158
|
+
};
|
|
15159
|
+
};
|
|
15160
|
+
feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
15161
|
+
increment: number;
|
|
15162
|
+
metadata?: {
|
|
15163
|
+
[k: string]: string;
|
|
15164
|
+
};
|
|
15165
|
+
}[];
|
|
15166
|
+
|
|
15167
|
+
interface ListInvoicesRequestHeaders {
|
|
15168
|
+
}
|
|
15169
|
+
interface ListInvoicesRequestQuery {
|
|
15170
|
+
nextToken?: string;
|
|
15171
|
+
}
|
|
15172
|
+
interface ListInvoicesRequestParams {
|
|
15173
|
+
}
|
|
15174
|
+
interface ListInvoicesRequestBody {
|
|
15175
|
+
}
|
|
15176
|
+
type ListInvoicesInput = ListInvoicesRequestBody & ListInvoicesRequestHeaders & ListInvoicesRequestQuery & ListInvoicesRequestParams;
|
|
15177
|
+
/**
|
|
15178
|
+
* List of invoices with pagination.
|
|
15179
|
+
*/
|
|
15180
|
+
interface ListInvoicesResponse {
|
|
15181
|
+
invoices: {
|
|
15182
|
+
id: string;
|
|
15183
|
+
amount: number;
|
|
15184
|
+
currency: string;
|
|
15185
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
15186
|
+
createdAt: string;
|
|
15187
|
+
periodStart: string | null;
|
|
15188
|
+
periodEnd: string | null;
|
|
15189
|
+
dueDate: string | null;
|
|
15190
|
+
pdfUrl: string | null;
|
|
15191
|
+
}[];
|
|
15192
|
+
meta: {
|
|
15193
|
+
/**
|
|
15194
|
+
* The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.
|
|
15195
|
+
*/
|
|
15196
|
+
nextToken?: string;
|
|
15197
|
+
};
|
|
15198
|
+
}
|
|
15199
|
+
|
|
15200
|
+
interface PayInvoiceRequestHeaders {
|
|
15201
|
+
}
|
|
15202
|
+
interface PayInvoiceRequestQuery {
|
|
15203
|
+
}
|
|
15204
|
+
interface PayInvoiceRequestParams {
|
|
15205
|
+
invoiceId: string;
|
|
15206
|
+
}
|
|
15207
|
+
interface PayInvoiceRequestBody {
|
|
15208
|
+
idempotencyKey?: string;
|
|
15209
|
+
}
|
|
15210
|
+
type PayInvoiceInput = PayInvoiceRequestBody & PayInvoiceRequestHeaders & PayInvoiceRequestQuery & PayInvoiceRequestParams;
|
|
15211
|
+
interface PayInvoiceResponse {
|
|
15212
|
+
id: string;
|
|
15213
|
+
amount: number;
|
|
15214
|
+
currency: string;
|
|
15215
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
15216
|
+
createdAt: string;
|
|
15217
|
+
periodStart: string | null;
|
|
15218
|
+
periodEnd: string | null;
|
|
15219
|
+
dueDate: string | null;
|
|
15220
|
+
pdfUrl: string | null;
|
|
15221
|
+
}
|
|
15222
|
+
|
|
15223
|
+
interface GetPaymentMethodRequestHeaders {
|
|
15224
|
+
}
|
|
15225
|
+
interface GetPaymentMethodRequestQuery {
|
|
15226
|
+
}
|
|
15227
|
+
interface GetPaymentMethodRequestParams {
|
|
15228
|
+
}
|
|
15229
|
+
interface GetPaymentMethodRequestBody {
|
|
15230
|
+
}
|
|
15231
|
+
type GetPaymentMethodInput = GetPaymentMethodRequestBody & GetPaymentMethodRequestHeaders & GetPaymentMethodRequestQuery & GetPaymentMethodRequestParams;
|
|
15232
|
+
interface GetPaymentMethodResponse {
|
|
15233
|
+
paymentMethod: {
|
|
15234
|
+
id: string;
|
|
15235
|
+
type: string;
|
|
15236
|
+
card: {
|
|
15237
|
+
brand: string;
|
|
15238
|
+
lastFour: string;
|
|
15239
|
+
expMonth: number;
|
|
15240
|
+
expYear: number;
|
|
15241
|
+
} | null;
|
|
15242
|
+
} | null;
|
|
15243
|
+
}
|
|
15244
|
+
|
|
15245
|
+
interface SetPaymentMethodRequestHeaders {
|
|
15246
|
+
}
|
|
15247
|
+
interface SetPaymentMethodRequestQuery {
|
|
15248
|
+
}
|
|
15249
|
+
interface SetPaymentMethodRequestParams {
|
|
15250
|
+
}
|
|
15251
|
+
interface SetPaymentMethodRequestBody {
|
|
15252
|
+
/**
|
|
15253
|
+
* Stripe payment method ID
|
|
15254
|
+
*/
|
|
15255
|
+
paymentMethodId: string;
|
|
15256
|
+
}
|
|
15257
|
+
type SetPaymentMethodInput = SetPaymentMethodRequestBody & SetPaymentMethodRequestHeaders & SetPaymentMethodRequestQuery & SetPaymentMethodRequestParams;
|
|
15258
|
+
interface SetPaymentMethodResponse {
|
|
15259
|
+
id: string;
|
|
15260
|
+
type: string;
|
|
15261
|
+
card: {
|
|
15262
|
+
brand: string;
|
|
15263
|
+
lastFour: string;
|
|
15264
|
+
expMonth: number;
|
|
15265
|
+
expYear: number;
|
|
15266
|
+
} | null;
|
|
15267
|
+
}
|
|
15268
|
+
|
|
15269
|
+
interface CreatePaymentMethodIntentRequestHeaders {
|
|
15270
|
+
}
|
|
15271
|
+
interface CreatePaymentMethodIntentRequestQuery {
|
|
15272
|
+
}
|
|
15273
|
+
interface CreatePaymentMethodIntentRequestParams {
|
|
15274
|
+
}
|
|
15275
|
+
interface CreatePaymentMethodIntentRequestBody {
|
|
15276
|
+
}
|
|
15277
|
+
type CreatePaymentMethodIntentInput = CreatePaymentMethodIntentRequestBody & CreatePaymentMethodIntentRequestHeaders & CreatePaymentMethodIntentRequestQuery & CreatePaymentMethodIntentRequestParams;
|
|
15278
|
+
interface CreatePaymentMethodIntentResponse {
|
|
15279
|
+
clientSecret: string;
|
|
15280
|
+
}
|
|
15281
|
+
|
|
15282
|
+
type ClientProps$7 = {
|
|
15283
|
+
toAxiosRequest: typeof toAxiosRequest$3;
|
|
15284
|
+
toApiError: typeof toApiError$3;
|
|
15285
|
+
};
|
|
15286
|
+
declare class Client$7 {
|
|
15287
|
+
private axiosInstance;
|
|
15288
|
+
private props;
|
|
15289
|
+
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps$7>);
|
|
15290
|
+
readonly getPlan: (input: GetPlanInput) => Promise<GetPlanResponse>;
|
|
15291
|
+
readonly listPlans: (input: ListPlansInput) => Promise<ListPlansResponse>;
|
|
15292
|
+
readonly getAddon: (input: GetAddonInput) => Promise<GetAddonResponse>;
|
|
15293
|
+
readonly listAddons: (input: ListAddonsInput) => Promise<ListAddonsResponse>;
|
|
15294
|
+
readonly listInvoices: (input: ListInvoicesInput) => Promise<ListInvoicesResponse>;
|
|
15295
|
+
readonly payInvoice: (input: PayInvoiceInput) => Promise<PayInvoiceResponse>;
|
|
15296
|
+
readonly getPaymentMethod: (input: GetPaymentMethodInput) => Promise<GetPaymentMethodResponse>;
|
|
15297
|
+
readonly setPaymentMethod: (input: SetPaymentMethodInput) => Promise<SetPaymentMethodResponse>;
|
|
15298
|
+
readonly createPaymentMethodIntent: (input: CreatePaymentMethodIntentInput) => Promise<CreatePaymentMethodIntentResponse>;
|
|
15299
|
+
}
|
|
15300
|
+
declare function toApiError$3(err: unknown): Error;
|
|
15301
|
+
|
|
15302
|
+
type IClient$3 = Simplify<Client$7>;
|
|
15303
|
+
type Operation$3 = Operation$6<IClient$3>;
|
|
15304
|
+
type ClientInputs$3 = Inputs<IClient$3>;
|
|
15305
|
+
type ClientOutputs$3 = Outputs<IClient$3>;
|
|
15306
|
+
type ClientProps$6 = CommonClientProps & {
|
|
15307
|
+
workspaceId: string;
|
|
15308
|
+
token: string;
|
|
15309
|
+
};
|
|
15310
|
+
declare class Client$6 extends Client$7 {
|
|
15311
|
+
readonly config: Readonly<ClientConfig>;
|
|
15312
|
+
constructor(clientProps: ClientProps$6);
|
|
15313
|
+
get list(): {
|
|
15314
|
+
listInvoices: (props: {}) => AsyncCollection<{
|
|
15315
|
+
id: string;
|
|
15316
|
+
amount: number;
|
|
15317
|
+
currency: string;
|
|
15318
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
15319
|
+
createdAt: string;
|
|
15320
|
+
periodStart: string | null;
|
|
15321
|
+
periodEnd: string | null;
|
|
15322
|
+
dueDate: string | null;
|
|
15323
|
+
pdfUrl: string | null;
|
|
15324
|
+
}>;
|
|
15325
|
+
};
|
|
15326
|
+
}
|
|
15327
|
+
|
|
15015
15328
|
declare namespace index$2 {
|
|
15016
15329
|
export { Client$6 as Client, type ClientInputs$3 as ClientInputs, type ClientOutputs$3 as ClientOutputs, type ClientProps$6 as ClientProps, type Operation$3 as Operation };
|
|
15017
15330
|
}
|
|
@@ -16153,7 +16466,7 @@ type UploadFileOutput = UpsertFileResponse$1;
|
|
|
16153
16466
|
type IClient$2 = Simplify<Client$5 & {
|
|
16154
16467
|
uploadFile: (input: UploadFileInput) => Promise<UploadFileOutput>;
|
|
16155
16468
|
}>;
|
|
16156
|
-
type Operation$2 = Operation$
|
|
16469
|
+
type Operation$2 = Operation$6<IClient$2>;
|
|
16157
16470
|
type ClientInputs$2 = Inputs<IClient$2>;
|
|
16158
16471
|
type ClientOutputs$2 = Outputs<IClient$2>;
|
|
16159
16472
|
type ClientProps$4 = CommonClientProps & {
|
|
@@ -17958,7 +18271,7 @@ declare class Client$3 {
|
|
|
17958
18271
|
declare function toApiError$1(err: unknown): Error;
|
|
17959
18272
|
|
|
17960
18273
|
type IClient$1 = Simplify<Client$3>;
|
|
17961
|
-
type Operation$1 = Operation$
|
|
18274
|
+
type Operation$1 = Operation$6<IClient$1>;
|
|
17962
18275
|
type ClientInputs$1 = Inputs<IClient$1>;
|
|
17963
18276
|
type ClientOutputs$1 = Outputs<IClient$1>;
|
|
17964
18277
|
type ClientProps$2 = CommonClientProps & {
|
|
@@ -37264,7 +37577,7 @@ declare function toApiError(err: unknown): Error;
|
|
|
37264
37577
|
type IClient = Simplify<Client$1 & {
|
|
37265
37578
|
uploadFile: (input: UploadFileInput) => Promise<UploadFileOutput>;
|
|
37266
37579
|
}>;
|
|
37267
|
-
type Operation = Operation$
|
|
37580
|
+
type Operation = Operation$6<IClient>;
|
|
37268
37581
|
type ClientInputs = Inputs<IClient>;
|
|
37269
37582
|
type ClientOutputs = Outputs<IClient>;
|
|
37270
37583
|
type ClientProps = CommonClientProps & {
|
|
@@ -37963,4 +38276,4 @@ declare class UploadFileError extends Error {
|
|
|
37963
38276
|
constructor(message: string, innerError?: AxiosError | undefined, file?: UpsertFileResponse["file"] | undefined);
|
|
37964
38277
|
}
|
|
37965
38278
|
|
|
37966
|
-
export { type Account, type Activity, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientProps, type Column, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type Headers, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, type Plugin, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceGoneError, ResourceLockedConflictError, ResourceNotFoundError, type RetryConfig, type Row, RuntimeError, type State, type Table, type Task, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Version, type Workflow, type Workspace, type WorkspaceMember, index$
|
|
38279
|
+
export { type Account, type Activity, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientProps, type Column, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type Headers, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, type Plugin, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceGoneError, ResourceLockedConflictError, ResourceNotFoundError, type RetryConfig, type Row, RuntimeError, type State, type Table, type Task, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Version, type Workflow, type Workspace, type WorkspaceMember, index$3 as admin, index$2 as billing, errorFrom, index$1 as files, isApiError, index$4 as runtime, index as tables };
|