@journeybee/sdk 0.1.0 → 0.2.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/README.md +28 -5
- package/dist/capabilities.d.ts +12568 -0
- package/dist/capabilities.js +14259 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/idempotency-DYvhz7s4.d.ts +344 -0
- package/dist/index.d.ts +21515 -7
- package/dist/index.js +3026 -5
- package/dist/index.js.map +1 -1
- package/dist/partner-capabilities.d.ts +527 -0
- package/dist/partner-capabilities.js +530 -0
- package/dist/partner-capabilities.js.map +1 -0
- package/dist/partner.d.ts +1926 -0
- package/dist/partner.js +1698 -0
- package/dist/partner.js.map +1 -0
- package/package.json +25 -11
- package/dist/generated/client.gen.d.ts +0 -13
- package/dist/generated/client.gen.d.ts.map +0 -1
- package/dist/generated/client.gen.js +0 -6
- package/dist/generated/client.gen.js.map +0 -1
- package/dist/generated/index.d.ts +0 -3
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -4
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/sdk.gen.d.ts +0 -6555
- package/dist/generated/sdk.gen.d.ts.map +0 -1
- package/dist/generated/sdk.gen.js +0 -4647
- package/dist/generated/sdk.gen.js.map +0 -1
- package/dist/generated/types.gen.d.ts +0 -15735
- package/dist/generated/types.gen.d.ts.map +0 -1
- package/dist/generated/types.gen.js +0 -3
- package/dist/generated/types.gen.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
|
@@ -0,0 +1,1926 @@
|
|
|
1
|
+
export { L as LogicalOperationId, d as addIdempotencyInterceptor, f as createIdempotentClient, g as createLogicalOperationId, i as idempotencyHeaders } from './idempotency-DYvhz7s4.js';
|
|
2
|
+
export { CapabilityDescriptor } from './partner-capabilities.js';
|
|
3
|
+
|
|
4
|
+
type AuthToken = string | undefined;
|
|
5
|
+
interface Auth {
|
|
6
|
+
/**
|
|
7
|
+
* Which part of the request do we use to send the auth?
|
|
8
|
+
*
|
|
9
|
+
* @default 'header'
|
|
10
|
+
*/
|
|
11
|
+
in?: 'header' | 'query' | 'cookie';
|
|
12
|
+
/**
|
|
13
|
+
* A unique identifier for the security scheme.
|
|
14
|
+
*
|
|
15
|
+
* Defined only when there are multiple security schemes whose `Auth`
|
|
16
|
+
* shape would otherwise be identical.
|
|
17
|
+
*/
|
|
18
|
+
key?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Header or query parameter name.
|
|
21
|
+
*
|
|
22
|
+
* @default 'Authorization'
|
|
23
|
+
*/
|
|
24
|
+
name?: string;
|
|
25
|
+
scheme?: 'basic' | 'bearer';
|
|
26
|
+
type: 'apiKey' | 'http';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface SerializerOptions<T> {
|
|
30
|
+
/**
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
explode: boolean;
|
|
34
|
+
style: T;
|
|
35
|
+
}
|
|
36
|
+
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
37
|
+
type ObjectStyle = 'form' | 'deepObject';
|
|
38
|
+
|
|
39
|
+
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
40
|
+
type BodySerializer = (body: unknown) => unknown;
|
|
41
|
+
type QuerySerializerOptionsObject = {
|
|
42
|
+
allowReserved?: boolean;
|
|
43
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
44
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
45
|
+
};
|
|
46
|
+
type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
47
|
+
/**
|
|
48
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
49
|
+
* override the global array/object settings for specific parameter names.
|
|
50
|
+
*/
|
|
51
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
55
|
+
type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
56
|
+
/**
|
|
57
|
+
* Returns the final request URL.
|
|
58
|
+
*/
|
|
59
|
+
buildUrl: BuildUrlFn;
|
|
60
|
+
getConfig: () => Config;
|
|
61
|
+
request: RequestFn;
|
|
62
|
+
setConfig: (config: Config) => Config;
|
|
63
|
+
} & {
|
|
64
|
+
[K in HttpMethod]: MethodFn;
|
|
65
|
+
} & ([SseFn] extends [never] ? {
|
|
66
|
+
sse?: never;
|
|
67
|
+
} : {
|
|
68
|
+
sse: {
|
|
69
|
+
[K in HttpMethod]: SseFn;
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
interface Config$1 {
|
|
73
|
+
/**
|
|
74
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
75
|
+
* added to the request payload as defined by its `security` array.
|
|
76
|
+
*/
|
|
77
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
78
|
+
/**
|
|
79
|
+
* A function for serializing request body parameter. By default,
|
|
80
|
+
* {@link JSON.stringify()} will be used.
|
|
81
|
+
*/
|
|
82
|
+
bodySerializer?: BodySerializer | null;
|
|
83
|
+
/**
|
|
84
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
85
|
+
* `Headers` object with.
|
|
86
|
+
*
|
|
87
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
88
|
+
*/
|
|
89
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
90
|
+
/**
|
|
91
|
+
* The request method.
|
|
92
|
+
*
|
|
93
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
94
|
+
*/
|
|
95
|
+
method?: Uppercase<HttpMethod>;
|
|
96
|
+
/**
|
|
97
|
+
* A function for serializing request query parameters. By default, arrays
|
|
98
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
99
|
+
* style, and reserved characters are percent-encoded.
|
|
100
|
+
*
|
|
101
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
102
|
+
* API function is used.
|
|
103
|
+
*
|
|
104
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
105
|
+
*/
|
|
106
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
107
|
+
/**
|
|
108
|
+
* A function validating request data. This is useful if you want to ensure
|
|
109
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
110
|
+
* the server.
|
|
111
|
+
*/
|
|
112
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
113
|
+
/**
|
|
114
|
+
* A function transforming response data before it's returned. This is useful
|
|
115
|
+
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
116
|
+
*/
|
|
117
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* A function validating response data. This is useful if you want to ensure
|
|
120
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
121
|
+
* the transformers and returned to the user.
|
|
122
|
+
*/
|
|
123
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
132
|
+
/**
|
|
133
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
134
|
+
* fetch instance.
|
|
135
|
+
*
|
|
136
|
+
* @default globalThis.fetch
|
|
137
|
+
*/
|
|
138
|
+
fetch?: typeof fetch;
|
|
139
|
+
/**
|
|
140
|
+
* Implementing clients can call request interceptors inside this hook.
|
|
141
|
+
*/
|
|
142
|
+
onRequest?: (url: string, init: RequestInit) => Promise<Request>;
|
|
143
|
+
/**
|
|
144
|
+
* Callback invoked when a network or parsing error occurs during streaming.
|
|
145
|
+
*
|
|
146
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
147
|
+
*
|
|
148
|
+
* @param error The error that occurred.
|
|
149
|
+
*/
|
|
150
|
+
onSseError?: (error: unknown) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Callback invoked when an event is streamed from the server.
|
|
153
|
+
*
|
|
154
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
155
|
+
*
|
|
156
|
+
* @param event Event streamed from the server.
|
|
157
|
+
* @returns Nothing (void).
|
|
158
|
+
*/
|
|
159
|
+
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
160
|
+
serializedBody?: RequestInit['body'];
|
|
161
|
+
/**
|
|
162
|
+
* Default retry delay in milliseconds.
|
|
163
|
+
*
|
|
164
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
165
|
+
*
|
|
166
|
+
* @default 3000
|
|
167
|
+
*/
|
|
168
|
+
sseDefaultRetryDelay?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Maximum number of retry attempts before giving up.
|
|
171
|
+
*/
|
|
172
|
+
sseMaxRetryAttempts?: number;
|
|
173
|
+
/**
|
|
174
|
+
* Maximum retry delay in milliseconds.
|
|
175
|
+
*
|
|
176
|
+
* Applies only when exponential backoff is used.
|
|
177
|
+
*
|
|
178
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
179
|
+
*
|
|
180
|
+
* @default 30000
|
|
181
|
+
*/
|
|
182
|
+
sseMaxRetryDelay?: number;
|
|
183
|
+
/**
|
|
184
|
+
* Optional sleep function for retry backoff.
|
|
185
|
+
*
|
|
186
|
+
* Defaults to using `setTimeout`.
|
|
187
|
+
*/
|
|
188
|
+
sseSleepFn?: (ms: number) => Promise<void>;
|
|
189
|
+
url: string;
|
|
190
|
+
};
|
|
191
|
+
interface StreamEvent<TData = unknown> {
|
|
192
|
+
data: TData;
|
|
193
|
+
event?: string;
|
|
194
|
+
id?: string;
|
|
195
|
+
retry?: number;
|
|
196
|
+
}
|
|
197
|
+
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
198
|
+
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
|
|
202
|
+
/** response may be undefined due to a network error where no response object is produced */
|
|
203
|
+
response: Res | undefined,
|
|
204
|
+
/** request may be undefined, because error may be from building the request object itself */
|
|
205
|
+
request: Req | undefined, options: Options) => Err | Promise<Err>;
|
|
206
|
+
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
207
|
+
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
208
|
+
declare class Interceptors<Interceptor> {
|
|
209
|
+
fns: Array<Interceptor | null>;
|
|
210
|
+
clear(): void;
|
|
211
|
+
eject(id: number | Interceptor): void;
|
|
212
|
+
exists(id: number | Interceptor): boolean;
|
|
213
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
214
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
215
|
+
use(fn: Interceptor): number;
|
|
216
|
+
}
|
|
217
|
+
interface Middleware<Req, Res, Err, Options> {
|
|
218
|
+
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
219
|
+
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
220
|
+
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
221
|
+
}
|
|
222
|
+
declare const createConfig: <T extends ClientOptions$1 = ClientOptions$1>(override?: Config<Omit<ClientOptions$1, keyof T> & T>) => Config<Omit<ClientOptions$1, keyof T> & T>;
|
|
223
|
+
|
|
224
|
+
type ResponseStyle = 'data' | 'fields';
|
|
225
|
+
interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
226
|
+
/**
|
|
227
|
+
* Base URL for all requests made by this client.
|
|
228
|
+
*/
|
|
229
|
+
baseUrl?: T['baseUrl'];
|
|
230
|
+
/**
|
|
231
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
232
|
+
* fetch instance.
|
|
233
|
+
*
|
|
234
|
+
* @default globalThis.fetch
|
|
235
|
+
*/
|
|
236
|
+
fetch?: typeof fetch;
|
|
237
|
+
/**
|
|
238
|
+
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
239
|
+
* options won't have any effect.
|
|
240
|
+
*
|
|
241
|
+
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
242
|
+
*/
|
|
243
|
+
next?: never;
|
|
244
|
+
/**
|
|
245
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
246
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
247
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
248
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
249
|
+
*
|
|
250
|
+
* @default 'auto'
|
|
251
|
+
*/
|
|
252
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
253
|
+
/**
|
|
254
|
+
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
255
|
+
*
|
|
256
|
+
* @default 'fields'
|
|
257
|
+
*/
|
|
258
|
+
responseStyle?: ResponseStyle;
|
|
259
|
+
/**
|
|
260
|
+
* Throw an error instead of returning it in the response?
|
|
261
|
+
*
|
|
262
|
+
* @default false
|
|
263
|
+
*/
|
|
264
|
+
throwOnError?: T['throwOnError'];
|
|
265
|
+
}
|
|
266
|
+
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
267
|
+
responseStyle: TResponseStyle;
|
|
268
|
+
throwOnError: ThrowOnError;
|
|
269
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
270
|
+
/**
|
|
271
|
+
* Any body that you want to add to your request.
|
|
272
|
+
*
|
|
273
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
274
|
+
*/
|
|
275
|
+
body?: unknown;
|
|
276
|
+
path?: Record<string, unknown>;
|
|
277
|
+
query?: Record<string, unknown>;
|
|
278
|
+
/**
|
|
279
|
+
* Security mechanism(s) to use for the request.
|
|
280
|
+
*/
|
|
281
|
+
security?: ReadonlyArray<Auth>;
|
|
282
|
+
url: Url;
|
|
283
|
+
}
|
|
284
|
+
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
285
|
+
headers: Headers;
|
|
286
|
+
serializedBody?: string;
|
|
287
|
+
}
|
|
288
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
289
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
290
|
+
request: Request;
|
|
291
|
+
response: Response;
|
|
292
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
293
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
294
|
+
error: undefined;
|
|
295
|
+
} | {
|
|
296
|
+
data: undefined;
|
|
297
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
298
|
+
}) & {
|
|
299
|
+
/** request may be undefined, because error may be from building the request object itself */
|
|
300
|
+
request?: Request;
|
|
301
|
+
/** response may be undefined, because error may be from building the request object itself or from a network error */
|
|
302
|
+
response?: Response;
|
|
303
|
+
}>;
|
|
304
|
+
interface ClientOptions$1 {
|
|
305
|
+
baseUrl?: string;
|
|
306
|
+
responseStyle?: ResponseStyle;
|
|
307
|
+
throwOnError?: boolean;
|
|
308
|
+
}
|
|
309
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
310
|
+
type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
|
|
311
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
312
|
+
type BuildUrlFn = <TData extends {
|
|
313
|
+
body?: unknown;
|
|
314
|
+
path?: Record<string, unknown>;
|
|
315
|
+
query?: Record<string, unknown>;
|
|
316
|
+
url: string;
|
|
317
|
+
}>(options: TData & Options$1<TData>) => string;
|
|
318
|
+
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
319
|
+
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
320
|
+
};
|
|
321
|
+
interface TDataShape {
|
|
322
|
+
body?: unknown;
|
|
323
|
+
headers?: unknown;
|
|
324
|
+
path?: unknown;
|
|
325
|
+
query?: unknown;
|
|
326
|
+
url: string;
|
|
327
|
+
}
|
|
328
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
329
|
+
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
330
|
+
|
|
331
|
+
declare const createClient: (config?: Config) => Client;
|
|
332
|
+
|
|
333
|
+
type ClientOptions = {
|
|
334
|
+
baseUrl: 'https://api.journeybee.io/v1' | (string & {});
|
|
335
|
+
};
|
|
336
|
+
type GetPartnerMeData = {
|
|
337
|
+
body?: never;
|
|
338
|
+
path?: never;
|
|
339
|
+
query?: never;
|
|
340
|
+
url: '/partner/me';
|
|
341
|
+
};
|
|
342
|
+
type GetPartnerMeResponses = {
|
|
343
|
+
/**
|
|
344
|
+
* Default Response
|
|
345
|
+
*/
|
|
346
|
+
200: {
|
|
347
|
+
user: {
|
|
348
|
+
id: string;
|
|
349
|
+
uuid: string;
|
|
350
|
+
email: string;
|
|
351
|
+
first_name: string | null;
|
|
352
|
+
last_name: string | null;
|
|
353
|
+
};
|
|
354
|
+
actor: 'partner';
|
|
355
|
+
permissions: {
|
|
356
|
+
read: boolean;
|
|
357
|
+
write: boolean;
|
|
358
|
+
};
|
|
359
|
+
modules: {
|
|
360
|
+
partner_api: boolean;
|
|
361
|
+
};
|
|
362
|
+
partnerships: Array<{
|
|
363
|
+
id: string;
|
|
364
|
+
uuid: string;
|
|
365
|
+
name: string | null;
|
|
366
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
367
|
+
status: 'invited' | 'not-invited' | 'accepted' | 'archived';
|
|
368
|
+
}>;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
type GetPartnerMeResponse = GetPartnerMeResponses[keyof GetPartnerMeResponses];
|
|
372
|
+
type ListPartnerLeadsData = {
|
|
373
|
+
body?: never;
|
|
374
|
+
path: {
|
|
375
|
+
partnershipId: string;
|
|
376
|
+
};
|
|
377
|
+
query?: {
|
|
378
|
+
search?: string;
|
|
379
|
+
status?: Array<'new' | 'converted' | 'rejected'>;
|
|
380
|
+
tags?: Array<string>;
|
|
381
|
+
users?: Array<string>;
|
|
382
|
+
assigned?: boolean;
|
|
383
|
+
unassigned?: boolean;
|
|
384
|
+
page?: number;
|
|
385
|
+
perPage?: number;
|
|
386
|
+
};
|
|
387
|
+
url: '/partner/{partnershipId}/leads';
|
|
388
|
+
};
|
|
389
|
+
type ListPartnerLeadsResponses = {
|
|
390
|
+
/**
|
|
391
|
+
* Default Response
|
|
392
|
+
*/
|
|
393
|
+
200: {
|
|
394
|
+
data: Array<{
|
|
395
|
+
uuid: string;
|
|
396
|
+
created_at: string;
|
|
397
|
+
updated_at: string;
|
|
398
|
+
source: string;
|
|
399
|
+
status: 'new' | 'converted' | 'rejected';
|
|
400
|
+
company_name: string | null;
|
|
401
|
+
first_name: string | null;
|
|
402
|
+
last_name: string | null;
|
|
403
|
+
email: string | null;
|
|
404
|
+
phone_number: string | null;
|
|
405
|
+
direction: 'sent' | 'received' | null;
|
|
406
|
+
lock_lead_status?: boolean;
|
|
407
|
+
partnership_id: string | null;
|
|
408
|
+
campaign_id: string | null;
|
|
409
|
+
campaign_title: string | null;
|
|
410
|
+
partnership: {
|
|
411
|
+
id: string;
|
|
412
|
+
uuid: string;
|
|
413
|
+
name: string | null;
|
|
414
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
415
|
+
logo_square_id: number | null;
|
|
416
|
+
logo_square_uuid: string | null;
|
|
417
|
+
partnership_distributors_id: string | null;
|
|
418
|
+
distributor_name: string | null;
|
|
419
|
+
distributor_logo_square_id: number | null;
|
|
420
|
+
distributor_logo_square_uuid: string | null;
|
|
421
|
+
} | null;
|
|
422
|
+
tags: Array<{
|
|
423
|
+
id: string;
|
|
424
|
+
label: string;
|
|
425
|
+
background_color: string;
|
|
426
|
+
text_color: string | null;
|
|
427
|
+
}>;
|
|
428
|
+
assigned_users: Array<{
|
|
429
|
+
id: string;
|
|
430
|
+
first_name: string | null;
|
|
431
|
+
last_name: string | null;
|
|
432
|
+
email: string;
|
|
433
|
+
profile_image_id: number | null;
|
|
434
|
+
profile_image_uuid: string | null;
|
|
435
|
+
}>;
|
|
436
|
+
lead_deals: Array<{
|
|
437
|
+
id: string;
|
|
438
|
+
uuid: string;
|
|
439
|
+
label: string;
|
|
440
|
+
deal_value: number | null;
|
|
441
|
+
stage_id: string | null;
|
|
442
|
+
stage_label: string | null;
|
|
443
|
+
stage_series: number | null;
|
|
444
|
+
stage_phase: 'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold' | null;
|
|
445
|
+
currency_code: string | null;
|
|
446
|
+
created_at: string;
|
|
447
|
+
total_commission_value: number | null;
|
|
448
|
+
lead_deal_payments: Array<{
|
|
449
|
+
payment_completed: boolean;
|
|
450
|
+
payment_value: number;
|
|
451
|
+
}> | null;
|
|
452
|
+
}>;
|
|
453
|
+
custom_fields: Array<{
|
|
454
|
+
id: string;
|
|
455
|
+
label: string;
|
|
456
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
457
|
+
value: {
|
|
458
|
+
/**
|
|
459
|
+
* Value for text-like fields
|
|
460
|
+
*/
|
|
461
|
+
text?: string | null;
|
|
462
|
+
/**
|
|
463
|
+
* Legacy value key for textarea fields; write using text
|
|
464
|
+
*/
|
|
465
|
+
textarea?: string | null;
|
|
466
|
+
/**
|
|
467
|
+
* Value for number fields
|
|
468
|
+
*/
|
|
469
|
+
number?: number | string | null;
|
|
470
|
+
/**
|
|
471
|
+
* Value for date fields (ISO 8601 date string)
|
|
472
|
+
*/
|
|
473
|
+
date?: string | null;
|
|
474
|
+
/**
|
|
475
|
+
* Value for checkbox fields
|
|
476
|
+
*/
|
|
477
|
+
boolean?: boolean | string | null;
|
|
478
|
+
/**
|
|
479
|
+
* Option ID for single-select fields
|
|
480
|
+
*/
|
|
481
|
+
select?: number | null;
|
|
482
|
+
/**
|
|
483
|
+
* Option IDs for multi-select fields
|
|
484
|
+
*/
|
|
485
|
+
multi_select?: Array<number> | null;
|
|
486
|
+
} | null;
|
|
487
|
+
options: Array<{
|
|
488
|
+
id: number;
|
|
489
|
+
label: string;
|
|
490
|
+
}> | null;
|
|
491
|
+
custom_field_value_id: string | null;
|
|
492
|
+
}>;
|
|
493
|
+
id: string;
|
|
494
|
+
}>;
|
|
495
|
+
pagination: {
|
|
496
|
+
page: number;
|
|
497
|
+
per_page: number;
|
|
498
|
+
total: number;
|
|
499
|
+
total_pages: number;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
type ListPartnerLeadsResponse = ListPartnerLeadsResponses[keyof ListPartnerLeadsResponses];
|
|
504
|
+
type CreatePartnerLeadData = {
|
|
505
|
+
body: {
|
|
506
|
+
company_name?: string | null;
|
|
507
|
+
first_name?: string | null;
|
|
508
|
+
last_name?: string | null;
|
|
509
|
+
email?: string | null;
|
|
510
|
+
phone_number?: string | null;
|
|
511
|
+
tags?: Array<string>;
|
|
512
|
+
customFields?: Array<{
|
|
513
|
+
customFieldId: string;
|
|
514
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
515
|
+
value?: {
|
|
516
|
+
/**
|
|
517
|
+
* Value for text-like fields
|
|
518
|
+
*/
|
|
519
|
+
text?: string | null;
|
|
520
|
+
/**
|
|
521
|
+
* Legacy value key for textarea fields; write using text
|
|
522
|
+
*/
|
|
523
|
+
textarea?: string | null;
|
|
524
|
+
/**
|
|
525
|
+
* Value for number fields
|
|
526
|
+
*/
|
|
527
|
+
number?: number | string | null;
|
|
528
|
+
/**
|
|
529
|
+
* Value for date fields (ISO 8601 date string)
|
|
530
|
+
*/
|
|
531
|
+
date?: string | null;
|
|
532
|
+
/**
|
|
533
|
+
* Value for checkbox fields
|
|
534
|
+
*/
|
|
535
|
+
boolean?: boolean | string | null;
|
|
536
|
+
/**
|
|
537
|
+
* Option ID for single-select fields
|
|
538
|
+
*/
|
|
539
|
+
select?: number | null;
|
|
540
|
+
/**
|
|
541
|
+
* Option IDs for multi-select fields
|
|
542
|
+
*/
|
|
543
|
+
multi_select?: Array<number> | null;
|
|
544
|
+
} | null;
|
|
545
|
+
}>;
|
|
546
|
+
assignedUsers?: Array<string>;
|
|
547
|
+
assignedContacts?: Array<string>;
|
|
548
|
+
partnership_distributors_id?: string;
|
|
549
|
+
quote?: {
|
|
550
|
+
calculator_id: string;
|
|
551
|
+
field_values: {
|
|
552
|
+
[key: string]: number | string | boolean;
|
|
553
|
+
};
|
|
554
|
+
selected_optional_products?: Array<string>;
|
|
555
|
+
optional_product_quantities?: {
|
|
556
|
+
[key: string]: number;
|
|
557
|
+
};
|
|
558
|
+
billing_period?: 'monthly' | 'quarterly' | 'yearly' | null;
|
|
559
|
+
customer_name: string;
|
|
560
|
+
customer_email?: string;
|
|
561
|
+
customer_company?: string;
|
|
562
|
+
valid_days?: number;
|
|
563
|
+
};
|
|
564
|
+
referralMode?: 'send' | 'record';
|
|
565
|
+
};
|
|
566
|
+
path: {
|
|
567
|
+
partnershipId: string;
|
|
568
|
+
};
|
|
569
|
+
query?: never;
|
|
570
|
+
url: '/partner/{partnershipId}/leads';
|
|
571
|
+
};
|
|
572
|
+
type CreatePartnerLeadErrors = {
|
|
573
|
+
/**
|
|
574
|
+
* Default Response
|
|
575
|
+
*/
|
|
576
|
+
403: {
|
|
577
|
+
error: {
|
|
578
|
+
code: string;
|
|
579
|
+
message: string;
|
|
580
|
+
details?: Array<{
|
|
581
|
+
field?: string;
|
|
582
|
+
message: string;
|
|
583
|
+
label?: string;
|
|
584
|
+
reason?: string;
|
|
585
|
+
}>;
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
type CreatePartnerLeadError = CreatePartnerLeadErrors[keyof CreatePartnerLeadErrors];
|
|
590
|
+
type CreatePartnerLeadResponses = {
|
|
591
|
+
/**
|
|
592
|
+
* Default Response
|
|
593
|
+
*/
|
|
594
|
+
201: {
|
|
595
|
+
id: string;
|
|
596
|
+
uuid: string;
|
|
597
|
+
quote_uuid?: string;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
type CreatePartnerLeadResponse = CreatePartnerLeadResponses[keyof CreatePartnerLeadResponses];
|
|
601
|
+
type GetPartnerLeadRequirementsData = {
|
|
602
|
+
body?: never;
|
|
603
|
+
path: {
|
|
604
|
+
partnershipId: string;
|
|
605
|
+
};
|
|
606
|
+
query?: never;
|
|
607
|
+
url: '/partner/{partnershipId}/leads/requirements';
|
|
608
|
+
};
|
|
609
|
+
type GetPartnerLeadRequirementsResponses = {
|
|
610
|
+
/**
|
|
611
|
+
* Default Response
|
|
612
|
+
*/
|
|
613
|
+
200: {
|
|
614
|
+
fields: Array<{
|
|
615
|
+
id: string;
|
|
616
|
+
label: string;
|
|
617
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
618
|
+
required: boolean;
|
|
619
|
+
options: Array<{
|
|
620
|
+
id: number;
|
|
621
|
+
label: string;
|
|
622
|
+
}> | null;
|
|
623
|
+
description: string | null;
|
|
624
|
+
link_url: string | null;
|
|
625
|
+
link_label: string | null;
|
|
626
|
+
}>;
|
|
627
|
+
rules: Array<{
|
|
628
|
+
id: string;
|
|
629
|
+
label: string;
|
|
630
|
+
action_type: 'set_value' | 'show_field' | 'value_mapping';
|
|
631
|
+
source_field: string;
|
|
632
|
+
source_values: Array<string | number | boolean | {
|
|
633
|
+
operator: '>=' | '<=' | '>' | '<' | '==' | '!=';
|
|
634
|
+
value: number;
|
|
635
|
+
}>;
|
|
636
|
+
target_field: string;
|
|
637
|
+
target_value: {
|
|
638
|
+
/**
|
|
639
|
+
* Value for text-like fields
|
|
640
|
+
*/
|
|
641
|
+
text?: string | null;
|
|
642
|
+
/**
|
|
643
|
+
* Legacy value key for textarea fields; write using text
|
|
644
|
+
*/
|
|
645
|
+
textarea?: string | null;
|
|
646
|
+
/**
|
|
647
|
+
* Value for number fields
|
|
648
|
+
*/
|
|
649
|
+
number?: number | string | null;
|
|
650
|
+
/**
|
|
651
|
+
* Value for date fields (ISO 8601 date string)
|
|
652
|
+
*/
|
|
653
|
+
date?: string | null;
|
|
654
|
+
/**
|
|
655
|
+
* Value for checkbox fields
|
|
656
|
+
*/
|
|
657
|
+
boolean?: boolean | string | null;
|
|
658
|
+
/**
|
|
659
|
+
* Option ID for single-select fields
|
|
660
|
+
*/
|
|
661
|
+
select?: number | null;
|
|
662
|
+
/**
|
|
663
|
+
* Option IDs for multi-select fields
|
|
664
|
+
*/
|
|
665
|
+
multi_select?: Array<number> | null;
|
|
666
|
+
} | null;
|
|
667
|
+
value_mappings: Array<{
|
|
668
|
+
sourceValue: string | number | boolean | {
|
|
669
|
+
operator: '>=' | '<=' | '>' | '<' | '==' | '!=';
|
|
670
|
+
value: number;
|
|
671
|
+
};
|
|
672
|
+
targetValue: {
|
|
673
|
+
/**
|
|
674
|
+
* Value for text-like fields
|
|
675
|
+
*/
|
|
676
|
+
text?: string | null;
|
|
677
|
+
/**
|
|
678
|
+
* Legacy value key for textarea fields; write using text
|
|
679
|
+
*/
|
|
680
|
+
textarea?: string | null;
|
|
681
|
+
/**
|
|
682
|
+
* Value for number fields
|
|
683
|
+
*/
|
|
684
|
+
number?: number | string | null;
|
|
685
|
+
/**
|
|
686
|
+
* Value for date fields (ISO 8601 date string)
|
|
687
|
+
*/
|
|
688
|
+
date?: string | null;
|
|
689
|
+
/**
|
|
690
|
+
* Value for checkbox fields
|
|
691
|
+
*/
|
|
692
|
+
boolean?: boolean | string | null;
|
|
693
|
+
/**
|
|
694
|
+
* Option ID for single-select fields
|
|
695
|
+
*/
|
|
696
|
+
select?: number | null;
|
|
697
|
+
/**
|
|
698
|
+
* Option IDs for multi-select fields
|
|
699
|
+
*/
|
|
700
|
+
multi_select?: Array<number> | null;
|
|
701
|
+
};
|
|
702
|
+
}> | null;
|
|
703
|
+
locked: boolean;
|
|
704
|
+
}>;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
type GetPartnerLeadRequirementsResponse = GetPartnerLeadRequirementsResponses[keyof GetPartnerLeadRequirementsResponses];
|
|
708
|
+
type GetPartnerLeadData = {
|
|
709
|
+
body?: never;
|
|
710
|
+
path: {
|
|
711
|
+
partnershipId: string;
|
|
712
|
+
leadId: string;
|
|
713
|
+
};
|
|
714
|
+
query?: never;
|
|
715
|
+
url: '/partner/{partnershipId}/leads/{leadId}';
|
|
716
|
+
};
|
|
717
|
+
type GetPartnerLeadResponses = {
|
|
718
|
+
/**
|
|
719
|
+
* Default Response
|
|
720
|
+
*/
|
|
721
|
+
200: {
|
|
722
|
+
uuid: string;
|
|
723
|
+
created_at: string;
|
|
724
|
+
updated_at: string;
|
|
725
|
+
source: string;
|
|
726
|
+
status: 'new' | 'converted' | 'rejected';
|
|
727
|
+
company_name: string | null;
|
|
728
|
+
first_name: string | null;
|
|
729
|
+
last_name: string | null;
|
|
730
|
+
email: string | null;
|
|
731
|
+
phone_number: string | null;
|
|
732
|
+
direction: 'sent' | 'received' | null;
|
|
733
|
+
lock_lead_status?: boolean;
|
|
734
|
+
partnership_id: string | null;
|
|
735
|
+
campaign_id: string | null;
|
|
736
|
+
campaign_title: string | null;
|
|
737
|
+
partnership: {
|
|
738
|
+
id: string;
|
|
739
|
+
uuid: string;
|
|
740
|
+
name: string | null;
|
|
741
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
742
|
+
logo_square_id: number | null;
|
|
743
|
+
logo_square_uuid: string | null;
|
|
744
|
+
partnership_distributors_id: string | null;
|
|
745
|
+
distributor_name: string | null;
|
|
746
|
+
distributor_logo_square_id: number | null;
|
|
747
|
+
distributor_logo_square_uuid: string | null;
|
|
748
|
+
} | null;
|
|
749
|
+
tags: Array<{
|
|
750
|
+
id: string;
|
|
751
|
+
label: string;
|
|
752
|
+
background_color: string;
|
|
753
|
+
text_color: string | null;
|
|
754
|
+
}>;
|
|
755
|
+
assigned_users: Array<{
|
|
756
|
+
id: string;
|
|
757
|
+
first_name: string | null;
|
|
758
|
+
last_name: string | null;
|
|
759
|
+
email: string;
|
|
760
|
+
profile_image_id: number | null;
|
|
761
|
+
profile_image_uuid: string | null;
|
|
762
|
+
}>;
|
|
763
|
+
assigned_contacts: Array<{
|
|
764
|
+
id: string;
|
|
765
|
+
first_name: string | null;
|
|
766
|
+
last_name: string | null;
|
|
767
|
+
email: string;
|
|
768
|
+
profile_image_id: number | null;
|
|
769
|
+
profile_image_uuid: string | null;
|
|
770
|
+
}>;
|
|
771
|
+
lead_deals: Array<{
|
|
772
|
+
id: string;
|
|
773
|
+
uuid: string;
|
|
774
|
+
label: string;
|
|
775
|
+
deal_value: number | null;
|
|
776
|
+
stage_id: string | null;
|
|
777
|
+
stage_label: string | null;
|
|
778
|
+
stage_series: number | null;
|
|
779
|
+
stage_phase: 'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold' | null;
|
|
780
|
+
currency_code: string | null;
|
|
781
|
+
created_at: string;
|
|
782
|
+
total_commission_value: number | null;
|
|
783
|
+
lead_deal_payments: Array<{
|
|
784
|
+
payment_completed: boolean;
|
|
785
|
+
payment_value: number;
|
|
786
|
+
}> | null;
|
|
787
|
+
}>;
|
|
788
|
+
custom_fields: Array<{
|
|
789
|
+
id: string;
|
|
790
|
+
label: string;
|
|
791
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
792
|
+
value: {
|
|
793
|
+
/**
|
|
794
|
+
* Value for text-like fields
|
|
795
|
+
*/
|
|
796
|
+
text?: string | null;
|
|
797
|
+
/**
|
|
798
|
+
* Legacy value key for textarea fields; write using text
|
|
799
|
+
*/
|
|
800
|
+
textarea?: string | null;
|
|
801
|
+
/**
|
|
802
|
+
* Value for number fields
|
|
803
|
+
*/
|
|
804
|
+
number?: number | string | null;
|
|
805
|
+
/**
|
|
806
|
+
* Value for date fields (ISO 8601 date string)
|
|
807
|
+
*/
|
|
808
|
+
date?: string | null;
|
|
809
|
+
/**
|
|
810
|
+
* Value for checkbox fields
|
|
811
|
+
*/
|
|
812
|
+
boolean?: boolean | string | null;
|
|
813
|
+
/**
|
|
814
|
+
* Option ID for single-select fields
|
|
815
|
+
*/
|
|
816
|
+
select?: number | null;
|
|
817
|
+
/**
|
|
818
|
+
* Option IDs for multi-select fields
|
|
819
|
+
*/
|
|
820
|
+
multi_select?: Array<number> | null;
|
|
821
|
+
} | null;
|
|
822
|
+
options: Array<{
|
|
823
|
+
id: number;
|
|
824
|
+
label: string;
|
|
825
|
+
}> | null;
|
|
826
|
+
custom_field_value_id: string | null;
|
|
827
|
+
}>;
|
|
828
|
+
has_quote: boolean;
|
|
829
|
+
id: string;
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
type GetPartnerLeadResponse = GetPartnerLeadResponses[keyof GetPartnerLeadResponses];
|
|
833
|
+
type UpdatePartnerLeadData = {
|
|
834
|
+
body: {
|
|
835
|
+
company_name?: string | null;
|
|
836
|
+
first_name?: string | null;
|
|
837
|
+
last_name?: string | null;
|
|
838
|
+
email?: string | null;
|
|
839
|
+
phone_number?: string | null;
|
|
840
|
+
rejected_reason?: string | null;
|
|
841
|
+
status?: 'new' | 'converted' | 'rejected';
|
|
842
|
+
tag?: {
|
|
843
|
+
id?: string;
|
|
844
|
+
label: string;
|
|
845
|
+
background_color: string;
|
|
846
|
+
text_color: string | null;
|
|
847
|
+
added?: boolean;
|
|
848
|
+
removed?: boolean;
|
|
849
|
+
};
|
|
850
|
+
custom_field_values?: Array<{
|
|
851
|
+
customFieldId: string;
|
|
852
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
853
|
+
value?: {
|
|
854
|
+
/**
|
|
855
|
+
* Value for text-like fields
|
|
856
|
+
*/
|
|
857
|
+
text?: string | null;
|
|
858
|
+
/**
|
|
859
|
+
* Legacy value key for textarea fields; write using text
|
|
860
|
+
*/
|
|
861
|
+
textarea?: string | null;
|
|
862
|
+
/**
|
|
863
|
+
* Value for number fields
|
|
864
|
+
*/
|
|
865
|
+
number?: number | string | null;
|
|
866
|
+
/**
|
|
867
|
+
* Value for date fields (ISO 8601 date string)
|
|
868
|
+
*/
|
|
869
|
+
date?: string | null;
|
|
870
|
+
/**
|
|
871
|
+
* Value for checkbox fields
|
|
872
|
+
*/
|
|
873
|
+
boolean?: boolean | string | null;
|
|
874
|
+
/**
|
|
875
|
+
* Option ID for single-select fields
|
|
876
|
+
*/
|
|
877
|
+
select?: number | null;
|
|
878
|
+
/**
|
|
879
|
+
* Option IDs for multi-select fields
|
|
880
|
+
*/
|
|
881
|
+
multi_select?: Array<number> | null;
|
|
882
|
+
} | null;
|
|
883
|
+
}>;
|
|
884
|
+
distributor?: {
|
|
885
|
+
id: number;
|
|
886
|
+
add?: boolean;
|
|
887
|
+
remove?: boolean;
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
path: {
|
|
891
|
+
partnershipId: string;
|
|
892
|
+
leadId: string;
|
|
893
|
+
};
|
|
894
|
+
query?: never;
|
|
895
|
+
url: '/partner/{partnershipId}/leads/{leadId}';
|
|
896
|
+
};
|
|
897
|
+
type UpdatePartnerLeadResponses = {
|
|
898
|
+
/**
|
|
899
|
+
* Default Response
|
|
900
|
+
*/
|
|
901
|
+
200: {
|
|
902
|
+
uuid: string;
|
|
903
|
+
created_at: string;
|
|
904
|
+
updated_at: string;
|
|
905
|
+
source: string;
|
|
906
|
+
status: 'new' | 'converted' | 'rejected';
|
|
907
|
+
company_name: string | null;
|
|
908
|
+
first_name: string | null;
|
|
909
|
+
last_name: string | null;
|
|
910
|
+
email: string | null;
|
|
911
|
+
phone_number: string | null;
|
|
912
|
+
direction: 'sent' | 'received' | null;
|
|
913
|
+
lock_lead_status?: boolean;
|
|
914
|
+
partnership_id: string | null;
|
|
915
|
+
campaign_id: string | null;
|
|
916
|
+
campaign_title: string | null;
|
|
917
|
+
partnership: {
|
|
918
|
+
id: string;
|
|
919
|
+
uuid: string;
|
|
920
|
+
name: string | null;
|
|
921
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
922
|
+
logo_square_id: number | null;
|
|
923
|
+
logo_square_uuid: string | null;
|
|
924
|
+
partnership_distributors_id: string | null;
|
|
925
|
+
distributor_name: string | null;
|
|
926
|
+
distributor_logo_square_id: number | null;
|
|
927
|
+
distributor_logo_square_uuid: string | null;
|
|
928
|
+
} | null;
|
|
929
|
+
tags: Array<{
|
|
930
|
+
id: string;
|
|
931
|
+
label: string;
|
|
932
|
+
background_color: string;
|
|
933
|
+
text_color: string | null;
|
|
934
|
+
}>;
|
|
935
|
+
assigned_users: Array<{
|
|
936
|
+
id: string;
|
|
937
|
+
first_name: string | null;
|
|
938
|
+
last_name: string | null;
|
|
939
|
+
email: string;
|
|
940
|
+
profile_image_id: number | null;
|
|
941
|
+
profile_image_uuid: string | null;
|
|
942
|
+
}>;
|
|
943
|
+
assigned_contacts: Array<{
|
|
944
|
+
id: string;
|
|
945
|
+
first_name: string | null;
|
|
946
|
+
last_name: string | null;
|
|
947
|
+
email: string;
|
|
948
|
+
profile_image_id: number | null;
|
|
949
|
+
profile_image_uuid: string | null;
|
|
950
|
+
}>;
|
|
951
|
+
lead_deals: Array<{
|
|
952
|
+
id: string;
|
|
953
|
+
uuid: string;
|
|
954
|
+
label: string;
|
|
955
|
+
deal_value: number | null;
|
|
956
|
+
stage_id: string | null;
|
|
957
|
+
stage_label: string | null;
|
|
958
|
+
stage_series: number | null;
|
|
959
|
+
stage_phase: 'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold' | null;
|
|
960
|
+
currency_code: string | null;
|
|
961
|
+
created_at: string;
|
|
962
|
+
total_commission_value: number | null;
|
|
963
|
+
lead_deal_payments: Array<{
|
|
964
|
+
payment_completed: boolean;
|
|
965
|
+
payment_value: number;
|
|
966
|
+
}> | null;
|
|
967
|
+
}>;
|
|
968
|
+
custom_fields: Array<{
|
|
969
|
+
id: string;
|
|
970
|
+
label: string;
|
|
971
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
972
|
+
value: {
|
|
973
|
+
/**
|
|
974
|
+
* Value for text-like fields
|
|
975
|
+
*/
|
|
976
|
+
text?: string | null;
|
|
977
|
+
/**
|
|
978
|
+
* Legacy value key for textarea fields; write using text
|
|
979
|
+
*/
|
|
980
|
+
textarea?: string | null;
|
|
981
|
+
/**
|
|
982
|
+
* Value for number fields
|
|
983
|
+
*/
|
|
984
|
+
number?: number | string | null;
|
|
985
|
+
/**
|
|
986
|
+
* Value for date fields (ISO 8601 date string)
|
|
987
|
+
*/
|
|
988
|
+
date?: string | null;
|
|
989
|
+
/**
|
|
990
|
+
* Value for checkbox fields
|
|
991
|
+
*/
|
|
992
|
+
boolean?: boolean | string | null;
|
|
993
|
+
/**
|
|
994
|
+
* Option ID for single-select fields
|
|
995
|
+
*/
|
|
996
|
+
select?: number | null;
|
|
997
|
+
/**
|
|
998
|
+
* Option IDs for multi-select fields
|
|
999
|
+
*/
|
|
1000
|
+
multi_select?: Array<number> | null;
|
|
1001
|
+
} | null;
|
|
1002
|
+
options: Array<{
|
|
1003
|
+
id: number;
|
|
1004
|
+
label: string;
|
|
1005
|
+
}> | null;
|
|
1006
|
+
custom_field_value_id: string | null;
|
|
1007
|
+
}>;
|
|
1008
|
+
has_quote: boolean;
|
|
1009
|
+
id: string;
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
type UpdatePartnerLeadResponse = UpdatePartnerLeadResponses[keyof UpdatePartnerLeadResponses];
|
|
1013
|
+
type ListPartnerDealsData = {
|
|
1014
|
+
body?: never;
|
|
1015
|
+
path: {
|
|
1016
|
+
partnershipId: string;
|
|
1017
|
+
};
|
|
1018
|
+
query?: {
|
|
1019
|
+
search?: string;
|
|
1020
|
+
stages?: Array<string>;
|
|
1021
|
+
phases?: Array<'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold'>;
|
|
1022
|
+
tags?: Array<string>;
|
|
1023
|
+
users?: Array<string>;
|
|
1024
|
+
includeCustomFields?: boolean;
|
|
1025
|
+
page?: number;
|
|
1026
|
+
perPage?: number;
|
|
1027
|
+
};
|
|
1028
|
+
url: '/partner/{partnershipId}/deals';
|
|
1029
|
+
};
|
|
1030
|
+
type ListPartnerDealsResponses = {
|
|
1031
|
+
/**
|
|
1032
|
+
* Default Response
|
|
1033
|
+
*/
|
|
1034
|
+
200: {
|
|
1035
|
+
data: Array<{
|
|
1036
|
+
uuid: string;
|
|
1037
|
+
created_at: string;
|
|
1038
|
+
updated_at: string;
|
|
1039
|
+
label: string;
|
|
1040
|
+
deal_value: number;
|
|
1041
|
+
currency_code: string | null;
|
|
1042
|
+
stage_id: string | null;
|
|
1043
|
+
stage: {
|
|
1044
|
+
id: string;
|
|
1045
|
+
label: string | null;
|
|
1046
|
+
series: number | null;
|
|
1047
|
+
phase: 'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold' | null;
|
|
1048
|
+
} | null;
|
|
1049
|
+
total_commission_value: number | null;
|
|
1050
|
+
expiration_date: string | null;
|
|
1051
|
+
expired_at: string | null;
|
|
1052
|
+
created_by_user_id: string | null;
|
|
1053
|
+
lock_deal_stage?: boolean;
|
|
1054
|
+
lead_id: string;
|
|
1055
|
+
lead_company_name: string | null;
|
|
1056
|
+
lead_first_name: string | null;
|
|
1057
|
+
lead_last_name: string | null;
|
|
1058
|
+
lead_email: string | null;
|
|
1059
|
+
lead_phone_number: string | null;
|
|
1060
|
+
lead_direction: 'sent' | 'received' | null;
|
|
1061
|
+
lead_campaign_id: string | null;
|
|
1062
|
+
campaign_title: string | null;
|
|
1063
|
+
partnership: {
|
|
1064
|
+
id: string;
|
|
1065
|
+
uuid: string;
|
|
1066
|
+
name: string | null;
|
|
1067
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
1068
|
+
logo_square_id: number | null;
|
|
1069
|
+
logo_square_uuid: string | null;
|
|
1070
|
+
partnership_distributors_id: string | null;
|
|
1071
|
+
distributor_name: string | null;
|
|
1072
|
+
distributor_logo_square_id: number | null;
|
|
1073
|
+
distributor_logo_square_uuid: string | null;
|
|
1074
|
+
} | null;
|
|
1075
|
+
tags: Array<{
|
|
1076
|
+
id: string;
|
|
1077
|
+
label: string;
|
|
1078
|
+
background_color: string;
|
|
1079
|
+
text_color: string | null;
|
|
1080
|
+
}>;
|
|
1081
|
+
assigned_users: Array<{
|
|
1082
|
+
id: string;
|
|
1083
|
+
first_name: string | null;
|
|
1084
|
+
last_name: string | null;
|
|
1085
|
+
email: string;
|
|
1086
|
+
profile_image_id: number | null;
|
|
1087
|
+
profile_image_uuid: string | null;
|
|
1088
|
+
}>;
|
|
1089
|
+
assigned_contacts?: Array<{
|
|
1090
|
+
id: string;
|
|
1091
|
+
first_name: string | null;
|
|
1092
|
+
last_name: string | null;
|
|
1093
|
+
email: string;
|
|
1094
|
+
profile_image_id: number | null;
|
|
1095
|
+
profile_image_uuid: string | null;
|
|
1096
|
+
}>;
|
|
1097
|
+
custom_field_values: Array<{
|
|
1098
|
+
custom_field_id: string;
|
|
1099
|
+
label: string;
|
|
1100
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
1101
|
+
value: {
|
|
1102
|
+
/**
|
|
1103
|
+
* Value for text-like fields
|
|
1104
|
+
*/
|
|
1105
|
+
text?: string | null;
|
|
1106
|
+
/**
|
|
1107
|
+
* Legacy value key for textarea fields; write using text
|
|
1108
|
+
*/
|
|
1109
|
+
textarea?: string | null;
|
|
1110
|
+
/**
|
|
1111
|
+
* Value for number fields
|
|
1112
|
+
*/
|
|
1113
|
+
number?: number | string | null;
|
|
1114
|
+
/**
|
|
1115
|
+
* Value for date fields (ISO 8601 date string)
|
|
1116
|
+
*/
|
|
1117
|
+
date?: string | null;
|
|
1118
|
+
/**
|
|
1119
|
+
* Value for checkbox fields
|
|
1120
|
+
*/
|
|
1121
|
+
boolean?: boolean | string | null;
|
|
1122
|
+
/**
|
|
1123
|
+
* Option ID for single-select fields
|
|
1124
|
+
*/
|
|
1125
|
+
select?: number | null;
|
|
1126
|
+
/**
|
|
1127
|
+
* Option IDs for multi-select fields
|
|
1128
|
+
*/
|
|
1129
|
+
multi_select?: Array<number> | null;
|
|
1130
|
+
} | null;
|
|
1131
|
+
options: Array<{
|
|
1132
|
+
id: number;
|
|
1133
|
+
label: string;
|
|
1134
|
+
}> | null;
|
|
1135
|
+
}>;
|
|
1136
|
+
id: string;
|
|
1137
|
+
}>;
|
|
1138
|
+
pagination: {
|
|
1139
|
+
page: number;
|
|
1140
|
+
per_page: number;
|
|
1141
|
+
total: number;
|
|
1142
|
+
total_pages: number;
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
type ListPartnerDealsResponse = ListPartnerDealsResponses[keyof ListPartnerDealsResponses];
|
|
1147
|
+
type CreatePartnerDealData = {
|
|
1148
|
+
body: {
|
|
1149
|
+
deal_label?: string;
|
|
1150
|
+
stage_uuid?: string;
|
|
1151
|
+
tags?: Array<string>;
|
|
1152
|
+
customFields?: Array<{
|
|
1153
|
+
customFieldId: string;
|
|
1154
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
1155
|
+
value?: {
|
|
1156
|
+
/**
|
|
1157
|
+
* Value for text-like fields
|
|
1158
|
+
*/
|
|
1159
|
+
text?: string | null;
|
|
1160
|
+
/**
|
|
1161
|
+
* Legacy value key for textarea fields; write using text
|
|
1162
|
+
*/
|
|
1163
|
+
textarea?: string | null;
|
|
1164
|
+
/**
|
|
1165
|
+
* Value for number fields
|
|
1166
|
+
*/
|
|
1167
|
+
number?: number | string | null;
|
|
1168
|
+
/**
|
|
1169
|
+
* Value for date fields (ISO 8601 date string)
|
|
1170
|
+
*/
|
|
1171
|
+
date?: string | null;
|
|
1172
|
+
/**
|
|
1173
|
+
* Value for checkbox fields
|
|
1174
|
+
*/
|
|
1175
|
+
boolean?: boolean | string | null;
|
|
1176
|
+
/**
|
|
1177
|
+
* Option ID for single-select fields
|
|
1178
|
+
*/
|
|
1179
|
+
select?: number | null;
|
|
1180
|
+
/**
|
|
1181
|
+
* Option IDs for multi-select fields
|
|
1182
|
+
*/
|
|
1183
|
+
multi_select?: Array<number> | null;
|
|
1184
|
+
} | null;
|
|
1185
|
+
}>;
|
|
1186
|
+
expiration_days?: number;
|
|
1187
|
+
lead_id: string;
|
|
1188
|
+
deal_value?: number;
|
|
1189
|
+
products?: Array<{
|
|
1190
|
+
product_id: string;
|
|
1191
|
+
quantity?: number;
|
|
1192
|
+
}>;
|
|
1193
|
+
notes?: Array<{
|
|
1194
|
+
document: {
|
|
1195
|
+
type: string;
|
|
1196
|
+
content?: Array<{
|
|
1197
|
+
[key: string]: unknown;
|
|
1198
|
+
}>;
|
|
1199
|
+
} | null;
|
|
1200
|
+
attachments?: Array<{
|
|
1201
|
+
uuid?: string;
|
|
1202
|
+
internalId?: string;
|
|
1203
|
+
name?: string;
|
|
1204
|
+
size?: number;
|
|
1205
|
+
isImage?: boolean;
|
|
1206
|
+
mimeType?: string;
|
|
1207
|
+
file?: {
|
|
1208
|
+
[key: string]: unknown;
|
|
1209
|
+
} | null;
|
|
1210
|
+
externalUrl?: string | null;
|
|
1211
|
+
cdnUrlModifiers?: string;
|
|
1212
|
+
cdnUrl?: string;
|
|
1213
|
+
fullPath?: string | null;
|
|
1214
|
+
uploadProgress?: number;
|
|
1215
|
+
fileInfo?: {
|
|
1216
|
+
uuid?: string;
|
|
1217
|
+
name?: string;
|
|
1218
|
+
size?: number;
|
|
1219
|
+
isStored?: boolean;
|
|
1220
|
+
isImage?: boolean;
|
|
1221
|
+
mimeType?: string;
|
|
1222
|
+
cdnUrl?: string;
|
|
1223
|
+
s3Url?: string | null;
|
|
1224
|
+
originalFilename?: string;
|
|
1225
|
+
imageInfo?: {
|
|
1226
|
+
dpi?: Array<number> | null;
|
|
1227
|
+
width?: number;
|
|
1228
|
+
format?: string;
|
|
1229
|
+
height?: number;
|
|
1230
|
+
sequence?: boolean;
|
|
1231
|
+
colorMode?: string;
|
|
1232
|
+
orientation?: number | null;
|
|
1233
|
+
geoLocation?: {
|
|
1234
|
+
latitude?: number;
|
|
1235
|
+
longitude?: number;
|
|
1236
|
+
} | null;
|
|
1237
|
+
datetimeOriginal?: string | null;
|
|
1238
|
+
} | null;
|
|
1239
|
+
videoInfo?: {
|
|
1240
|
+
duration?: number | null;
|
|
1241
|
+
format?: string | null;
|
|
1242
|
+
bitrate?: number | null;
|
|
1243
|
+
audio?: {
|
|
1244
|
+
bitrate?: number | null;
|
|
1245
|
+
codec?: string | null;
|
|
1246
|
+
sampleRate?: number | null;
|
|
1247
|
+
channels?: string | number | null;
|
|
1248
|
+
} | null;
|
|
1249
|
+
video?: {
|
|
1250
|
+
height?: number | null;
|
|
1251
|
+
width?: number | null;
|
|
1252
|
+
frameRate?: number | null;
|
|
1253
|
+
bitrate?: number | null;
|
|
1254
|
+
codec?: string | null;
|
|
1255
|
+
} | null;
|
|
1256
|
+
} | null;
|
|
1257
|
+
contentInfo?: {
|
|
1258
|
+
mime?: {
|
|
1259
|
+
mime?: string;
|
|
1260
|
+
type?: string;
|
|
1261
|
+
subtype?: string;
|
|
1262
|
+
};
|
|
1263
|
+
image?: {
|
|
1264
|
+
dpi?: Array<number> | null;
|
|
1265
|
+
width?: number;
|
|
1266
|
+
format?: string;
|
|
1267
|
+
height?: number;
|
|
1268
|
+
sequence?: boolean;
|
|
1269
|
+
colorMode?: string;
|
|
1270
|
+
orientation?: number | null;
|
|
1271
|
+
geoLocation?: {
|
|
1272
|
+
latitude?: number;
|
|
1273
|
+
longitude?: number;
|
|
1274
|
+
} | null;
|
|
1275
|
+
datetimeOriginal?: string | null;
|
|
1276
|
+
};
|
|
1277
|
+
} | null;
|
|
1278
|
+
metadata?: {
|
|
1279
|
+
[key: string]: unknown;
|
|
1280
|
+
} | null;
|
|
1281
|
+
s3Bucket?: string | null;
|
|
1282
|
+
defaultEffects?: string | null;
|
|
1283
|
+
};
|
|
1284
|
+
metadata?: {
|
|
1285
|
+
[key: string]: unknown;
|
|
1286
|
+
} | null;
|
|
1287
|
+
isSuccess?: boolean;
|
|
1288
|
+
isUploading?: boolean;
|
|
1289
|
+
isFailed?: boolean;
|
|
1290
|
+
isRemoved?: boolean;
|
|
1291
|
+
errors?: Array<unknown>;
|
|
1292
|
+
status?: 'success';
|
|
1293
|
+
source?: string | null;
|
|
1294
|
+
}> | Array<number>;
|
|
1295
|
+
mentions: Array<{
|
|
1296
|
+
id: number;
|
|
1297
|
+
label: string;
|
|
1298
|
+
}>;
|
|
1299
|
+
}>;
|
|
1300
|
+
currency_code?: string;
|
|
1301
|
+
quote?: {
|
|
1302
|
+
calculator_id: string;
|
|
1303
|
+
field_values: {
|
|
1304
|
+
[key: string]: number | string | boolean;
|
|
1305
|
+
};
|
|
1306
|
+
selected_optional_products?: Array<string>;
|
|
1307
|
+
optional_product_quantities?: {
|
|
1308
|
+
[key: string]: number;
|
|
1309
|
+
};
|
|
1310
|
+
billing_period?: 'monthly' | 'quarterly' | 'yearly' | null;
|
|
1311
|
+
};
|
|
1312
|
+
};
|
|
1313
|
+
path: {
|
|
1314
|
+
partnershipId: string;
|
|
1315
|
+
};
|
|
1316
|
+
query?: never;
|
|
1317
|
+
url: '/partner/{partnershipId}/deals';
|
|
1318
|
+
};
|
|
1319
|
+
type CreatePartnerDealErrors = {
|
|
1320
|
+
/**
|
|
1321
|
+
* Default Response
|
|
1322
|
+
*/
|
|
1323
|
+
403: {
|
|
1324
|
+
error: {
|
|
1325
|
+
code: string;
|
|
1326
|
+
message: string;
|
|
1327
|
+
details?: Array<{
|
|
1328
|
+
field?: string;
|
|
1329
|
+
message: string;
|
|
1330
|
+
label?: string;
|
|
1331
|
+
reason?: string;
|
|
1332
|
+
}>;
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
};
|
|
1336
|
+
type CreatePartnerDealError = CreatePartnerDealErrors[keyof CreatePartnerDealErrors];
|
|
1337
|
+
type CreatePartnerDealResponses = {
|
|
1338
|
+
/**
|
|
1339
|
+
* Default Response
|
|
1340
|
+
*/
|
|
1341
|
+
201: {
|
|
1342
|
+
id: string;
|
|
1343
|
+
uuid: string;
|
|
1344
|
+
quote_uuid?: string;
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
type CreatePartnerDealResponse = CreatePartnerDealResponses[keyof CreatePartnerDealResponses];
|
|
1348
|
+
type GetPartnerDealRequirementsData = {
|
|
1349
|
+
body?: never;
|
|
1350
|
+
path: {
|
|
1351
|
+
partnershipId: string;
|
|
1352
|
+
};
|
|
1353
|
+
query?: never;
|
|
1354
|
+
url: '/partner/{partnershipId}/deals/requirements';
|
|
1355
|
+
};
|
|
1356
|
+
type GetPartnerDealRequirementsResponses = {
|
|
1357
|
+
/**
|
|
1358
|
+
* Default Response
|
|
1359
|
+
*/
|
|
1360
|
+
200: {
|
|
1361
|
+
fields: Array<{
|
|
1362
|
+
id: string;
|
|
1363
|
+
label: string;
|
|
1364
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
1365
|
+
required: boolean;
|
|
1366
|
+
options: Array<{
|
|
1367
|
+
id: number;
|
|
1368
|
+
label: string;
|
|
1369
|
+
}> | null;
|
|
1370
|
+
description: string | null;
|
|
1371
|
+
link_url: string | null;
|
|
1372
|
+
link_label: string | null;
|
|
1373
|
+
}>;
|
|
1374
|
+
rules: Array<{
|
|
1375
|
+
id: string;
|
|
1376
|
+
label: string;
|
|
1377
|
+
action_type: 'set_value' | 'show_field' | 'value_mapping';
|
|
1378
|
+
source_field: string;
|
|
1379
|
+
source_values: Array<string | number | boolean | {
|
|
1380
|
+
operator: '>=' | '<=' | '>' | '<' | '==' | '!=';
|
|
1381
|
+
value: number;
|
|
1382
|
+
}>;
|
|
1383
|
+
target_field: string;
|
|
1384
|
+
target_value: {
|
|
1385
|
+
/**
|
|
1386
|
+
* Value for text-like fields
|
|
1387
|
+
*/
|
|
1388
|
+
text?: string | null;
|
|
1389
|
+
/**
|
|
1390
|
+
* Legacy value key for textarea fields; write using text
|
|
1391
|
+
*/
|
|
1392
|
+
textarea?: string | null;
|
|
1393
|
+
/**
|
|
1394
|
+
* Value for number fields
|
|
1395
|
+
*/
|
|
1396
|
+
number?: number | string | null;
|
|
1397
|
+
/**
|
|
1398
|
+
* Value for date fields (ISO 8601 date string)
|
|
1399
|
+
*/
|
|
1400
|
+
date?: string | null;
|
|
1401
|
+
/**
|
|
1402
|
+
* Value for checkbox fields
|
|
1403
|
+
*/
|
|
1404
|
+
boolean?: boolean | string | null;
|
|
1405
|
+
/**
|
|
1406
|
+
* Option ID for single-select fields
|
|
1407
|
+
*/
|
|
1408
|
+
select?: number | null;
|
|
1409
|
+
/**
|
|
1410
|
+
* Option IDs for multi-select fields
|
|
1411
|
+
*/
|
|
1412
|
+
multi_select?: Array<number> | null;
|
|
1413
|
+
} | null;
|
|
1414
|
+
value_mappings: Array<{
|
|
1415
|
+
sourceValue: string | number | boolean | {
|
|
1416
|
+
operator: '>=' | '<=' | '>' | '<' | '==' | '!=';
|
|
1417
|
+
value: number;
|
|
1418
|
+
};
|
|
1419
|
+
targetValue: {
|
|
1420
|
+
/**
|
|
1421
|
+
* Value for text-like fields
|
|
1422
|
+
*/
|
|
1423
|
+
text?: string | null;
|
|
1424
|
+
/**
|
|
1425
|
+
* Legacy value key for textarea fields; write using text
|
|
1426
|
+
*/
|
|
1427
|
+
textarea?: string | null;
|
|
1428
|
+
/**
|
|
1429
|
+
* Value for number fields
|
|
1430
|
+
*/
|
|
1431
|
+
number?: number | string | null;
|
|
1432
|
+
/**
|
|
1433
|
+
* Value for date fields (ISO 8601 date string)
|
|
1434
|
+
*/
|
|
1435
|
+
date?: string | null;
|
|
1436
|
+
/**
|
|
1437
|
+
* Value for checkbox fields
|
|
1438
|
+
*/
|
|
1439
|
+
boolean?: boolean | string | null;
|
|
1440
|
+
/**
|
|
1441
|
+
* Option ID for single-select fields
|
|
1442
|
+
*/
|
|
1443
|
+
select?: number | null;
|
|
1444
|
+
/**
|
|
1445
|
+
* Option IDs for multi-select fields
|
|
1446
|
+
*/
|
|
1447
|
+
multi_select?: Array<number> | null;
|
|
1448
|
+
};
|
|
1449
|
+
}> | null;
|
|
1450
|
+
locked: boolean;
|
|
1451
|
+
}>;
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
type GetPartnerDealRequirementsResponse = GetPartnerDealRequirementsResponses[keyof GetPartnerDealRequirementsResponses];
|
|
1455
|
+
type GetPartnerDealData = {
|
|
1456
|
+
body?: never;
|
|
1457
|
+
path: {
|
|
1458
|
+
partnershipId: string;
|
|
1459
|
+
dealId: string;
|
|
1460
|
+
};
|
|
1461
|
+
query?: never;
|
|
1462
|
+
url: '/partner/{partnershipId}/deals/{dealId}';
|
|
1463
|
+
};
|
|
1464
|
+
type GetPartnerDealResponses = {
|
|
1465
|
+
/**
|
|
1466
|
+
* Default Response
|
|
1467
|
+
*/
|
|
1468
|
+
200: {
|
|
1469
|
+
uuid: string;
|
|
1470
|
+
created_at: string;
|
|
1471
|
+
updated_at: string;
|
|
1472
|
+
deal_value: number;
|
|
1473
|
+
total_commission_occurrences: number | null;
|
|
1474
|
+
lead_id: string;
|
|
1475
|
+
total_commission_value: number | null;
|
|
1476
|
+
stage_id: string | null;
|
|
1477
|
+
label: string;
|
|
1478
|
+
created_by_user_id: string | null;
|
|
1479
|
+
expiration_date: string | null;
|
|
1480
|
+
expired_at: string | null;
|
|
1481
|
+
currency_code: string | null;
|
|
1482
|
+
stage: {
|
|
1483
|
+
id: string;
|
|
1484
|
+
label: string | null;
|
|
1485
|
+
series: number | null;
|
|
1486
|
+
phase: 'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold' | null;
|
|
1487
|
+
} | null;
|
|
1488
|
+
created_by_user_first_name: string | null;
|
|
1489
|
+
created_by_user_last_name: string | null;
|
|
1490
|
+
created_by_user_email: string | null;
|
|
1491
|
+
created_by_user_profile_image_id: number | null;
|
|
1492
|
+
created_by_user_profile_image_uuid: string | null;
|
|
1493
|
+
lead_company_name: string | null;
|
|
1494
|
+
lead_first_name: string | null;
|
|
1495
|
+
lead_last_name: string | null;
|
|
1496
|
+
lead_email: string | null;
|
|
1497
|
+
lead_phone_number: string | null;
|
|
1498
|
+
lead_direction: 'sent' | 'received' | null;
|
|
1499
|
+
lead_status: 'new' | 'converted' | 'rejected';
|
|
1500
|
+
lead_campaign_id: string | null;
|
|
1501
|
+
campaign_title: string | null;
|
|
1502
|
+
partnership: {
|
|
1503
|
+
id: string;
|
|
1504
|
+
uuid: string;
|
|
1505
|
+
name: string | null;
|
|
1506
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
1507
|
+
logo_square_id: number | null;
|
|
1508
|
+
logo_square_uuid: string | null;
|
|
1509
|
+
partnership_distributors_id: string | null;
|
|
1510
|
+
distributor_name: string | null;
|
|
1511
|
+
distributor_logo_square_id: number | null;
|
|
1512
|
+
distributor_logo_square_uuid: string | null;
|
|
1513
|
+
} | null;
|
|
1514
|
+
tags: Array<{
|
|
1515
|
+
id: string;
|
|
1516
|
+
label: string;
|
|
1517
|
+
background_color: string;
|
|
1518
|
+
text_color: string | null;
|
|
1519
|
+
}>;
|
|
1520
|
+
assigned_users: Array<{
|
|
1521
|
+
id: string;
|
|
1522
|
+
first_name: string | null;
|
|
1523
|
+
last_name: string | null;
|
|
1524
|
+
email: string;
|
|
1525
|
+
profile_image_id: number | null;
|
|
1526
|
+
profile_image_uuid: string | null;
|
|
1527
|
+
}>;
|
|
1528
|
+
assigned_contacts: Array<{
|
|
1529
|
+
id: string;
|
|
1530
|
+
first_name: string | null;
|
|
1531
|
+
last_name: string | null;
|
|
1532
|
+
email: string;
|
|
1533
|
+
profile_image_id: number | null;
|
|
1534
|
+
profile_image_uuid: string | null;
|
|
1535
|
+
}>;
|
|
1536
|
+
custom_fields: Array<{
|
|
1537
|
+
id: string;
|
|
1538
|
+
label: string;
|
|
1539
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
1540
|
+
value: {
|
|
1541
|
+
/**
|
|
1542
|
+
* Value for text-like fields
|
|
1543
|
+
*/
|
|
1544
|
+
text?: string | null;
|
|
1545
|
+
/**
|
|
1546
|
+
* Legacy value key for textarea fields; write using text
|
|
1547
|
+
*/
|
|
1548
|
+
textarea?: string | null;
|
|
1549
|
+
/**
|
|
1550
|
+
* Value for number fields
|
|
1551
|
+
*/
|
|
1552
|
+
number?: number | string | null;
|
|
1553
|
+
/**
|
|
1554
|
+
* Value for date fields (ISO 8601 date string)
|
|
1555
|
+
*/
|
|
1556
|
+
date?: string | null;
|
|
1557
|
+
/**
|
|
1558
|
+
* Value for checkbox fields
|
|
1559
|
+
*/
|
|
1560
|
+
boolean?: boolean | string | null;
|
|
1561
|
+
/**
|
|
1562
|
+
* Option ID for single-select fields
|
|
1563
|
+
*/
|
|
1564
|
+
select?: number | null;
|
|
1565
|
+
/**
|
|
1566
|
+
* Option IDs for multi-select fields
|
|
1567
|
+
*/
|
|
1568
|
+
multi_select?: Array<number> | null;
|
|
1569
|
+
} | null;
|
|
1570
|
+
options: Array<{
|
|
1571
|
+
id: number;
|
|
1572
|
+
label: string;
|
|
1573
|
+
}> | null;
|
|
1574
|
+
custom_field_value_id: string | null;
|
|
1575
|
+
}>;
|
|
1576
|
+
has_quote: boolean;
|
|
1577
|
+
has_products: boolean;
|
|
1578
|
+
has_live_calculators: boolean;
|
|
1579
|
+
entry_commission_values?: Array<{
|
|
1580
|
+
stage_label: string | null;
|
|
1581
|
+
commission_value: number;
|
|
1582
|
+
}>;
|
|
1583
|
+
spiff_entry_commission_values?: Array<{
|
|
1584
|
+
stage_label: string | null;
|
|
1585
|
+
commission_value: number;
|
|
1586
|
+
recipient_type?: 'partnership' | 'user' | 'contact' | null;
|
|
1587
|
+
recipient_user_id?: string;
|
|
1588
|
+
recipient_contact_id?: string;
|
|
1589
|
+
recipient_name?: string;
|
|
1590
|
+
}>;
|
|
1591
|
+
total_spiff_value?: number;
|
|
1592
|
+
commission_overrides?: Array<{
|
|
1593
|
+
stage_label: string | null;
|
|
1594
|
+
amount: number;
|
|
1595
|
+
currency_code: string | null;
|
|
1596
|
+
note: string | null;
|
|
1597
|
+
document: {
|
|
1598
|
+
uuid: string;
|
|
1599
|
+
file_url: string | null;
|
|
1600
|
+
file_name: string | null;
|
|
1601
|
+
mime_type: string | null;
|
|
1602
|
+
} | null;
|
|
1603
|
+
}>;
|
|
1604
|
+
id: string;
|
|
1605
|
+
};
|
|
1606
|
+
};
|
|
1607
|
+
type GetPartnerDealResponse = GetPartnerDealResponses[keyof GetPartnerDealResponses];
|
|
1608
|
+
type UpdatePartnerDealData = {
|
|
1609
|
+
body: {
|
|
1610
|
+
fields?: {
|
|
1611
|
+
stage_id?: string;
|
|
1612
|
+
label?: string;
|
|
1613
|
+
expiration_date?: string | null;
|
|
1614
|
+
custom_field_values?: Array<{
|
|
1615
|
+
custom_field_id: string;
|
|
1616
|
+
custom_field_value_id?: string;
|
|
1617
|
+
value: {
|
|
1618
|
+
/**
|
|
1619
|
+
* Value for text-like fields
|
|
1620
|
+
*/
|
|
1621
|
+
text?: string | null;
|
|
1622
|
+
/**
|
|
1623
|
+
* Legacy value key for textarea fields; write using text
|
|
1624
|
+
*/
|
|
1625
|
+
textarea?: string | null;
|
|
1626
|
+
/**
|
|
1627
|
+
* Value for number fields
|
|
1628
|
+
*/
|
|
1629
|
+
number?: number | string | null;
|
|
1630
|
+
/**
|
|
1631
|
+
* Value for date fields (ISO 8601 date string)
|
|
1632
|
+
*/
|
|
1633
|
+
date?: string | null;
|
|
1634
|
+
/**
|
|
1635
|
+
* Value for checkbox fields
|
|
1636
|
+
*/
|
|
1637
|
+
boolean?: boolean | string | null;
|
|
1638
|
+
/**
|
|
1639
|
+
* Option ID for single-select fields
|
|
1640
|
+
*/
|
|
1641
|
+
select?: number | null;
|
|
1642
|
+
/**
|
|
1643
|
+
* Option IDs for multi-select fields
|
|
1644
|
+
*/
|
|
1645
|
+
multi_select?: Array<number> | null;
|
|
1646
|
+
};
|
|
1647
|
+
}>;
|
|
1648
|
+
partner_custom_field_values?: Array<{
|
|
1649
|
+
custom_field_id: string;
|
|
1650
|
+
custom_field_value_id?: string;
|
|
1651
|
+
lead_deal_id: string;
|
|
1652
|
+
value: {
|
|
1653
|
+
/**
|
|
1654
|
+
* Value for text-like fields
|
|
1655
|
+
*/
|
|
1656
|
+
text?: string | null;
|
|
1657
|
+
/**
|
|
1658
|
+
* Legacy value key for textarea fields; write using text
|
|
1659
|
+
*/
|
|
1660
|
+
textarea?: string | null;
|
|
1661
|
+
/**
|
|
1662
|
+
* Value for number fields
|
|
1663
|
+
*/
|
|
1664
|
+
number?: number | string | null;
|
|
1665
|
+
/**
|
|
1666
|
+
* Value for date fields (ISO 8601 date string)
|
|
1667
|
+
*/
|
|
1668
|
+
date?: string | null;
|
|
1669
|
+
/**
|
|
1670
|
+
* Value for checkbox fields
|
|
1671
|
+
*/
|
|
1672
|
+
boolean?: boolean | string | null;
|
|
1673
|
+
/**
|
|
1674
|
+
* Option ID for single-select fields
|
|
1675
|
+
*/
|
|
1676
|
+
select?: number | null;
|
|
1677
|
+
/**
|
|
1678
|
+
* Option IDs for multi-select fields
|
|
1679
|
+
*/
|
|
1680
|
+
multi_select?: Array<number> | null;
|
|
1681
|
+
} | null;
|
|
1682
|
+
}>;
|
|
1683
|
+
tag?: {
|
|
1684
|
+
id?: string;
|
|
1685
|
+
label?: string;
|
|
1686
|
+
background_color?: string;
|
|
1687
|
+
text_color?: string | null;
|
|
1688
|
+
added?: boolean;
|
|
1689
|
+
removed?: boolean;
|
|
1690
|
+
};
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
path: {
|
|
1694
|
+
partnershipId: string;
|
|
1695
|
+
dealId: string;
|
|
1696
|
+
};
|
|
1697
|
+
query?: never;
|
|
1698
|
+
url: '/partner/{partnershipId}/deals/{dealId}';
|
|
1699
|
+
};
|
|
1700
|
+
type UpdatePartnerDealResponses = {
|
|
1701
|
+
/**
|
|
1702
|
+
* Default Response
|
|
1703
|
+
*/
|
|
1704
|
+
200: {
|
|
1705
|
+
uuid: string;
|
|
1706
|
+
created_at: string;
|
|
1707
|
+
updated_at: string;
|
|
1708
|
+
deal_value: number;
|
|
1709
|
+
total_commission_occurrences: number | null;
|
|
1710
|
+
lead_id: string;
|
|
1711
|
+
total_commission_value: number | null;
|
|
1712
|
+
stage_id: string | null;
|
|
1713
|
+
label: string;
|
|
1714
|
+
created_by_user_id: string | null;
|
|
1715
|
+
expiration_date: string | null;
|
|
1716
|
+
expired_at: string | null;
|
|
1717
|
+
currency_code: string | null;
|
|
1718
|
+
stage: {
|
|
1719
|
+
id: string;
|
|
1720
|
+
label: string | null;
|
|
1721
|
+
series: number | null;
|
|
1722
|
+
phase: 'new' | 'in_progress' | 'won' | 'lost' | 'expired' | 'on_hold' | null;
|
|
1723
|
+
} | null;
|
|
1724
|
+
created_by_user_first_name: string | null;
|
|
1725
|
+
created_by_user_last_name: string | null;
|
|
1726
|
+
created_by_user_email: string | null;
|
|
1727
|
+
created_by_user_profile_image_id: number | null;
|
|
1728
|
+
created_by_user_profile_image_uuid: string | null;
|
|
1729
|
+
lead_company_name: string | null;
|
|
1730
|
+
lead_first_name: string | null;
|
|
1731
|
+
lead_last_name: string | null;
|
|
1732
|
+
lead_email: string | null;
|
|
1733
|
+
lead_phone_number: string | null;
|
|
1734
|
+
lead_direction: 'sent' | 'received' | null;
|
|
1735
|
+
lead_status: 'new' | 'converted' | 'rejected';
|
|
1736
|
+
lead_campaign_id: string | null;
|
|
1737
|
+
campaign_title: string | null;
|
|
1738
|
+
partnership: {
|
|
1739
|
+
id: string;
|
|
1740
|
+
uuid: string;
|
|
1741
|
+
name: string | null;
|
|
1742
|
+
partner_type: 'referral' | 'reseller' | 'distributor';
|
|
1743
|
+
logo_square_id: number | null;
|
|
1744
|
+
logo_square_uuid: string | null;
|
|
1745
|
+
partnership_distributors_id: string | null;
|
|
1746
|
+
distributor_name: string | null;
|
|
1747
|
+
distributor_logo_square_id: number | null;
|
|
1748
|
+
distributor_logo_square_uuid: string | null;
|
|
1749
|
+
} | null;
|
|
1750
|
+
tags: Array<{
|
|
1751
|
+
id: string;
|
|
1752
|
+
label: string;
|
|
1753
|
+
background_color: string;
|
|
1754
|
+
text_color: string | null;
|
|
1755
|
+
}>;
|
|
1756
|
+
assigned_users: Array<{
|
|
1757
|
+
id: string;
|
|
1758
|
+
first_name: string | null;
|
|
1759
|
+
last_name: string | null;
|
|
1760
|
+
email: string;
|
|
1761
|
+
profile_image_id: number | null;
|
|
1762
|
+
profile_image_uuid: string | null;
|
|
1763
|
+
}>;
|
|
1764
|
+
assigned_contacts: Array<{
|
|
1765
|
+
id: string;
|
|
1766
|
+
first_name: string | null;
|
|
1767
|
+
last_name: string | null;
|
|
1768
|
+
email: string;
|
|
1769
|
+
profile_image_id: number | null;
|
|
1770
|
+
profile_image_uuid: string | null;
|
|
1771
|
+
}>;
|
|
1772
|
+
custom_fields: Array<{
|
|
1773
|
+
id: string;
|
|
1774
|
+
label: string;
|
|
1775
|
+
type: 'text' | 'textarea' | 'email' | 'website' | 'phone' | 'number' | 'date' | 'boolean' | 'checkbox' | 'select' | 'multi_select';
|
|
1776
|
+
value: {
|
|
1777
|
+
/**
|
|
1778
|
+
* Value for text-like fields
|
|
1779
|
+
*/
|
|
1780
|
+
text?: string | null;
|
|
1781
|
+
/**
|
|
1782
|
+
* Legacy value key for textarea fields; write using text
|
|
1783
|
+
*/
|
|
1784
|
+
textarea?: string | null;
|
|
1785
|
+
/**
|
|
1786
|
+
* Value for number fields
|
|
1787
|
+
*/
|
|
1788
|
+
number?: number | string | null;
|
|
1789
|
+
/**
|
|
1790
|
+
* Value for date fields (ISO 8601 date string)
|
|
1791
|
+
*/
|
|
1792
|
+
date?: string | null;
|
|
1793
|
+
/**
|
|
1794
|
+
* Value for checkbox fields
|
|
1795
|
+
*/
|
|
1796
|
+
boolean?: boolean | string | null;
|
|
1797
|
+
/**
|
|
1798
|
+
* Option ID for single-select fields
|
|
1799
|
+
*/
|
|
1800
|
+
select?: number | null;
|
|
1801
|
+
/**
|
|
1802
|
+
* Option IDs for multi-select fields
|
|
1803
|
+
*/
|
|
1804
|
+
multi_select?: Array<number> | null;
|
|
1805
|
+
} | null;
|
|
1806
|
+
options: Array<{
|
|
1807
|
+
id: number;
|
|
1808
|
+
label: string;
|
|
1809
|
+
}> | null;
|
|
1810
|
+
custom_field_value_id: string | null;
|
|
1811
|
+
}>;
|
|
1812
|
+
has_quote: boolean;
|
|
1813
|
+
has_products: boolean;
|
|
1814
|
+
has_live_calculators: boolean;
|
|
1815
|
+
entry_commission_values?: Array<{
|
|
1816
|
+
stage_label: string | null;
|
|
1817
|
+
commission_value: number;
|
|
1818
|
+
}>;
|
|
1819
|
+
spiff_entry_commission_values?: Array<{
|
|
1820
|
+
stage_label: string | null;
|
|
1821
|
+
commission_value: number;
|
|
1822
|
+
recipient_type?: 'partnership' | 'user' | 'contact' | null;
|
|
1823
|
+
recipient_user_id?: string;
|
|
1824
|
+
recipient_contact_id?: string;
|
|
1825
|
+
recipient_name?: string;
|
|
1826
|
+
}>;
|
|
1827
|
+
total_spiff_value?: number;
|
|
1828
|
+
commission_overrides?: Array<{
|
|
1829
|
+
stage_label: string | null;
|
|
1830
|
+
amount: number;
|
|
1831
|
+
currency_code: string | null;
|
|
1832
|
+
note: string | null;
|
|
1833
|
+
document: {
|
|
1834
|
+
uuid: string;
|
|
1835
|
+
file_url: string | null;
|
|
1836
|
+
file_name: string | null;
|
|
1837
|
+
mime_type: string | null;
|
|
1838
|
+
} | null;
|
|
1839
|
+
}>;
|
|
1840
|
+
id: string;
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
type UpdatePartnerDealResponse = UpdatePartnerDealResponses[keyof UpdatePartnerDealResponses];
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* The `createClientConfig()` function will be called on client initialization
|
|
1847
|
+
* and the returned object will become the client's initial configuration.
|
|
1848
|
+
*
|
|
1849
|
+
* You may want to initialize your client this way instead of calling
|
|
1850
|
+
* `setConfig()`. This is useful for example if you're using Next.js
|
|
1851
|
+
* to ensure your client always has the correct values.
|
|
1852
|
+
*/
|
|
1853
|
+
type CreateClientConfig<T extends ClientOptions$1 = ClientOptions> = (override?: Config<ClientOptions$1 & T>) => Config<Required<ClientOptions$1> & T>;
|
|
1854
|
+
declare const client: Client;
|
|
1855
|
+
|
|
1856
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
1857
|
+
/**
|
|
1858
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
1859
|
+
* individual options. This might be also useful if you want to implement a
|
|
1860
|
+
* custom client.
|
|
1861
|
+
*/
|
|
1862
|
+
client?: Client;
|
|
1863
|
+
/**
|
|
1864
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
1865
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
1866
|
+
*/
|
|
1867
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
1868
|
+
};
|
|
1869
|
+
/**
|
|
1870
|
+
* Get partner identity and accessible partnerships
|
|
1871
|
+
*/
|
|
1872
|
+
declare const getPartnerMe: <ThrowOnError extends boolean = false>(options?: Options<GetPartnerMeData, ThrowOnError>) => RequestResult<GetPartnerMeResponses, unknown, ThrowOnError>;
|
|
1873
|
+
/**
|
|
1874
|
+
* List partnership leads
|
|
1875
|
+
*/
|
|
1876
|
+
declare const listPartnerLeads: <ThrowOnError extends boolean = false>(options: Options<ListPartnerLeadsData, ThrowOnError>) => RequestResult<ListPartnerLeadsResponses, unknown, ThrowOnError>;
|
|
1877
|
+
/**
|
|
1878
|
+
* Create a partnership lead
|
|
1879
|
+
*
|
|
1880
|
+
* Custom fields may be required or rule-controlled — call getPartnerLeadRequirements first to learn the field/rule constraints. Validation failures return per-field `details` with machine-readable `reason` codes.
|
|
1881
|
+
*/
|
|
1882
|
+
declare const createPartnerLead: <ThrowOnError extends boolean = false>(options: Options<CreatePartnerLeadData, ThrowOnError>) => RequestResult<CreatePartnerLeadResponses, CreatePartnerLeadErrors, ThrowOnError>;
|
|
1883
|
+
/**
|
|
1884
|
+
* Get lead custom field requirements
|
|
1885
|
+
*
|
|
1886
|
+
* Returns the custom fields and rules that createPartnerLead and updatePartnerLead enforce for this partnership — the fields (with their required flag) and active rules (visibility, locking, auto-population) a lead submission must satisfy.
|
|
1887
|
+
*/
|
|
1888
|
+
declare const getPartnerLeadRequirements: <ThrowOnError extends boolean = false>(options: Options<GetPartnerLeadRequirementsData, ThrowOnError>) => RequestResult<GetPartnerLeadRequirementsResponses, unknown, ThrowOnError>;
|
|
1889
|
+
/**
|
|
1890
|
+
* Get a partnership lead
|
|
1891
|
+
*/
|
|
1892
|
+
declare const getPartnerLead: <ThrowOnError extends boolean = false>(options: Options<GetPartnerLeadData, ThrowOnError>) => RequestResult<GetPartnerLeadResponses, unknown, ThrowOnError>;
|
|
1893
|
+
/**
|
|
1894
|
+
* Update a partnership lead
|
|
1895
|
+
*
|
|
1896
|
+
* Custom fields may be required or rule-controlled — call getPartnerLeadRequirements first to learn the field/rule constraints. Validation failures return per-field `details` with machine-readable `reason` codes.
|
|
1897
|
+
*/
|
|
1898
|
+
declare const updatePartnerLead: <ThrowOnError extends boolean = false>(options: Options<UpdatePartnerLeadData, ThrowOnError>) => RequestResult<UpdatePartnerLeadResponses, unknown, ThrowOnError>;
|
|
1899
|
+
/**
|
|
1900
|
+
* List partnership deals
|
|
1901
|
+
*/
|
|
1902
|
+
declare const listPartnerDeals: <ThrowOnError extends boolean = false>(options: Options<ListPartnerDealsData, ThrowOnError>) => RequestResult<ListPartnerDealsResponses, unknown, ThrowOnError>;
|
|
1903
|
+
/**
|
|
1904
|
+
* Create a partnership deal
|
|
1905
|
+
*
|
|
1906
|
+
* Custom fields may be required or rule-controlled — call getPartnerDealRequirements first to learn the field/rule constraints. Validation failures return per-field `details` with machine-readable `reason` codes.
|
|
1907
|
+
*/
|
|
1908
|
+
declare const createPartnerDeal: <ThrowOnError extends boolean = false>(options: Options<CreatePartnerDealData, ThrowOnError>) => RequestResult<CreatePartnerDealResponses, CreatePartnerDealErrors, ThrowOnError>;
|
|
1909
|
+
/**
|
|
1910
|
+
* Get deal custom field requirements
|
|
1911
|
+
*
|
|
1912
|
+
* Returns the custom fields and rules that createPartnerDeal and updatePartnerDeal enforce for this partnership — the fields (with their required flag) and active rules (visibility, locking, auto-population) a deal submission must satisfy. Deal field requirements follow the deal's owning partnership; when creating a deal from another partnership's lead (a distributor roll-up), the lead's own partnership type governs instead.
|
|
1913
|
+
*/
|
|
1914
|
+
declare const getPartnerDealRequirements: <ThrowOnError extends boolean = false>(options: Options<GetPartnerDealRequirementsData, ThrowOnError>) => RequestResult<GetPartnerDealRequirementsResponses, unknown, ThrowOnError>;
|
|
1915
|
+
/**
|
|
1916
|
+
* Get a partnership deal
|
|
1917
|
+
*/
|
|
1918
|
+
declare const getPartnerDeal: <ThrowOnError extends boolean = false>(options: Options<GetPartnerDealData, ThrowOnError>) => RequestResult<GetPartnerDealResponses, unknown, ThrowOnError>;
|
|
1919
|
+
/**
|
|
1920
|
+
* Update a partnership deal
|
|
1921
|
+
*
|
|
1922
|
+
* Custom fields may be required or rule-controlled — call getPartnerDealRequirements first to learn the field/rule constraints. Validation failures return per-field `details` with machine-readable `reason` codes.
|
|
1923
|
+
*/
|
|
1924
|
+
declare const updatePartnerDeal: <ThrowOnError extends boolean = false>(options: Options<UpdatePartnerDealData, ThrowOnError>) => RequestResult<UpdatePartnerDealResponses, unknown, ThrowOnError>;
|
|
1925
|
+
|
|
1926
|
+
export { type Client, type ClientOptions, type Config, type CreateClientConfig, type CreatePartnerDealData, type CreatePartnerDealError, type CreatePartnerDealErrors, type CreatePartnerDealResponse, type CreatePartnerDealResponses, type CreatePartnerLeadData, type CreatePartnerLeadError, type CreatePartnerLeadErrors, type CreatePartnerLeadResponse, type CreatePartnerLeadResponses, type GetPartnerDealData, type GetPartnerDealRequirementsData, type GetPartnerDealRequirementsResponse, type GetPartnerDealRequirementsResponses, type GetPartnerDealResponse, type GetPartnerDealResponses, type GetPartnerLeadData, type GetPartnerLeadRequirementsData, type GetPartnerLeadRequirementsResponse, type GetPartnerLeadRequirementsResponses, type GetPartnerLeadResponse, type GetPartnerLeadResponses, type GetPartnerMeData, type GetPartnerMeResponse, type GetPartnerMeResponses, type ListPartnerDealsData, type ListPartnerDealsResponse, type ListPartnerDealsResponses, type ListPartnerLeadsData, type ListPartnerLeadsResponse, type ListPartnerLeadsResponses, type Options, type UpdatePartnerDealData, type UpdatePartnerDealResponse, type UpdatePartnerDealResponses, type UpdatePartnerLeadData, type UpdatePartnerLeadResponse, type UpdatePartnerLeadResponses, client, createClient, createConfig, createPartnerDeal, createPartnerLead, getPartnerDeal, getPartnerDealRequirements, getPartnerLead, getPartnerLeadRequirements, getPartnerMe, listPartnerDeals, listPartnerLeads, updatePartnerDeal, updatePartnerLead };
|