@wefunder/sdk 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/index.cjs +1264 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4567 -0
- package/dist/index.d.ts +4567 -0
- package/dist/index.js +1221 -0
- package/dist/index.js.map +1 -0
- package/package.json +63 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4567 @@
|
|
|
1
|
+
import * as _hey_api_client_fetch from '@hey-api/client-fetch';
|
|
2
|
+
import { TDataShape, Options as Options$1, Client } from '@hey-api/client-fetch';
|
|
3
|
+
|
|
4
|
+
/** Host for the browser /authorize redirect. Stays on wefunder.com. */
|
|
5
|
+
declare const DEFAULT_AUTHORIZE_BASE_URL = "https://wefunder.com/oauth";
|
|
6
|
+
declare const DEFAULT_TOKEN_BASE_URL = "https://wefunder.com/oauth";
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `authorizeBaseUrl` / `tokenBaseUrl` instead. Kept as a convenience
|
|
9
|
+
* alias that sets BOTH hosts at once. Equals the authorize default today.
|
|
10
|
+
*/
|
|
11
|
+
declare const DEFAULT_OAUTH_BASE_URL = "https://wefunder.com/oauth";
|
|
12
|
+
/** Hosts can be set together (`oauthBaseUrl`) or independently. Precedence: specific > alias > default. */
|
|
13
|
+
interface OAuthHostOptions {
|
|
14
|
+
/** Overrides BOTH hosts. Prefer the specific options below. */
|
|
15
|
+
oauthBaseUrl?: string;
|
|
16
|
+
/** Host for the /authorize redirect. */
|
|
17
|
+
authorizeBaseUrl?: string;
|
|
18
|
+
/** Host for /token + refresh. */
|
|
19
|
+
tokenBaseUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
interface TokenSet {
|
|
22
|
+
accessToken: string;
|
|
23
|
+
refreshToken?: string;
|
|
24
|
+
/** Epoch milliseconds at which the access token expires (if the server told us). */
|
|
25
|
+
expiresAt?: number;
|
|
26
|
+
scope?: string;
|
|
27
|
+
tokenType?: string;
|
|
28
|
+
}
|
|
29
|
+
interface Pkce {
|
|
30
|
+
codeVerifier: string;
|
|
31
|
+
codeChallenge: string;
|
|
32
|
+
codeChallengeMethod: "S256";
|
|
33
|
+
}
|
|
34
|
+
/** Generate a PKCE verifier/challenge pair (RFC 7636, S256). */
|
|
35
|
+
declare function generatePkce(): Pkce;
|
|
36
|
+
interface AuthorizationUrlOptions extends OAuthHostOptions {
|
|
37
|
+
clientId: string;
|
|
38
|
+
redirectUri: string;
|
|
39
|
+
scopes: string[];
|
|
40
|
+
/** Opaque CSRF token you generate and verify on callback. */
|
|
41
|
+
state: string;
|
|
42
|
+
pkce: Pkce;
|
|
43
|
+
}
|
|
44
|
+
/** Build the URL to redirect a user to for the authorization_code + PKCE flow. */
|
|
45
|
+
declare function createAuthorizationUrl(opts: AuthorizationUrlOptions): string;
|
|
46
|
+
interface ExchangeCodeOptions extends OAuthHostOptions {
|
|
47
|
+
clientId: string;
|
|
48
|
+
/** Public (PKCE) clients omit this; confidential clients pass it. */
|
|
49
|
+
clientSecret?: string;
|
|
50
|
+
code: string;
|
|
51
|
+
redirectUri: string;
|
|
52
|
+
codeVerifier: string;
|
|
53
|
+
fetch?: typeof fetch;
|
|
54
|
+
now?: () => number;
|
|
55
|
+
}
|
|
56
|
+
/** Exchange an authorization code (+ PKCE verifier) for a token set. */
|
|
57
|
+
declare function exchangeCode(opts: ExchangeCodeOptions): Promise<TokenSet>;
|
|
58
|
+
interface ClientCredentialsOptions extends OAuthHostOptions {
|
|
59
|
+
clientId: string;
|
|
60
|
+
clientSecret: string;
|
|
61
|
+
scopes?: string[];
|
|
62
|
+
fetch?: typeof fetch;
|
|
63
|
+
now?: () => number;
|
|
64
|
+
}
|
|
65
|
+
declare function clientCredentialsGrant(opts: ClientCredentialsOptions): Promise<TokenSet>;
|
|
66
|
+
interface RefreshOptions extends OAuthHostOptions {
|
|
67
|
+
clientId: string;
|
|
68
|
+
clientSecret?: string;
|
|
69
|
+
refreshToken: string;
|
|
70
|
+
fetch?: typeof fetch;
|
|
71
|
+
now?: () => number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Refresh an access token. CRITICAL: the returned TokenSet carries a NEW refresh
|
|
75
|
+
* token (rotation). The caller MUST persist it — reusing the old refresh token
|
|
76
|
+
* after rotation results in a permanent 401. The client/TokenManager handles this.
|
|
77
|
+
*/
|
|
78
|
+
declare function refreshToken(opts: RefreshOptions): Promise<TokenSet>;
|
|
79
|
+
|
|
80
|
+
/** Pluggable persistence for the rotating token set (DB row, secrets manager, etc.). */
|
|
81
|
+
interface TokenStore {
|
|
82
|
+
load?(): Promise<TokenSet | undefined> | TokenSet | undefined;
|
|
83
|
+
save(tokens: TokenSet): Promise<void> | void;
|
|
84
|
+
}
|
|
85
|
+
interface TokenManagerOptions extends OAuthHostOptions {
|
|
86
|
+
tokens: TokenSet;
|
|
87
|
+
clientId?: string;
|
|
88
|
+
clientSecret?: string;
|
|
89
|
+
/**
|
|
90
|
+
* For client_credentials clients: mint a fresh token from the stored grant inputs.
|
|
91
|
+
* When set (and there's no refresh token), this is the recovery strategy.
|
|
92
|
+
*/
|
|
93
|
+
reMint?: () => Promise<TokenSet>;
|
|
94
|
+
/** Called with the new TokenSet on every successful recovery (rotation or re-mint). */
|
|
95
|
+
onTokenRefresh?: (tokens: TokenSet) => void | Promise<void>;
|
|
96
|
+
store?: TokenStore;
|
|
97
|
+
fetch?: typeof fetch;
|
|
98
|
+
now?: () => number;
|
|
99
|
+
/** Refresh proactively when the access token is within this many ms of expiry. */
|
|
100
|
+
expiryLeewayMs?: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface RetryOptions {
|
|
104
|
+
maxRetries?: number;
|
|
105
|
+
baseDelayMs?: number;
|
|
106
|
+
maxDelayMs?: number;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
type Cursor = string | number;
|
|
110
|
+
interface Page<T> {
|
|
111
|
+
data?: T[] | null;
|
|
112
|
+
meta?: {
|
|
113
|
+
has_more?: boolean;
|
|
114
|
+
next_cursor?: Cursor | null;
|
|
115
|
+
[k: string]: unknown;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** Fetches a single page given an opaque cursor (undefined = first page). */
|
|
119
|
+
type PageFetcher<T> = (cursor?: Cursor) => Promise<Page<T>>;
|
|
120
|
+
/** Yields every item across all pages, lazily. */
|
|
121
|
+
declare function paginate<T>(fetchPage: PageFetcher<T>): AsyncGenerator<T>;
|
|
122
|
+
/** Collect all items into an array. Convenience over `paginate` for small result sets. */
|
|
123
|
+
declare function collect<T>(fetchPage: PageFetcher<T>): Promise<T[]>;
|
|
124
|
+
|
|
125
|
+
type AttributedInvestmentListEnvelope = {
|
|
126
|
+
/**
|
|
127
|
+
* Returns AnonymizedAttribution or FullAttribution objects
|
|
128
|
+
* depending on detail_level and user permissions.
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
data?: Array<AnonymizedAttribution | FullAttribution>;
|
|
132
|
+
meta?: PaginationMeta & {
|
|
133
|
+
/**
|
|
134
|
+
* The detail level returned in this response
|
|
135
|
+
*/
|
|
136
|
+
detail_level?: 'anonymized' | 'full';
|
|
137
|
+
/**
|
|
138
|
+
* Whether the user can request full details
|
|
139
|
+
*/
|
|
140
|
+
can_view_full?: boolean;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
type AttributionCampaignSummary = {
|
|
144
|
+
id?: number;
|
|
145
|
+
company_name?: string;
|
|
146
|
+
company_id?: number;
|
|
147
|
+
state?: string;
|
|
148
|
+
/**
|
|
149
|
+
* 1=anonymized, 2=detailed (future)
|
|
150
|
+
*/
|
|
151
|
+
access_level?: number;
|
|
152
|
+
};
|
|
153
|
+
type AttributionCampaignSummaryListEnvelope = {
|
|
154
|
+
data?: Array<AttributionCampaignSummary>;
|
|
155
|
+
};
|
|
156
|
+
type AttributionUser = {
|
|
157
|
+
id?: number;
|
|
158
|
+
email?: string;
|
|
159
|
+
name?: string;
|
|
160
|
+
};
|
|
161
|
+
type AttributionPartner = {
|
|
162
|
+
id?: number;
|
|
163
|
+
company_name?: string;
|
|
164
|
+
website?: string;
|
|
165
|
+
status?: 'pending' | 'approved' | 'rejected';
|
|
166
|
+
} | null;
|
|
167
|
+
type AttributionCampaignAccess = {
|
|
168
|
+
id?: number;
|
|
169
|
+
company_name?: string;
|
|
170
|
+
company_id?: number;
|
|
171
|
+
access_level?: number;
|
|
172
|
+
};
|
|
173
|
+
type AttributionMe = {
|
|
174
|
+
user?: AttributionUser;
|
|
175
|
+
partner?: AttributionPartner;
|
|
176
|
+
campaigns?: Array<AttributionCampaignAccess>;
|
|
177
|
+
};
|
|
178
|
+
type AttributionMeEnvelope = {
|
|
179
|
+
data?: AttributionMe;
|
|
180
|
+
};
|
|
181
|
+
type ConnectedAppRevocation = {
|
|
182
|
+
revoked?: boolean;
|
|
183
|
+
tokens_revoked?: number;
|
|
184
|
+
};
|
|
185
|
+
type ConnectedAppRevocationEnvelope = {
|
|
186
|
+
data?: ConnectedAppRevocation;
|
|
187
|
+
};
|
|
188
|
+
type WebhookTestResult = {
|
|
189
|
+
message?: string;
|
|
190
|
+
delivery_id?: string;
|
|
191
|
+
/**
|
|
192
|
+
* The payload that was sent
|
|
193
|
+
*/
|
|
194
|
+
payload_preview?: {
|
|
195
|
+
[key: string]: unknown;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
type WebhookTestResultEnvelope = {
|
|
199
|
+
data?: WebhookTestResult;
|
|
200
|
+
};
|
|
201
|
+
type ConnectedAppListEnvelope = {
|
|
202
|
+
data?: Array<ConnectedApp>;
|
|
203
|
+
};
|
|
204
|
+
type DealInvestorListEnvelope = {
|
|
205
|
+
data?: Array<DealInvestor>;
|
|
206
|
+
meta?: {
|
|
207
|
+
has_more?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Number of investors on this page
|
|
210
|
+
*/
|
|
211
|
+
count?: number;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
type MemberInvestmentListEnvelope = {
|
|
215
|
+
data?: Array<MemberInvestment>;
|
|
216
|
+
meta?: {
|
|
217
|
+
/**
|
|
218
|
+
* Number of investments
|
|
219
|
+
*/
|
|
220
|
+
count?: number;
|
|
221
|
+
/**
|
|
222
|
+
* Sum of all investment amounts in cents, as a string
|
|
223
|
+
*/
|
|
224
|
+
total_amount?: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
type OfferingListEnvelope = {
|
|
228
|
+
data?: Array<Offering>;
|
|
229
|
+
meta?: {
|
|
230
|
+
/**
|
|
231
|
+
* Total number of offerings across all pages.
|
|
232
|
+
*/
|
|
233
|
+
total_count?: number;
|
|
234
|
+
/**
|
|
235
|
+
* Number of offerings on this page (at most 25).
|
|
236
|
+
*/
|
|
237
|
+
page_count?: number;
|
|
238
|
+
has_more?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* The sort applied to this response.
|
|
241
|
+
*/
|
|
242
|
+
sort?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Opaque pagination cursor — pass as `cursor` to fetch the next page. Present only when `has_more` is true.
|
|
245
|
+
*/
|
|
246
|
+
next_cursor?: number | null;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
type PartnerInviteListEnvelope = {
|
|
250
|
+
data?: Array<PartnerInvite>;
|
|
251
|
+
};
|
|
252
|
+
type PartnerWebhookSubscriptionListEnvelope = {
|
|
253
|
+
data?: Array<PartnerWebhookSubscription>;
|
|
254
|
+
};
|
|
255
|
+
type SpvWithMetaEnvelope = {
|
|
256
|
+
data?: Spv;
|
|
257
|
+
meta?: {
|
|
258
|
+
request_id?: string;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
type SyndicateDealListEnvelope = {
|
|
262
|
+
data?: Array<SyndicateDeal>;
|
|
263
|
+
meta?: {
|
|
264
|
+
count?: number;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
type WebhookSubscriptionListEnvelope = {
|
|
268
|
+
data?: Array<WebhookSubscription>;
|
|
269
|
+
meta?: {
|
|
270
|
+
/**
|
|
271
|
+
* Number of active subscriptions
|
|
272
|
+
*/
|
|
273
|
+
total?: number;
|
|
274
|
+
/**
|
|
275
|
+
* Maximum subscriptions per application
|
|
276
|
+
*/
|
|
277
|
+
limit?: number;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
type WebhookSubscriptionWithRecentDeliveriesEnvelope = {
|
|
281
|
+
data?: WebhookSubscription & {
|
|
282
|
+
/**
|
|
283
|
+
* Last 10 delivery attempts
|
|
284
|
+
*/
|
|
285
|
+
recent_deliveries?: Array<WebhookDelivery>;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
type WebhookSubscriptionWithSecret2Envelope = {
|
|
289
|
+
data?: WebhookSubscription & {
|
|
290
|
+
/**
|
|
291
|
+
* New HMAC signing secret
|
|
292
|
+
*/
|
|
293
|
+
secret?: string;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
type WebhookSubscriptionWithSecretEnvelope = {
|
|
297
|
+
data?: WebhookSubscription & {
|
|
298
|
+
/**
|
|
299
|
+
* HMAC signing secret. **Only returned on create.**
|
|
300
|
+
* Store this securely - it cannot be retrieved later.
|
|
301
|
+
*
|
|
302
|
+
*/
|
|
303
|
+
secret?: string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
type AttributionStatsEnvelope = {
|
|
307
|
+
data?: AttributionStats;
|
|
308
|
+
};
|
|
309
|
+
type AuditEventListEnvelope = {
|
|
310
|
+
data?: Array<AuditEvent>;
|
|
311
|
+
meta?: PaginationMeta;
|
|
312
|
+
};
|
|
313
|
+
type CampaignListEnvelope = {
|
|
314
|
+
data?: Array<Campaign>;
|
|
315
|
+
meta?: PaginationMeta;
|
|
316
|
+
};
|
|
317
|
+
type IntentEnvelope = {
|
|
318
|
+
data?: Intent;
|
|
319
|
+
};
|
|
320
|
+
type IntentListEnvelope = {
|
|
321
|
+
data?: Array<Intent>;
|
|
322
|
+
meta?: PaginationMeta;
|
|
323
|
+
};
|
|
324
|
+
type InvestmentLinkEnvelope = {
|
|
325
|
+
data?: InvestmentLink;
|
|
326
|
+
};
|
|
327
|
+
type InvestmentListEnvelope = {
|
|
328
|
+
data?: Array<Investment>;
|
|
329
|
+
meta?: PaginationMeta;
|
|
330
|
+
};
|
|
331
|
+
type InvestmentSessionEnvelope = {
|
|
332
|
+
data?: InvestmentSession;
|
|
333
|
+
};
|
|
334
|
+
type InvestorEnvelope = {
|
|
335
|
+
data?: Investor;
|
|
336
|
+
};
|
|
337
|
+
type InvestorListEnvelope = {
|
|
338
|
+
data?: Array<Investor>;
|
|
339
|
+
meta?: PaginationMeta;
|
|
340
|
+
};
|
|
341
|
+
type InviteEnvelope = {
|
|
342
|
+
data?: Invite;
|
|
343
|
+
};
|
|
344
|
+
type InviteListEnvelope = {
|
|
345
|
+
data?: Array<Invite>;
|
|
346
|
+
meta?: PaginationMeta;
|
|
347
|
+
};
|
|
348
|
+
type MarketingPartnerEnvelope = {
|
|
349
|
+
data?: MarketingPartner;
|
|
350
|
+
};
|
|
351
|
+
type OfferingEnvelope = {
|
|
352
|
+
data?: Offering;
|
|
353
|
+
};
|
|
354
|
+
type PartnerInvestmentEnvelope = {
|
|
355
|
+
data?: PartnerInvestment;
|
|
356
|
+
};
|
|
357
|
+
type PartnerInvestmentListEnvelope = {
|
|
358
|
+
data?: Array<PartnerInvestment>;
|
|
359
|
+
meta?: PaginationMeta;
|
|
360
|
+
};
|
|
361
|
+
type PartnerInviteEnvelope = {
|
|
362
|
+
data?: PartnerInvite;
|
|
363
|
+
};
|
|
364
|
+
type PartnerWebhookEventEnvelope = {
|
|
365
|
+
data?: PartnerWebhookEvent;
|
|
366
|
+
};
|
|
367
|
+
type PartnerWebhookSubscriptionEnvelope = {
|
|
368
|
+
data?: PartnerWebhookSubscription;
|
|
369
|
+
};
|
|
370
|
+
type PartnerWebhookSubscriptionWithSecretEnvelope = {
|
|
371
|
+
data?: PartnerWebhookSubscriptionWithSecret;
|
|
372
|
+
};
|
|
373
|
+
type SpvCloseStatusEnvelope = {
|
|
374
|
+
data?: SpvCloseStatus;
|
|
375
|
+
};
|
|
376
|
+
type SpvEnvelope = {
|
|
377
|
+
data?: Spv;
|
|
378
|
+
};
|
|
379
|
+
type SpvListEnvelope = {
|
|
380
|
+
data?: Array<Spv>;
|
|
381
|
+
meta?: PaginationMeta;
|
|
382
|
+
};
|
|
383
|
+
type SyndicateDealDetailEnvelope = {
|
|
384
|
+
data?: SyndicateDealDetail;
|
|
385
|
+
};
|
|
386
|
+
type SyndicateDealEnvelope = {
|
|
387
|
+
data?: SyndicateDeal;
|
|
388
|
+
};
|
|
389
|
+
type SyndicateDetailEnvelope = {
|
|
390
|
+
data?: SyndicateDetail;
|
|
391
|
+
};
|
|
392
|
+
type SyndicateListEnvelope = {
|
|
393
|
+
data?: Array<Syndicate>;
|
|
394
|
+
meta?: PaginationMeta;
|
|
395
|
+
};
|
|
396
|
+
type SyndicateMemberEnvelope = {
|
|
397
|
+
data?: SyndicateMember;
|
|
398
|
+
};
|
|
399
|
+
type SyndicateMemberListEnvelope = {
|
|
400
|
+
data?: Array<SyndicateMember>;
|
|
401
|
+
meta?: PaginationMeta;
|
|
402
|
+
};
|
|
403
|
+
type SyndicateStatisticsEnvelope = {
|
|
404
|
+
data?: SyndicateStatistics;
|
|
405
|
+
};
|
|
406
|
+
type UserEnvelope = {
|
|
407
|
+
data?: User;
|
|
408
|
+
};
|
|
409
|
+
type WebhookSubscriptionEnvelope = {
|
|
410
|
+
data?: WebhookSubscription;
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* A public offering (a fundraise), addressed by its `ofr_` external id. Returned by the
|
|
414
|
+
* Explore endpoints. Monetary fields are USD decimal strings — parse them as decimals, not
|
|
415
|
+
* floats.
|
|
416
|
+
*
|
|
417
|
+
*/
|
|
418
|
+
type Offering = {
|
|
419
|
+
/**
|
|
420
|
+
* The offering's stable external id.
|
|
421
|
+
*/
|
|
422
|
+
id?: string;
|
|
423
|
+
type?: string;
|
|
424
|
+
attributes?: {
|
|
425
|
+
company_name?: string;
|
|
426
|
+
tagline?: string | null;
|
|
427
|
+
/**
|
|
428
|
+
* The company's Wefunder profile URL.
|
|
429
|
+
*/
|
|
430
|
+
url?: string;
|
|
431
|
+
/**
|
|
432
|
+
* Absolute URL of the explore card image, or null if the company has none.
|
|
433
|
+
*/
|
|
434
|
+
card_image_url?: string | null;
|
|
435
|
+
/**
|
|
436
|
+
* Absolute URL of the company logo, or null if the company has none.
|
|
437
|
+
*/
|
|
438
|
+
logo_url?: string | null;
|
|
439
|
+
exemption?: Exemption;
|
|
440
|
+
/**
|
|
441
|
+
* The financial instrument (e.g. safe, convertible_note, equity, priced_round, fund).
|
|
442
|
+
*/
|
|
443
|
+
security_type?: string;
|
|
444
|
+
state?: string;
|
|
445
|
+
/**
|
|
446
|
+
* True for Testing-the-Waters rounds, which collect non-binding **reservations**, not
|
|
447
|
+
* investments. Use "reserve"/"reservation" copy for these, "invest"/"investment" otherwise.
|
|
448
|
+
*
|
|
449
|
+
*/
|
|
450
|
+
testing_the_waters?: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Funding target in USD, as a decimal string.
|
|
453
|
+
*/
|
|
454
|
+
funding_target?: string | null;
|
|
455
|
+
/**
|
|
456
|
+
* Minimum investment in USD, as a decimal string.
|
|
457
|
+
*/
|
|
458
|
+
min_investment?: string | null;
|
|
459
|
+
/**
|
|
460
|
+
* Amount raised so far in USD, as a decimal string (hellbanned investors excluded).
|
|
461
|
+
*/
|
|
462
|
+
amount_raised?: string | null;
|
|
463
|
+
/**
|
|
464
|
+
* Distinct investor count (hellbanned investors excluded).
|
|
465
|
+
*/
|
|
466
|
+
investor_count?: number | null;
|
|
467
|
+
started_at?: string | null;
|
|
468
|
+
closed_at?: string | null;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Reference to the parent company.
|
|
472
|
+
*/
|
|
473
|
+
company?: {
|
|
474
|
+
/**
|
|
475
|
+
* The company's `co_` external id.
|
|
476
|
+
*/
|
|
477
|
+
id?: string;
|
|
478
|
+
type?: string;
|
|
479
|
+
};
|
|
480
|
+
/**
|
|
481
|
+
* Content digest of this offering's public payload, for client-side change detection
|
|
482
|
+
* when polling.
|
|
483
|
+
*
|
|
484
|
+
*/
|
|
485
|
+
etag?: string;
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* The offering's SEC exemption, in market vocabulary.
|
|
489
|
+
*/
|
|
490
|
+
type Exemption = {
|
|
491
|
+
family?: 'reg_cf' | 'reg_d' | 'reg_a' | 'reg_s' | 'ecsp';
|
|
492
|
+
/**
|
|
493
|
+
* Sub-type/flavor — `506b` or `506c` for the `reg_d` family, otherwise null.
|
|
494
|
+
*/
|
|
495
|
+
subtype?: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* Human-readable label in normal market language.
|
|
498
|
+
*/
|
|
499
|
+
label?: string;
|
|
500
|
+
};
|
|
501
|
+
type User = {
|
|
502
|
+
id?: number;
|
|
503
|
+
type?: string;
|
|
504
|
+
attributes?: {
|
|
505
|
+
email?: string;
|
|
506
|
+
username?: string;
|
|
507
|
+
name?: string;
|
|
508
|
+
full_name?: string;
|
|
509
|
+
bio?: string | null;
|
|
510
|
+
city?: string | null;
|
|
511
|
+
country?: string | null;
|
|
512
|
+
avatar_url?: string | null;
|
|
513
|
+
created_at?: string;
|
|
514
|
+
certified_at?: string | null;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
type Investment = {
|
|
518
|
+
id?: number;
|
|
519
|
+
type?: string;
|
|
520
|
+
attributes?: {
|
|
521
|
+
amount?: number;
|
|
522
|
+
state?: string;
|
|
523
|
+
confirmed_at?: string | null;
|
|
524
|
+
created_at?: string;
|
|
525
|
+
updated_at?: string;
|
|
526
|
+
fundraise_id?: number;
|
|
527
|
+
campaign?: {
|
|
528
|
+
id?: number;
|
|
529
|
+
company_name?: string;
|
|
530
|
+
company_id?: number;
|
|
531
|
+
} | null;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
type Campaign = {
|
|
535
|
+
id?: number;
|
|
536
|
+
type?: string;
|
|
537
|
+
attributes?: {
|
|
538
|
+
state?: string;
|
|
539
|
+
company_id?: number;
|
|
540
|
+
company_name?: string;
|
|
541
|
+
company_url?: string | null;
|
|
542
|
+
created_at?: string;
|
|
543
|
+
updated_at?: string;
|
|
544
|
+
closed_at?: string | null;
|
|
545
|
+
amount_raised?: number | null;
|
|
546
|
+
investor_count?: number;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
type PaginationMeta = {
|
|
550
|
+
count?: number;
|
|
551
|
+
has_more?: boolean;
|
|
552
|
+
next_cursor?: number | null;
|
|
553
|
+
};
|
|
554
|
+
type _Error = {
|
|
555
|
+
error?: {
|
|
556
|
+
type?: string;
|
|
557
|
+
message?: string;
|
|
558
|
+
details?: {
|
|
559
|
+
[key: string]: unknown;
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* Unique identifier for this request. Quote it in support tickets.
|
|
563
|
+
*/
|
|
564
|
+
request_id?: string;
|
|
565
|
+
/**
|
|
566
|
+
* When present, a hint on how to resolve the error.
|
|
567
|
+
*/
|
|
568
|
+
remediation?: string;
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* Aggregate attribution statistics for a campaign
|
|
573
|
+
*/
|
|
574
|
+
type AttributionStats = {
|
|
575
|
+
campaign_id?: number;
|
|
576
|
+
period?: {
|
|
577
|
+
start_date?: string;
|
|
578
|
+
end_date?: string;
|
|
579
|
+
};
|
|
580
|
+
totals?: {
|
|
581
|
+
/**
|
|
582
|
+
* Total number of attributed investments
|
|
583
|
+
*/
|
|
584
|
+
investment_count?: number;
|
|
585
|
+
/**
|
|
586
|
+
* Total dollar amount of attributed investments
|
|
587
|
+
*/
|
|
588
|
+
total_amount?: number;
|
|
589
|
+
/**
|
|
590
|
+
* Count of unique investors
|
|
591
|
+
*/
|
|
592
|
+
unique_investors?: number;
|
|
593
|
+
/**
|
|
594
|
+
* UTM clicks to investments (percentage)
|
|
595
|
+
*/
|
|
596
|
+
conversion_rate?: number;
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* Attribution quality metrics
|
|
600
|
+
*/
|
|
601
|
+
quality_breakdown?: {
|
|
602
|
+
/**
|
|
603
|
+
* Conversions within 1 hour of click
|
|
604
|
+
*/
|
|
605
|
+
direct?: number;
|
|
606
|
+
/**
|
|
607
|
+
* Conversions 1-24 hours after click
|
|
608
|
+
*/
|
|
609
|
+
assisted?: number;
|
|
610
|
+
/**
|
|
611
|
+
* Conversions over 24 hours after click
|
|
612
|
+
*/
|
|
613
|
+
delayed?: number;
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Breakdown by UTM source
|
|
617
|
+
*/
|
|
618
|
+
by_source?: Array<{
|
|
619
|
+
utm_source?: string;
|
|
620
|
+
investment_count?: number;
|
|
621
|
+
total_amount?: number;
|
|
622
|
+
}>;
|
|
623
|
+
/**
|
|
624
|
+
* Breakdown by UTM campaign
|
|
625
|
+
*/
|
|
626
|
+
by_campaign?: Array<{
|
|
627
|
+
utm_campaign?: string;
|
|
628
|
+
investment_count?: number;
|
|
629
|
+
total_amount?: number;
|
|
630
|
+
}>;
|
|
631
|
+
};
|
|
632
|
+
/**
|
|
633
|
+
* An attributed investment with anonymized investor data.
|
|
634
|
+
* No PII is exposed - investor identity is represented by opaque tokens.
|
|
635
|
+
*
|
|
636
|
+
*/
|
|
637
|
+
type AnonymizedAttribution = {
|
|
638
|
+
/**
|
|
639
|
+
* Opaque token identifying the investment (32 characters)
|
|
640
|
+
*/
|
|
641
|
+
investment_token?: string;
|
|
642
|
+
/**
|
|
643
|
+
* Opaque token identifying the investor (32 characters).
|
|
644
|
+
* Same investor gets different tokens for different campaigns.
|
|
645
|
+
*
|
|
646
|
+
*/
|
|
647
|
+
investor_token?: string;
|
|
648
|
+
/**
|
|
649
|
+
* Investment amount tier (not exact value).
|
|
650
|
+
* Ranges: small ($1-999), medium ($1,000-9,999), large ($10,000+)
|
|
651
|
+
*
|
|
652
|
+
*/
|
|
653
|
+
amount_tier?: 'small' | 'medium' | 'large';
|
|
654
|
+
/**
|
|
655
|
+
* When the investment was applied
|
|
656
|
+
*/
|
|
657
|
+
invested_at?: string;
|
|
658
|
+
/**
|
|
659
|
+
* Current investment status
|
|
660
|
+
*/
|
|
661
|
+
status?: {
|
|
662
|
+
/**
|
|
663
|
+
* Investment processing stage (matches /manage page)
|
|
664
|
+
*/
|
|
665
|
+
bucket?: 'draft' | 'no_payment_yet' | 'pending' | 'is_ready' | 'confirmed' | 'canceled';
|
|
666
|
+
/**
|
|
667
|
+
* Whether the investment appears on founder progress bar (likely to complete)
|
|
668
|
+
*/
|
|
669
|
+
progress_bar?: boolean;
|
|
670
|
+
};
|
|
671
|
+
/**
|
|
672
|
+
* UTM attribution data
|
|
673
|
+
*/
|
|
674
|
+
attribution?: {
|
|
675
|
+
utm_source?: string;
|
|
676
|
+
utm_campaign?: string;
|
|
677
|
+
utm_medium?: string | null;
|
|
678
|
+
utm_content?: string | null;
|
|
679
|
+
/**
|
|
680
|
+
* When the UTM link was clicked
|
|
681
|
+
*/
|
|
682
|
+
clicked_at?: string;
|
|
683
|
+
/**
|
|
684
|
+
* Time from click to investment
|
|
685
|
+
*/
|
|
686
|
+
time_to_invest_bucket?: 'direct' | 'assisted' | 'delayed';
|
|
687
|
+
/**
|
|
688
|
+
* Attribution quality assessment
|
|
689
|
+
*/
|
|
690
|
+
quality_score?: 'high' | 'medium' | 'low' | 'suspicious';
|
|
691
|
+
/**
|
|
692
|
+
* Number of other UTM sources in the attribution window
|
|
693
|
+
*/
|
|
694
|
+
competing_sources?: number;
|
|
695
|
+
};
|
|
696
|
+
};
|
|
697
|
+
/**
|
|
698
|
+
* A webhook subscription for attribution events
|
|
699
|
+
*/
|
|
700
|
+
type WebhookSubscription = {
|
|
701
|
+
id?: number;
|
|
702
|
+
campaign_id?: number;
|
|
703
|
+
target_url?: string;
|
|
704
|
+
events?: Array<'investment.applied' | 'investment.confirmed' | 'investment.canceled'>;
|
|
705
|
+
/**
|
|
706
|
+
* Whether the subscription is active
|
|
707
|
+
*/
|
|
708
|
+
active?: boolean;
|
|
709
|
+
/**
|
|
710
|
+
* Number of consecutive delivery failures (resets on success)
|
|
711
|
+
*/
|
|
712
|
+
consecutive_failures?: number;
|
|
713
|
+
created_at?: string;
|
|
714
|
+
updated_at?: string;
|
|
715
|
+
};
|
|
716
|
+
/**
|
|
717
|
+
* A single webhook delivery attempt
|
|
718
|
+
*/
|
|
719
|
+
type WebhookDelivery = {
|
|
720
|
+
id?: number;
|
|
721
|
+
/**
|
|
722
|
+
* Unique delivery identifier (use for idempotency)
|
|
723
|
+
*/
|
|
724
|
+
delivery_uuid?: string;
|
|
725
|
+
/**
|
|
726
|
+
* The event that triggered this delivery
|
|
727
|
+
*/
|
|
728
|
+
event_type?: string;
|
|
729
|
+
status?: 'pending' | 'delivered' | 'failed';
|
|
730
|
+
/**
|
|
731
|
+
* Number of delivery attempts
|
|
732
|
+
*/
|
|
733
|
+
attempts?: number;
|
|
734
|
+
/**
|
|
735
|
+
* HTTP status code from the last attempt
|
|
736
|
+
*/
|
|
737
|
+
response_code?: number | null;
|
|
738
|
+
last_attempt_at?: string | null;
|
|
739
|
+
created_at?: string;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* A registered marketing partner
|
|
743
|
+
*/
|
|
744
|
+
type MarketingPartner = {
|
|
745
|
+
id?: number;
|
|
746
|
+
user_id?: number;
|
|
747
|
+
company_name?: string;
|
|
748
|
+
website?: string | null;
|
|
749
|
+
status?: 'pending' | 'approved' | 'rejected';
|
|
750
|
+
created_at?: string;
|
|
751
|
+
};
|
|
752
|
+
/**
|
|
753
|
+
* An invite to establish a partner-company connection
|
|
754
|
+
*/
|
|
755
|
+
type PartnerInvite = {
|
|
756
|
+
id?: number;
|
|
757
|
+
/**
|
|
758
|
+
* Unique invite token (use in accept URL)
|
|
759
|
+
*/
|
|
760
|
+
token?: string;
|
|
761
|
+
/**
|
|
762
|
+
* Who initiated the invite
|
|
763
|
+
*/
|
|
764
|
+
direction?: 'partner_to_founder' | 'founder_to_partner';
|
|
765
|
+
status?: 'pending' | 'accepted' | 'expired' | 'revoked';
|
|
766
|
+
/**
|
|
767
|
+
* Access level granted on acceptance (1=anonymized, 2=detailed)
|
|
768
|
+
*/
|
|
769
|
+
access_level?: number;
|
|
770
|
+
/**
|
|
771
|
+
* Target company (null for partner_to_founder until accepted)
|
|
772
|
+
*/
|
|
773
|
+
company_id?: number | null;
|
|
774
|
+
company_name?: string | null;
|
|
775
|
+
/**
|
|
776
|
+
* Partner email (for founder_to_partner invites)
|
|
777
|
+
*/
|
|
778
|
+
partner_email?: string | null;
|
|
779
|
+
expires_at?: string;
|
|
780
|
+
created_at?: string;
|
|
781
|
+
/**
|
|
782
|
+
* URL to accept the invite
|
|
783
|
+
*/
|
|
784
|
+
accept_url?: string;
|
|
785
|
+
};
|
|
786
|
+
/**
|
|
787
|
+
* Full attribution data with investor PII (Tier 2 - founders only).
|
|
788
|
+
* Returned when detail_level=full is requested by an authorized founder.
|
|
789
|
+
*
|
|
790
|
+
*/
|
|
791
|
+
type FullAttribution = {
|
|
792
|
+
/**
|
|
793
|
+
* Real Wefunder investment ID
|
|
794
|
+
*/
|
|
795
|
+
investment_id?: number;
|
|
796
|
+
/**
|
|
797
|
+
* Opaque token (same as anonymized response)
|
|
798
|
+
*/
|
|
799
|
+
investment_token?: string;
|
|
800
|
+
/**
|
|
801
|
+
* Full investor details
|
|
802
|
+
*/
|
|
803
|
+
investor?: {
|
|
804
|
+
id?: number;
|
|
805
|
+
name?: string;
|
|
806
|
+
email?: string;
|
|
807
|
+
username?: string;
|
|
808
|
+
};
|
|
809
|
+
/**
|
|
810
|
+
* Exact investment amount in dollars
|
|
811
|
+
*/
|
|
812
|
+
amount?: number;
|
|
813
|
+
invested_at?: string;
|
|
814
|
+
status?: {
|
|
815
|
+
bucket?: 'draft' | 'no_payment_yet' | 'pending' | 'is_ready' | 'confirmed' | 'canceled';
|
|
816
|
+
progress_bar?: boolean;
|
|
817
|
+
};
|
|
818
|
+
/**
|
|
819
|
+
* UTM attribution data (same as anonymized)
|
|
820
|
+
*/
|
|
821
|
+
attribution?: {
|
|
822
|
+
utm_source?: string;
|
|
823
|
+
utm_campaign?: string;
|
|
824
|
+
utm_medium?: string | null;
|
|
825
|
+
utm_content?: string | null;
|
|
826
|
+
clicked_at?: string;
|
|
827
|
+
time_to_invest_bucket?: 'direct' | 'assisted' | 'delayed';
|
|
828
|
+
quality_score?: 'high' | 'medium' | 'low' | 'suspicious';
|
|
829
|
+
competing_sources?: number;
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* JSON:API resource representing a syndicate
|
|
834
|
+
*/
|
|
835
|
+
type Syndicate = {
|
|
836
|
+
id?: number;
|
|
837
|
+
type?: string;
|
|
838
|
+
attributes?: {
|
|
839
|
+
name?: string;
|
|
840
|
+
slug?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Short description / tagline for the syndicate
|
|
843
|
+
*/
|
|
844
|
+
tagline?: string | null;
|
|
845
|
+
description?: string | null;
|
|
846
|
+
/**
|
|
847
|
+
* Syndicate icon/avatar URL
|
|
848
|
+
*/
|
|
849
|
+
avatar_url?: string | null;
|
|
850
|
+
published?: boolean;
|
|
851
|
+
launched?: boolean;
|
|
852
|
+
/**
|
|
853
|
+
* Whether the syndicate is accepting new members (nil defaults to true)
|
|
854
|
+
*/
|
|
855
|
+
membership_open?: boolean;
|
|
856
|
+
member_count?: number;
|
|
857
|
+
/**
|
|
858
|
+
* Number of linked deals (fundraises) in this syndicate
|
|
859
|
+
*/
|
|
860
|
+
deal_count?: number;
|
|
861
|
+
created_by_user_id?: number;
|
|
862
|
+
created_at?: string;
|
|
863
|
+
updated_at?: string;
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* Same as Syndicate (show and index use the same serializer)
|
|
868
|
+
*/
|
|
869
|
+
type SyndicateDetail = Syndicate;
|
|
870
|
+
/**
|
|
871
|
+
* JSON:API resource representing a syndicate member (ClubRole)
|
|
872
|
+
*/
|
|
873
|
+
type SyndicateMember = {
|
|
874
|
+
id?: number;
|
|
875
|
+
type?: string;
|
|
876
|
+
attributes?: {
|
|
877
|
+
/**
|
|
878
|
+
* User ID (null for invitees who haven't signed up)
|
|
879
|
+
*/
|
|
880
|
+
user_id?: number | null;
|
|
881
|
+
user_name?: string | null;
|
|
882
|
+
/**
|
|
883
|
+
* **Moderator-only.** User email (or invite_email for pending invitees).
|
|
884
|
+
* Returns null for non-moderator callers. Requires the requesting user
|
|
885
|
+
* to be a manager/operator of the syndicate.
|
|
886
|
+
*
|
|
887
|
+
*/
|
|
888
|
+
user_email?: string | null;
|
|
889
|
+
/**
|
|
890
|
+
* Current role (creator, manager, member, invitee, applicant, exiled, resigned, etc.)
|
|
891
|
+
*/
|
|
892
|
+
role?: string;
|
|
893
|
+
/**
|
|
894
|
+
* The role the member was invited as
|
|
895
|
+
*/
|
|
896
|
+
invite_role?: string | null;
|
|
897
|
+
/**
|
|
898
|
+
* Permission level within the syndicate
|
|
899
|
+
*/
|
|
900
|
+
syndicate_permission?: 'full_access' | 'operator';
|
|
901
|
+
/**
|
|
902
|
+
* Custom title for the member
|
|
903
|
+
*/
|
|
904
|
+
title?: string | null;
|
|
905
|
+
/**
|
|
906
|
+
* Display order position
|
|
907
|
+
*/
|
|
908
|
+
sort_order?: number | null;
|
|
909
|
+
/**
|
|
910
|
+
* Override carry percentage for this member
|
|
911
|
+
*/
|
|
912
|
+
carry_percentage_override?: string | null;
|
|
913
|
+
/**
|
|
914
|
+
* User profile photo URL (null for invitees without a user account)
|
|
915
|
+
*/
|
|
916
|
+
avatar_url?: string | null;
|
|
917
|
+
/**
|
|
918
|
+
* User bio with fallback chain (bio -> thesis -> about). Null for invitees without a user account.
|
|
919
|
+
*/
|
|
920
|
+
bio?: string | null;
|
|
921
|
+
/**
|
|
922
|
+
* User's city
|
|
923
|
+
*/
|
|
924
|
+
city?: string | null;
|
|
925
|
+
/**
|
|
926
|
+
* User's country
|
|
927
|
+
*/
|
|
928
|
+
country?: string | null;
|
|
929
|
+
/**
|
|
930
|
+
* ISO 8601 timestamp of user's last login. Null for invitees without a user account.
|
|
931
|
+
*/
|
|
932
|
+
last_activity_at?: string | null;
|
|
933
|
+
/**
|
|
934
|
+
* Relative path to user's profile (e.g. '/janedoe'). Null for invitees without a user account.
|
|
935
|
+
*/
|
|
936
|
+
profile_url?: string | null;
|
|
937
|
+
/**
|
|
938
|
+
* 'Can help with' tags from the user's investor profile. Empty array for invitees.
|
|
939
|
+
*/
|
|
940
|
+
tags?: Array<string>;
|
|
941
|
+
/**
|
|
942
|
+
* ISO 8601 join date (alias for created_at)
|
|
943
|
+
*/
|
|
944
|
+
joined_at?: string;
|
|
945
|
+
/**
|
|
946
|
+
* Total amount invested in syndicate deals, in cents. String to avoid floating-point precision issues.
|
|
947
|
+
*/
|
|
948
|
+
investment_total?: string | null;
|
|
949
|
+
/**
|
|
950
|
+
* Number of syndicate deals the member has invested in
|
|
951
|
+
*/
|
|
952
|
+
deal_count?: number | null;
|
|
953
|
+
/**
|
|
954
|
+
* **Moderator-only.** Whether the user is an accredited investor.
|
|
955
|
+
* Only included when the requesting user is a manager/operator.
|
|
956
|
+
*
|
|
957
|
+
*/
|
|
958
|
+
accredited?: boolean;
|
|
959
|
+
/**
|
|
960
|
+
* **Moderator-only.** Full legal name of the user.
|
|
961
|
+
* Only included when the requesting user is a manager/operator.
|
|
962
|
+
*
|
|
963
|
+
*/
|
|
964
|
+
legal_name?: string | null;
|
|
965
|
+
/**
|
|
966
|
+
* **Moderator-only.** Whether the current moderator has starred this member.
|
|
967
|
+
* Only included when the requesting user is a manager/operator.
|
|
968
|
+
*
|
|
969
|
+
*/
|
|
970
|
+
starred?: boolean;
|
|
971
|
+
/**
|
|
972
|
+
* **Moderator-only.** Labels assigned by moderators via ClubMemberLabel.
|
|
973
|
+
* Only included when the requesting user is a manager/operator.
|
|
974
|
+
*
|
|
975
|
+
*/
|
|
976
|
+
private_tags?: Array<string>;
|
|
977
|
+
created_at?: string;
|
|
978
|
+
updated_at?: string;
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* JSON:API resource representing a syndicate deal (Fundraise)
|
|
983
|
+
*/
|
|
984
|
+
type SyndicateDeal = {
|
|
985
|
+
id?: number;
|
|
986
|
+
type?: string;
|
|
987
|
+
attributes?: {
|
|
988
|
+
name?: string;
|
|
989
|
+
/**
|
|
990
|
+
* Fundraise state
|
|
991
|
+
*/
|
|
992
|
+
state?: string;
|
|
993
|
+
company_name?: string;
|
|
994
|
+
/**
|
|
995
|
+
* Company ID
|
|
996
|
+
*/
|
|
997
|
+
company_id?: number;
|
|
998
|
+
/**
|
|
999
|
+
* Company slug/URL path
|
|
1000
|
+
*/
|
|
1001
|
+
company_url?: string | null;
|
|
1002
|
+
/**
|
|
1003
|
+
* Company logo URL
|
|
1004
|
+
*/
|
|
1005
|
+
company_logo_url?: string | null;
|
|
1006
|
+
/**
|
|
1007
|
+
* Amount in escrow in cents, as a string to avoid floating-point precision issues
|
|
1008
|
+
*/
|
|
1009
|
+
amount_raised?: string | null;
|
|
1010
|
+
/**
|
|
1011
|
+
* Count of distinct active investors
|
|
1012
|
+
*/
|
|
1013
|
+
investor_count?: number;
|
|
1014
|
+
/**
|
|
1015
|
+
* Target funding amount in cents, as a string
|
|
1016
|
+
*/
|
|
1017
|
+
funding_target?: string | null;
|
|
1018
|
+
/**
|
|
1019
|
+
* Offering type (e.g. '506(c)', '4(a)(6)')
|
|
1020
|
+
*/
|
|
1021
|
+
offering_type?: string | null;
|
|
1022
|
+
/**
|
|
1023
|
+
* Deal structure (e.g. 'equity', 'safe', 'convertible_note')
|
|
1024
|
+
*/
|
|
1025
|
+
structure?: string | null;
|
|
1026
|
+
/**
|
|
1027
|
+
* Minimum investment amount in cents, as a string
|
|
1028
|
+
*/
|
|
1029
|
+
min_investment?: string | null;
|
|
1030
|
+
/**
|
|
1031
|
+
* Maximum investment amount in cents, as a string
|
|
1032
|
+
*/
|
|
1033
|
+
max_investment?: string | null;
|
|
1034
|
+
/**
|
|
1035
|
+
* Deal funding purpose / description
|
|
1036
|
+
*/
|
|
1037
|
+
description?: string | null;
|
|
1038
|
+
created_at?: string;
|
|
1039
|
+
updated_at?: string;
|
|
1040
|
+
closed_at?: string | null;
|
|
1041
|
+
/**
|
|
1042
|
+
* ISO 8601 timestamp when funding opened
|
|
1043
|
+
*/
|
|
1044
|
+
funding_started_at?: string | null;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* Same as SyndicateDeal (show and index use the same serializer)
|
|
1049
|
+
*/
|
|
1050
|
+
type SyndicateDealDetail = SyndicateDeal;
|
|
1051
|
+
type SyndicatePortfolio = {
|
|
1052
|
+
data?: {
|
|
1053
|
+
syndicate_id?: number;
|
|
1054
|
+
syndicate_name?: string;
|
|
1055
|
+
snapshot_at?: string;
|
|
1056
|
+
totals?: {
|
|
1057
|
+
total_invested_cents?: number;
|
|
1058
|
+
total_positions?: number;
|
|
1059
|
+
active_positions?: number;
|
|
1060
|
+
exited_positions?: number;
|
|
1061
|
+
};
|
|
1062
|
+
positions?: Array<{
|
|
1063
|
+
company?: {
|
|
1064
|
+
id?: number;
|
|
1065
|
+
name?: string;
|
|
1066
|
+
slug?: string;
|
|
1067
|
+
};
|
|
1068
|
+
investment?: {
|
|
1069
|
+
amount_cents?: number;
|
|
1070
|
+
structure?: string;
|
|
1071
|
+
invested_at?: string;
|
|
1072
|
+
status?: 'active' | 'exited';
|
|
1073
|
+
};
|
|
1074
|
+
valuation?: {
|
|
1075
|
+
basis_cents?: number;
|
|
1076
|
+
current_estimate_cents?: number | null;
|
|
1077
|
+
multiple?: number | null;
|
|
1078
|
+
};
|
|
1079
|
+
}>;
|
|
1080
|
+
};
|
|
1081
|
+
};
|
|
1082
|
+
/**
|
|
1083
|
+
* JSON:API resource representing a syndicate member's investment in a specific deal.
|
|
1084
|
+
* Only syndicate members' investments are included (scoped by member user IDs).
|
|
1085
|
+
*
|
|
1086
|
+
*/
|
|
1087
|
+
type DealInvestor = {
|
|
1088
|
+
/**
|
|
1089
|
+
* Investment ID
|
|
1090
|
+
*/
|
|
1091
|
+
id?: number;
|
|
1092
|
+
type?: string;
|
|
1093
|
+
attributes?: {
|
|
1094
|
+
/**
|
|
1095
|
+
* Investor's user ID
|
|
1096
|
+
*/
|
|
1097
|
+
user_id?: number;
|
|
1098
|
+
user_name?: string | null;
|
|
1099
|
+
/**
|
|
1100
|
+
* **Moderator-only.** Investor's email address.
|
|
1101
|
+
* Returns null for non-moderator callers (users who are not a manager/operator).
|
|
1102
|
+
*
|
|
1103
|
+
*/
|
|
1104
|
+
user_email?: string | null;
|
|
1105
|
+
/**
|
|
1106
|
+
* Investor's profile photo URL
|
|
1107
|
+
*/
|
|
1108
|
+
avatar_url?: string | null;
|
|
1109
|
+
/**
|
|
1110
|
+
* Investment amount in cents, as a string to avoid floating-point precision issues
|
|
1111
|
+
*/
|
|
1112
|
+
amount?: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Investment state
|
|
1115
|
+
*/
|
|
1116
|
+
state?: string;
|
|
1117
|
+
/**
|
|
1118
|
+
* ISO 8601 timestamp when the investment was created
|
|
1119
|
+
*/
|
|
1120
|
+
invested_at?: string;
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
/**
|
|
1124
|
+
* JSON:API resource representing a member's investment in a syndicate deal.
|
|
1125
|
+
* Scoped to the syndicate's selected deals (one per company, matching directory semantics).
|
|
1126
|
+
*
|
|
1127
|
+
*/
|
|
1128
|
+
type MemberInvestment = {
|
|
1129
|
+
/**
|
|
1130
|
+
* Investment ID
|
|
1131
|
+
*/
|
|
1132
|
+
id?: number;
|
|
1133
|
+
type?: string;
|
|
1134
|
+
attributes?: {
|
|
1135
|
+
/**
|
|
1136
|
+
* Deal (fundraise) ID
|
|
1137
|
+
*/
|
|
1138
|
+
fundraise_id?: number;
|
|
1139
|
+
/**
|
|
1140
|
+
* Name of the company the deal is for
|
|
1141
|
+
*/
|
|
1142
|
+
company_name?: string | null;
|
|
1143
|
+
/**
|
|
1144
|
+
* Investment amount in cents, as a string to avoid floating-point precision issues
|
|
1145
|
+
*/
|
|
1146
|
+
amount?: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* Investment state
|
|
1149
|
+
*/
|
|
1150
|
+
state?: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* ISO 8601 timestamp when the investment was created
|
|
1153
|
+
*/
|
|
1154
|
+
created_at?: string;
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
/**
|
|
1158
|
+
* Aggregate metrics for a syndicate
|
|
1159
|
+
*/
|
|
1160
|
+
type SyndicateStatistics = {
|
|
1161
|
+
type?: string;
|
|
1162
|
+
attributes?: {
|
|
1163
|
+
/**
|
|
1164
|
+
* Count of active members (excludes resigned and exiled, filters out soft-deleted and hellbanned users)
|
|
1165
|
+
*/
|
|
1166
|
+
total_members?: number;
|
|
1167
|
+
/**
|
|
1168
|
+
* Member count grouped by role
|
|
1169
|
+
*/
|
|
1170
|
+
members_by_role?: {
|
|
1171
|
+
[key: string]: number;
|
|
1172
|
+
};
|
|
1173
|
+
/**
|
|
1174
|
+
* Total number of linked deals (all linked fundraises)
|
|
1175
|
+
*/
|
|
1176
|
+
total_deals?: number;
|
|
1177
|
+
/**
|
|
1178
|
+
* Number of currently live deals (open/oversubscribed/closing states)
|
|
1179
|
+
*/
|
|
1180
|
+
live_deals?: number;
|
|
1181
|
+
/**
|
|
1182
|
+
* Total amount raised across directory-selected deals (one per company), in cents.
|
|
1183
|
+
* String to avoid floating-point precision issues.
|
|
1184
|
+
*
|
|
1185
|
+
*/
|
|
1186
|
+
total_raised?: string;
|
|
1187
|
+
/**
|
|
1188
|
+
* Count of distinct investors across directory-selected deals (one per company)
|
|
1189
|
+
*/
|
|
1190
|
+
total_investors?: number;
|
|
1191
|
+
/**
|
|
1192
|
+
* Count of audit events in the last 30 days for this syndicate
|
|
1193
|
+
*/
|
|
1194
|
+
recent_activity_count?: number;
|
|
1195
|
+
};
|
|
1196
|
+
};
|
|
1197
|
+
/**
|
|
1198
|
+
* JSON:API resource representing an intent (proposed dangerous action)
|
|
1199
|
+
*/
|
|
1200
|
+
type Intent = {
|
|
1201
|
+
id?: string;
|
|
1202
|
+
type?: string;
|
|
1203
|
+
attributes?: {
|
|
1204
|
+
action?: string;
|
|
1205
|
+
status?: 'pending' | 'approved' | 'executing' | 'executed' | 'expired' | 'rejected' | 'failed';
|
|
1206
|
+
resource_type?: string;
|
|
1207
|
+
resource_id?: number;
|
|
1208
|
+
impact_summary?: string;
|
|
1209
|
+
/**
|
|
1210
|
+
* URL where a human can review and approve/reject this intent
|
|
1211
|
+
*/
|
|
1212
|
+
review_url?: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* Human-readable name of the agent that proposed this intent
|
|
1215
|
+
*/
|
|
1216
|
+
requested_by_agent?: string | null;
|
|
1217
|
+
expires_at?: string | null;
|
|
1218
|
+
approved_at?: string | null;
|
|
1219
|
+
executed_at?: string | null;
|
|
1220
|
+
rejection_reason?: string | null;
|
|
1221
|
+
/**
|
|
1222
|
+
* Action-specific result data (only present when status is executed)
|
|
1223
|
+
*/
|
|
1224
|
+
execution_result?: {
|
|
1225
|
+
[key: string]: unknown;
|
|
1226
|
+
} | null;
|
|
1227
|
+
created_at?: string;
|
|
1228
|
+
updated_at?: string;
|
|
1229
|
+
};
|
|
1230
|
+
};
|
|
1231
|
+
/**
|
|
1232
|
+
* JSON:API resource representing an audit event
|
|
1233
|
+
*/
|
|
1234
|
+
type AuditEvent = {
|
|
1235
|
+
id?: number;
|
|
1236
|
+
type?: string;
|
|
1237
|
+
attributes?: {
|
|
1238
|
+
occurred_at?: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Type of actor (e.g. user, agent, system)
|
|
1241
|
+
*/
|
|
1242
|
+
actor_type?: string;
|
|
1243
|
+
actor_name?: string;
|
|
1244
|
+
action?: string;
|
|
1245
|
+
resource_type?: string;
|
|
1246
|
+
resource_id?: number;
|
|
1247
|
+
resource_label?: string | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* Previous values of changed fields
|
|
1250
|
+
*/
|
|
1251
|
+
old_values?: {
|
|
1252
|
+
[key: string]: unknown;
|
|
1253
|
+
} | null;
|
|
1254
|
+
/**
|
|
1255
|
+
* New values of changed fields
|
|
1256
|
+
*/
|
|
1257
|
+
new_values?: {
|
|
1258
|
+
[key: string]: unknown;
|
|
1259
|
+
} | null;
|
|
1260
|
+
/**
|
|
1261
|
+
* List of field names that changed
|
|
1262
|
+
*/
|
|
1263
|
+
changed_fields?: Array<string> | null;
|
|
1264
|
+
status?: 'success' | 'failure' | 'denied';
|
|
1265
|
+
error_message?: string | null;
|
|
1266
|
+
/**
|
|
1267
|
+
* Associated intent ID if this event was triggered by an intent
|
|
1268
|
+
*/
|
|
1269
|
+
intent_id?: string | null;
|
|
1270
|
+
created_at?: string;
|
|
1271
|
+
};
|
|
1272
|
+
};
|
|
1273
|
+
/**
|
|
1274
|
+
* An OAuth application authorized by the user
|
|
1275
|
+
*/
|
|
1276
|
+
type ConnectedApp = {
|
|
1277
|
+
id?: number;
|
|
1278
|
+
type?: string;
|
|
1279
|
+
attributes?: {
|
|
1280
|
+
name?: string;
|
|
1281
|
+
/**
|
|
1282
|
+
* All scopes across active tokens for this app
|
|
1283
|
+
*/
|
|
1284
|
+
scopes?: Array<string>;
|
|
1285
|
+
/**
|
|
1286
|
+
* When the most recent token was last used
|
|
1287
|
+
*/
|
|
1288
|
+
last_active_at?: string | null;
|
|
1289
|
+
/**
|
|
1290
|
+
* Total audit events for this app
|
|
1291
|
+
*/
|
|
1292
|
+
action_count?: number;
|
|
1293
|
+
/**
|
|
1294
|
+
* When the user first authorized this app
|
|
1295
|
+
*/
|
|
1296
|
+
created_at?: string | null;
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
/**
|
|
1300
|
+
* Returned on `422 Unprocessable Entity` when request fields fail validation.
|
|
1301
|
+
* `details` is an array of per-field problems.
|
|
1302
|
+
*
|
|
1303
|
+
*/
|
|
1304
|
+
type ValidationError = {
|
|
1305
|
+
error?: {
|
|
1306
|
+
type?: string;
|
|
1307
|
+
message?: string;
|
|
1308
|
+
details?: Array<{
|
|
1309
|
+
field?: string;
|
|
1310
|
+
code?: string;
|
|
1311
|
+
message?: string;
|
|
1312
|
+
}>;
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
/**
|
|
1316
|
+
* Investment terms for an SPV.
|
|
1317
|
+
*/
|
|
1318
|
+
type SpvTerms = {
|
|
1319
|
+
structure: 'safe' | 'convertible_note' | 'equity';
|
|
1320
|
+
/**
|
|
1321
|
+
* Required when `structure` is `safe`.
|
|
1322
|
+
*/
|
|
1323
|
+
safe_type?: 'post_money' | 'pre_money';
|
|
1324
|
+
valuation_cap_cents: number;
|
|
1325
|
+
/**
|
|
1326
|
+
* Discount percentage (e.g. 20 for 20%).
|
|
1327
|
+
*/
|
|
1328
|
+
discount_percent?: number | null;
|
|
1329
|
+
minimum_investment_cents: number;
|
|
1330
|
+
target_raise_cents: number;
|
|
1331
|
+
max_raise_cents?: number | null;
|
|
1332
|
+
};
|
|
1333
|
+
type SpvSettings = {
|
|
1334
|
+
/**
|
|
1335
|
+
* `self_attestation` (506b) or `verified` (506c).
|
|
1336
|
+
*/
|
|
1337
|
+
accreditation_type?: 'self_attestation' | 'verified';
|
|
1338
|
+
/**
|
|
1339
|
+
* Automatically begin closing when the target raise is reached.
|
|
1340
|
+
*/
|
|
1341
|
+
auto_close_on_target?: boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* Send a partner webhook on each new investment.
|
|
1344
|
+
*/
|
|
1345
|
+
notify_on_investment?: boolean;
|
|
1346
|
+
};
|
|
1347
|
+
type TargetCompanyInput = {
|
|
1348
|
+
name: string;
|
|
1349
|
+
legal_name?: string;
|
|
1350
|
+
website?: string;
|
|
1351
|
+
description?: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* Two-letter US state code.
|
|
1354
|
+
*/
|
|
1355
|
+
state_of_incorporation?: string;
|
|
1356
|
+
};
|
|
1357
|
+
type SpvCreateInput = {
|
|
1358
|
+
name: string;
|
|
1359
|
+
target_company: TargetCompanyInput;
|
|
1360
|
+
terms: SpvTerms;
|
|
1361
|
+
settings?: SpvSettings;
|
|
1362
|
+
/**
|
|
1363
|
+
* Arbitrary partner-defined key-value pairs echoed back on the SPV.
|
|
1364
|
+
*/
|
|
1365
|
+
metadata?: {
|
|
1366
|
+
[key: string]: unknown;
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
type SpvMetrics = {
|
|
1370
|
+
total_raised_cents?: number;
|
|
1371
|
+
investor_count?: number;
|
|
1372
|
+
confirmed_count?: number;
|
|
1373
|
+
pending_count?: number;
|
|
1374
|
+
average_investment_cents?: number;
|
|
1375
|
+
};
|
|
1376
|
+
type Spv = {
|
|
1377
|
+
id?: string;
|
|
1378
|
+
type?: string;
|
|
1379
|
+
attributes?: {
|
|
1380
|
+
name?: string;
|
|
1381
|
+
status?: 'draft' | 'open' | 'closing' | 'closed' | 'canceled' | 'dissolved';
|
|
1382
|
+
series_name?: string;
|
|
1383
|
+
invest_url?: string | null;
|
|
1384
|
+
target_company?: {
|
|
1385
|
+
id?: string;
|
|
1386
|
+
name?: string;
|
|
1387
|
+
};
|
|
1388
|
+
terms?: SpvTerms;
|
|
1389
|
+
metrics?: SpvMetrics;
|
|
1390
|
+
metadata?: {
|
|
1391
|
+
[key: string]: unknown;
|
|
1392
|
+
};
|
|
1393
|
+
created_at?: string;
|
|
1394
|
+
opened_at?: string | null;
|
|
1395
|
+
closing_at?: string | null;
|
|
1396
|
+
closed_at?: string | null;
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
type SpvCloseStatus = {
|
|
1400
|
+
spv_id?: string;
|
|
1401
|
+
status?: 'closing' | 'closed';
|
|
1402
|
+
steps?: Array<{
|
|
1403
|
+
name?: 'investment_cutoff' | 'pending_resolution' | 'final_tally' | 'disbursement' | 'cap_table';
|
|
1404
|
+
status?: 'pending' | 'in_progress' | 'complete';
|
|
1405
|
+
completed_at?: string | null;
|
|
1406
|
+
pending_count?: number | null;
|
|
1407
|
+
}>;
|
|
1408
|
+
estimated_completion?: string | null;
|
|
1409
|
+
};
|
|
1410
|
+
type InviteCreateInput = {
|
|
1411
|
+
email: string;
|
|
1412
|
+
first_name?: string;
|
|
1413
|
+
last_name?: string;
|
|
1414
|
+
/**
|
|
1415
|
+
* Optional reserved allocation for this investor.
|
|
1416
|
+
*/
|
|
1417
|
+
allocation_cents?: number | null;
|
|
1418
|
+
/**
|
|
1419
|
+
* Optional personal message included in the invite email.
|
|
1420
|
+
*/
|
|
1421
|
+
message?: string;
|
|
1422
|
+
send_email?: boolean;
|
|
1423
|
+
};
|
|
1424
|
+
type Invite = {
|
|
1425
|
+
id?: string;
|
|
1426
|
+
type?: string;
|
|
1427
|
+
attributes?: {
|
|
1428
|
+
email?: string;
|
|
1429
|
+
status?: 'pending' | 'opened' | 'invested' | 'expired' | 'revoked';
|
|
1430
|
+
allocation_cents?: number | null;
|
|
1431
|
+
invest_url?: string;
|
|
1432
|
+
investment_id?: string | null;
|
|
1433
|
+
created_at?: string;
|
|
1434
|
+
opened_at?: string | null;
|
|
1435
|
+
invested_at?: string | null;
|
|
1436
|
+
expires_at?: string | null;
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
type InvestmentLinkCreateInput = {
|
|
1440
|
+
/**
|
|
1441
|
+
* Optional per-investor allocation cap applied to anyone using the link.
|
|
1442
|
+
*/
|
|
1443
|
+
allocation_cents?: number | null;
|
|
1444
|
+
/**
|
|
1445
|
+
* Optional cap on how many investments the link can produce.
|
|
1446
|
+
*/
|
|
1447
|
+
max_uses?: number | null;
|
|
1448
|
+
};
|
|
1449
|
+
type InvestmentLink = {
|
|
1450
|
+
id?: string;
|
|
1451
|
+
type?: string;
|
|
1452
|
+
attributes?: {
|
|
1453
|
+
url?: string;
|
|
1454
|
+
allocation_cents?: number | null;
|
|
1455
|
+
max_uses?: number | null;
|
|
1456
|
+
uses_count?: number;
|
|
1457
|
+
active?: boolean;
|
|
1458
|
+
created_at?: string;
|
|
1459
|
+
};
|
|
1460
|
+
};
|
|
1461
|
+
/**
|
|
1462
|
+
* Either `email` (invite an unknown recipient) or `wefunder_user_id` (target an
|
|
1463
|
+
* existing Wefunder user) should be provided.
|
|
1464
|
+
*
|
|
1465
|
+
*/
|
|
1466
|
+
type InvestmentSessionCreateInput = {
|
|
1467
|
+
email?: string | null;
|
|
1468
|
+
wefunder_user_id?: string | null;
|
|
1469
|
+
allocation_cents?: number | null;
|
|
1470
|
+
/**
|
|
1471
|
+
* Where to send the recipient after they complete the session.
|
|
1472
|
+
*/
|
|
1473
|
+
success_url?: string | null;
|
|
1474
|
+
};
|
|
1475
|
+
type InvestmentSession = {
|
|
1476
|
+
id?: string;
|
|
1477
|
+
type?: string;
|
|
1478
|
+
attributes?: {
|
|
1479
|
+
status?: 'pending' | 'in_progress' | 'completed' | 'abandoned' | 'expired' | 'canceled';
|
|
1480
|
+
/**
|
|
1481
|
+
* The hosted URL the recipient opens to begin the flow.
|
|
1482
|
+
*/
|
|
1483
|
+
url?: string;
|
|
1484
|
+
spv_id?: string;
|
|
1485
|
+
email?: string | null;
|
|
1486
|
+
allocation_cents?: number | null;
|
|
1487
|
+
kyc_status?: 'pending' | 'passed' | 'failed';
|
|
1488
|
+
funding_status?: 'pending' | 'succeeded' | 'card_declined' | 'insufficient_funds';
|
|
1489
|
+
/**
|
|
1490
|
+
* Populated once the session completes successfully.
|
|
1491
|
+
*/
|
|
1492
|
+
investment_id?: string | null;
|
|
1493
|
+
created_at?: string;
|
|
1494
|
+
expires_at?: string | null;
|
|
1495
|
+
};
|
|
1496
|
+
};
|
|
1497
|
+
type PartnerInvestment = {
|
|
1498
|
+
id?: string;
|
|
1499
|
+
type?: string;
|
|
1500
|
+
attributes?: {
|
|
1501
|
+
amount_cents?: number;
|
|
1502
|
+
status?: 'pending' | 'awaiting_payment' | 'pending_accreditation' | 'confirmed' | 'canceled';
|
|
1503
|
+
spv_id?: string;
|
|
1504
|
+
investor_id?: string | null;
|
|
1505
|
+
accreditation?: {
|
|
1506
|
+
type?: 'self_attestation' | 'verified';
|
|
1507
|
+
status?: 'pending' | 'passed' | 'failed' | 'expired';
|
|
1508
|
+
basis?: string | null;
|
|
1509
|
+
submitted_at?: string | null;
|
|
1510
|
+
} | null;
|
|
1511
|
+
confirmed_at?: string | null;
|
|
1512
|
+
created_at?: string;
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
/**
|
|
1516
|
+
* An investor known to the partner. PII fields (`full_name`, `email`) are only
|
|
1517
|
+
* populated when the token holds the required access tier; otherwise they are null.
|
|
1518
|
+
*
|
|
1519
|
+
*/
|
|
1520
|
+
type Investor = {
|
|
1521
|
+
id?: string;
|
|
1522
|
+
type?: string;
|
|
1523
|
+
attributes?: {
|
|
1524
|
+
full_name?: string | null;
|
|
1525
|
+
email?: string | null;
|
|
1526
|
+
accredited?: boolean | null;
|
|
1527
|
+
total_invested_cents?: number;
|
|
1528
|
+
investment_count?: number;
|
|
1529
|
+
created_at?: string;
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
type PartnerWebhookSubscriptionCreateInput = {
|
|
1533
|
+
url: string;
|
|
1534
|
+
events: Array<string>;
|
|
1535
|
+
};
|
|
1536
|
+
type PartnerWebhookSubscription = {
|
|
1537
|
+
id?: string;
|
|
1538
|
+
type?: string;
|
|
1539
|
+
attributes?: {
|
|
1540
|
+
url?: string;
|
|
1541
|
+
events?: Array<string>;
|
|
1542
|
+
active?: boolean;
|
|
1543
|
+
created_at?: string;
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1546
|
+
type PartnerWebhookSubscriptionWithSecret = PartnerWebhookSubscription & {
|
|
1547
|
+
attributes?: {
|
|
1548
|
+
/**
|
|
1549
|
+
* The signing secret, shown only once at creation. Used to verify the
|
|
1550
|
+
* `X-Wefunder-Signature` header on delivered events.
|
|
1551
|
+
*
|
|
1552
|
+
*/
|
|
1553
|
+
secret?: string;
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
/**
|
|
1557
|
+
* The payload delivered to a subscribed webhook URL.
|
|
1558
|
+
*/
|
|
1559
|
+
type PartnerWebhookEvent = {
|
|
1560
|
+
id?: string;
|
|
1561
|
+
/**
|
|
1562
|
+
* The event type. SPV: `spv.created`, `spv.opened`, `spv.updated`,
|
|
1563
|
+
* `spv.closing`, `spv.closed`, `spv.canceled`. Invites/sessions:
|
|
1564
|
+
* `invite.created`, `invite.opened`, `invite.invested`, `invite.expired`,
|
|
1565
|
+
* `investment_session.created`, `investment_session.completed`. Investments:
|
|
1566
|
+
* `investment.created`, `investment.confirmed`, `investment.canceled`,
|
|
1567
|
+
* `investment.accreditation_verified`, `investment.accreditation_failed`.
|
|
1568
|
+
* Disbursement: `disbursement.initiated`, `disbursement.completed`,
|
|
1569
|
+
* `disbursement.failed`. Plus `webhook.test`.
|
|
1570
|
+
*
|
|
1571
|
+
*/
|
|
1572
|
+
event?: string;
|
|
1573
|
+
created_at?: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* Event-specific payload (e.g. the affected SPV and investment).
|
|
1576
|
+
*/
|
|
1577
|
+
data?: {
|
|
1578
|
+
[key: string]: unknown;
|
|
1579
|
+
};
|
|
1580
|
+
/**
|
|
1581
|
+
* Echoes the SPV's `metadata.partner_reference` when present.
|
|
1582
|
+
*/
|
|
1583
|
+
partner_reference?: string | null;
|
|
1584
|
+
};
|
|
1585
|
+
/**
|
|
1586
|
+
* The fundraise/campaign ID
|
|
1587
|
+
*/
|
|
1588
|
+
type CampaignId = number;
|
|
1589
|
+
/**
|
|
1590
|
+
* The syndicate ID
|
|
1591
|
+
*/
|
|
1592
|
+
type SyndicateId = number;
|
|
1593
|
+
/**
|
|
1594
|
+
* The member ID
|
|
1595
|
+
*/
|
|
1596
|
+
type MemberId = string;
|
|
1597
|
+
/**
|
|
1598
|
+
* The deal (fundraise) ID
|
|
1599
|
+
*/
|
|
1600
|
+
type FundraiseId = number;
|
|
1601
|
+
/**
|
|
1602
|
+
* Filter results to attributions on or after this date. Format: YYYY-MM-DD.
|
|
1603
|
+
* Defaults to 90 days ago if not specified.
|
|
1604
|
+
*
|
|
1605
|
+
*/
|
|
1606
|
+
type StartDate = string;
|
|
1607
|
+
/**
|
|
1608
|
+
* Filter results to attributions on or before this date. Format: YYYY-MM-DD.
|
|
1609
|
+
* Defaults to today if not specified.
|
|
1610
|
+
*
|
|
1611
|
+
*/
|
|
1612
|
+
type EndDate = string;
|
|
1613
|
+
/**
|
|
1614
|
+
* Filter by UTM source (e.g., "GoogleAds", "facebook", "Klaviyo")
|
|
1615
|
+
*/
|
|
1616
|
+
type UtmSource = string;
|
|
1617
|
+
/**
|
|
1618
|
+
* Filter by UTM campaign name
|
|
1619
|
+
*/
|
|
1620
|
+
type UtmCampaign = string;
|
|
1621
|
+
/**
|
|
1622
|
+
* The webhook subscription ID
|
|
1623
|
+
*/
|
|
1624
|
+
type WebhookId = number;
|
|
1625
|
+
/**
|
|
1626
|
+
* The SPV ID (prefixed, e.g. `spv_abc123`)
|
|
1627
|
+
*/
|
|
1628
|
+
type SpvId = string;
|
|
1629
|
+
/**
|
|
1630
|
+
* The invite ID (prefixed, e.g. `inv_xyz789`)
|
|
1631
|
+
*/
|
|
1632
|
+
type InviteId = string;
|
|
1633
|
+
/**
|
|
1634
|
+
* The investment session ID (prefixed, e.g. `is_abc123`)
|
|
1635
|
+
*/
|
|
1636
|
+
type InvestmentSessionId = string;
|
|
1637
|
+
/**
|
|
1638
|
+
* The investment ID (prefixed, e.g. `invt_def456`)
|
|
1639
|
+
*/
|
|
1640
|
+
type PartnerInvestmentId = string;
|
|
1641
|
+
/**
|
|
1642
|
+
* The webhook subscription ID (prefixed, e.g. `whs_abc123`)
|
|
1643
|
+
*/
|
|
1644
|
+
type WebhookSubscriptionId = string;
|
|
1645
|
+
/**
|
|
1646
|
+
* A unique client-generated key that makes a write request safe to retry. If a request
|
|
1647
|
+
* is retried within 24 hours with the same key and body, the original result is returned
|
|
1648
|
+
* instead of performing the operation again. Strongly recommended on all `POST` requests
|
|
1649
|
+
* that create resources.
|
|
1650
|
+
*
|
|
1651
|
+
*/
|
|
1652
|
+
type IdempotencyKey = string;
|
|
1653
|
+
type ListOfferingsData = {
|
|
1654
|
+
body?: never;
|
|
1655
|
+
path?: never;
|
|
1656
|
+
query?: {
|
|
1657
|
+
/**
|
|
1658
|
+
* Cursor-based pagination token. Use the `next_cursor` value from the previous response's
|
|
1659
|
+
* `meta` object to retrieve the next page of results. Omit this parameter to retrieve the
|
|
1660
|
+
* first page.
|
|
1661
|
+
*
|
|
1662
|
+
*/
|
|
1663
|
+
cursor?: number;
|
|
1664
|
+
/**
|
|
1665
|
+
* Result ordering:
|
|
1666
|
+
* - `most_raised` (default) — highest amount raised first
|
|
1667
|
+
* - `closing_soon` — soonest funding close first
|
|
1668
|
+
* - `newest` — most recently launched first
|
|
1669
|
+
* - `most_investors` — highest investor count first
|
|
1670
|
+
*
|
|
1671
|
+
*/
|
|
1672
|
+
sort?: 'most_raised' | 'closing_soon' | 'newest' | 'most_investors';
|
|
1673
|
+
};
|
|
1674
|
+
url: '/explore';
|
|
1675
|
+
};
|
|
1676
|
+
type ListOfferingsErrors = {
|
|
1677
|
+
/**
|
|
1678
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1679
|
+
* - No Authorization header is provided
|
|
1680
|
+
* - The access token is invalid or malformed
|
|
1681
|
+
* - The access token has expired
|
|
1682
|
+
* - The access token has been revoked
|
|
1683
|
+
*
|
|
1684
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1685
|
+
*
|
|
1686
|
+
*/
|
|
1687
|
+
401: _Error;
|
|
1688
|
+
/**
|
|
1689
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
1690
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
1691
|
+
* error along with headers indicating when you can retry.
|
|
1692
|
+
*
|
|
1693
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
1694
|
+
* Consider implementing exponential backoff in your application.
|
|
1695
|
+
*
|
|
1696
|
+
*/
|
|
1697
|
+
429: _Error;
|
|
1698
|
+
};
|
|
1699
|
+
type ListOfferingsError = ListOfferingsErrors[keyof ListOfferingsErrors];
|
|
1700
|
+
type ListOfferingsResponses = {
|
|
1701
|
+
/**
|
|
1702
|
+
* Successful response
|
|
1703
|
+
*/
|
|
1704
|
+
200: OfferingListEnvelope;
|
|
1705
|
+
};
|
|
1706
|
+
type ListOfferingsResponse = ListOfferingsResponses[keyof ListOfferingsResponses];
|
|
1707
|
+
type GetOfferingData = {
|
|
1708
|
+
body?: never;
|
|
1709
|
+
path: {
|
|
1710
|
+
/**
|
|
1711
|
+
* The offering's `ofr_` external id.
|
|
1712
|
+
*/
|
|
1713
|
+
external_id: string;
|
|
1714
|
+
};
|
|
1715
|
+
query?: never;
|
|
1716
|
+
url: '/offerings/{external_id}';
|
|
1717
|
+
};
|
|
1718
|
+
type GetOfferingErrors = {
|
|
1719
|
+
/**
|
|
1720
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1721
|
+
* - No Authorization header is provided
|
|
1722
|
+
* - The access token is invalid or malformed
|
|
1723
|
+
* - The access token has expired
|
|
1724
|
+
* - The access token has been revoked
|
|
1725
|
+
*
|
|
1726
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1727
|
+
*
|
|
1728
|
+
*/
|
|
1729
|
+
401: _Error;
|
|
1730
|
+
/**
|
|
1731
|
+
* The requested resource does not exist or is not visible to this token.
|
|
1732
|
+
*/
|
|
1733
|
+
404: _Error;
|
|
1734
|
+
/**
|
|
1735
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
1736
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
1737
|
+
* error along with headers indicating when you can retry.
|
|
1738
|
+
*
|
|
1739
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
1740
|
+
* Consider implementing exponential backoff in your application.
|
|
1741
|
+
*
|
|
1742
|
+
*/
|
|
1743
|
+
429: _Error;
|
|
1744
|
+
};
|
|
1745
|
+
type GetOfferingError = GetOfferingErrors[keyof GetOfferingErrors];
|
|
1746
|
+
type GetOfferingResponses = {
|
|
1747
|
+
/**
|
|
1748
|
+
* Successful response
|
|
1749
|
+
*/
|
|
1750
|
+
200: OfferingEnvelope;
|
|
1751
|
+
};
|
|
1752
|
+
type GetOfferingResponse = GetOfferingResponses[keyof GetOfferingResponses];
|
|
1753
|
+
type GetCurrentUserData = {
|
|
1754
|
+
body?: never;
|
|
1755
|
+
path?: never;
|
|
1756
|
+
query?: never;
|
|
1757
|
+
url: '/users/me';
|
|
1758
|
+
};
|
|
1759
|
+
type GetCurrentUserErrors = {
|
|
1760
|
+
/**
|
|
1761
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1762
|
+
* - No Authorization header is provided
|
|
1763
|
+
* - The access token is invalid or malformed
|
|
1764
|
+
* - The access token has expired
|
|
1765
|
+
* - The access token has been revoked
|
|
1766
|
+
*
|
|
1767
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1768
|
+
*
|
|
1769
|
+
*/
|
|
1770
|
+
401: _Error;
|
|
1771
|
+
/**
|
|
1772
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
1773
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
1774
|
+
* error along with headers indicating when you can retry.
|
|
1775
|
+
*
|
|
1776
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
1777
|
+
* Consider implementing exponential backoff in your application.
|
|
1778
|
+
*
|
|
1779
|
+
*/
|
|
1780
|
+
429: _Error;
|
|
1781
|
+
};
|
|
1782
|
+
type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserErrors];
|
|
1783
|
+
type GetCurrentUserResponses = {
|
|
1784
|
+
/**
|
|
1785
|
+
* Successful response
|
|
1786
|
+
*/
|
|
1787
|
+
200: UserEnvelope;
|
|
1788
|
+
};
|
|
1789
|
+
type GetCurrentUserResponse = GetCurrentUserResponses[keyof GetCurrentUserResponses];
|
|
1790
|
+
type ListInvestmentsData = {
|
|
1791
|
+
body?: never;
|
|
1792
|
+
path?: never;
|
|
1793
|
+
query?: {
|
|
1794
|
+
/**
|
|
1795
|
+
* Cursor-based pagination token. Use the `next_cursor` value from the previous response's
|
|
1796
|
+
* `meta` object to retrieve the next page of results. Omit this parameter to retrieve the
|
|
1797
|
+
* first page.
|
|
1798
|
+
*
|
|
1799
|
+
*/
|
|
1800
|
+
cursor?: number;
|
|
1801
|
+
};
|
|
1802
|
+
url: '/investments';
|
|
1803
|
+
};
|
|
1804
|
+
type ListInvestmentsErrors = {
|
|
1805
|
+
/**
|
|
1806
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1807
|
+
* - No Authorization header is provided
|
|
1808
|
+
* - The access token is invalid or malformed
|
|
1809
|
+
* - The access token has expired
|
|
1810
|
+
* - The access token has been revoked
|
|
1811
|
+
*
|
|
1812
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1813
|
+
*
|
|
1814
|
+
*/
|
|
1815
|
+
401: _Error;
|
|
1816
|
+
/**
|
|
1817
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
1818
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
1819
|
+
* error along with headers indicating when you can retry.
|
|
1820
|
+
*
|
|
1821
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
1822
|
+
* Consider implementing exponential backoff in your application.
|
|
1823
|
+
*
|
|
1824
|
+
*/
|
|
1825
|
+
429: _Error;
|
|
1826
|
+
};
|
|
1827
|
+
type ListInvestmentsError = ListInvestmentsErrors[keyof ListInvestmentsErrors];
|
|
1828
|
+
type ListInvestmentsResponses = {
|
|
1829
|
+
/**
|
|
1830
|
+
* Successful response
|
|
1831
|
+
*/
|
|
1832
|
+
200: InvestmentListEnvelope;
|
|
1833
|
+
};
|
|
1834
|
+
type ListInvestmentsResponse = ListInvestmentsResponses[keyof ListInvestmentsResponses];
|
|
1835
|
+
type ListCampaignsData = {
|
|
1836
|
+
body?: never;
|
|
1837
|
+
path?: never;
|
|
1838
|
+
query?: {
|
|
1839
|
+
/**
|
|
1840
|
+
* Cursor-based pagination token. Use the `next_cursor` value from the previous response's
|
|
1841
|
+
* `meta` object to retrieve the next page of results. Omit this parameter to retrieve the
|
|
1842
|
+
* first page.
|
|
1843
|
+
*
|
|
1844
|
+
*/
|
|
1845
|
+
cursor?: number;
|
|
1846
|
+
};
|
|
1847
|
+
url: '/campaigns';
|
|
1848
|
+
};
|
|
1849
|
+
type ListCampaignsErrors = {
|
|
1850
|
+
/**
|
|
1851
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1852
|
+
* - No Authorization header is provided
|
|
1853
|
+
* - The access token is invalid or malformed
|
|
1854
|
+
* - The access token has expired
|
|
1855
|
+
* - The access token has been revoked
|
|
1856
|
+
*
|
|
1857
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1858
|
+
*
|
|
1859
|
+
*/
|
|
1860
|
+
401: _Error;
|
|
1861
|
+
/**
|
|
1862
|
+
* The authenticated user does not have permission to access this resource.
|
|
1863
|
+
* This typically means:
|
|
1864
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
1865
|
+
* - The resource belongs to a different user
|
|
1866
|
+
* - The user's role doesn't allow this operation
|
|
1867
|
+
*
|
|
1868
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
1869
|
+
*
|
|
1870
|
+
*/
|
|
1871
|
+
403: _Error;
|
|
1872
|
+
/**
|
|
1873
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
1874
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
1875
|
+
* error along with headers indicating when you can retry.
|
|
1876
|
+
*
|
|
1877
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
1878
|
+
* Consider implementing exponential backoff in your application.
|
|
1879
|
+
*
|
|
1880
|
+
*/
|
|
1881
|
+
429: _Error;
|
|
1882
|
+
};
|
|
1883
|
+
type ListCampaignsError = ListCampaignsErrors[keyof ListCampaignsErrors];
|
|
1884
|
+
type ListCampaignsResponses = {
|
|
1885
|
+
/**
|
|
1886
|
+
* Successful response
|
|
1887
|
+
*/
|
|
1888
|
+
200: CampaignListEnvelope;
|
|
1889
|
+
};
|
|
1890
|
+
type ListCampaignsResponse = ListCampaignsResponses[keyof ListCampaignsResponses];
|
|
1891
|
+
type ListSyndicatesData = {
|
|
1892
|
+
body?: never;
|
|
1893
|
+
path?: never;
|
|
1894
|
+
query?: {
|
|
1895
|
+
/**
|
|
1896
|
+
* Pagination cursor from previous response
|
|
1897
|
+
*/
|
|
1898
|
+
cursor?: string;
|
|
1899
|
+
/**
|
|
1900
|
+
* Results per page
|
|
1901
|
+
*/
|
|
1902
|
+
limit?: number;
|
|
1903
|
+
};
|
|
1904
|
+
url: '/syndicates';
|
|
1905
|
+
};
|
|
1906
|
+
type ListSyndicatesErrors = {
|
|
1907
|
+
/**
|
|
1908
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1909
|
+
* - No Authorization header is provided
|
|
1910
|
+
* - The access token is invalid or malformed
|
|
1911
|
+
* - The access token has expired
|
|
1912
|
+
* - The access token has been revoked
|
|
1913
|
+
*
|
|
1914
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1915
|
+
*
|
|
1916
|
+
*/
|
|
1917
|
+
401: _Error;
|
|
1918
|
+
/**
|
|
1919
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
1920
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
1921
|
+
* error along with headers indicating when you can retry.
|
|
1922
|
+
*
|
|
1923
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
1924
|
+
* Consider implementing exponential backoff in your application.
|
|
1925
|
+
*
|
|
1926
|
+
*/
|
|
1927
|
+
429: _Error;
|
|
1928
|
+
};
|
|
1929
|
+
type ListSyndicatesError = ListSyndicatesErrors[keyof ListSyndicatesErrors];
|
|
1930
|
+
type ListSyndicatesResponses = {
|
|
1931
|
+
/**
|
|
1932
|
+
* Successful response
|
|
1933
|
+
*/
|
|
1934
|
+
200: SyndicateListEnvelope;
|
|
1935
|
+
};
|
|
1936
|
+
type ListSyndicatesResponse = ListSyndicatesResponses[keyof ListSyndicatesResponses];
|
|
1937
|
+
type GetSyndicateData = {
|
|
1938
|
+
body?: never;
|
|
1939
|
+
path: {
|
|
1940
|
+
/**
|
|
1941
|
+
* The syndicate ID
|
|
1942
|
+
*/
|
|
1943
|
+
syndicate_id: number;
|
|
1944
|
+
};
|
|
1945
|
+
query?: never;
|
|
1946
|
+
url: '/syndicates/{syndicate_id}';
|
|
1947
|
+
};
|
|
1948
|
+
type GetSyndicateErrors = {
|
|
1949
|
+
/**
|
|
1950
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
1951
|
+
* - No Authorization header is provided
|
|
1952
|
+
* - The access token is invalid or malformed
|
|
1953
|
+
* - The access token has expired
|
|
1954
|
+
* - The access token has been revoked
|
|
1955
|
+
*
|
|
1956
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
1957
|
+
*
|
|
1958
|
+
*/
|
|
1959
|
+
401: _Error;
|
|
1960
|
+
/**
|
|
1961
|
+
* The authenticated user does not have permission to access this resource.
|
|
1962
|
+
* This typically means:
|
|
1963
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
1964
|
+
* - The resource belongs to a different user
|
|
1965
|
+
* - The user's role doesn't allow this operation
|
|
1966
|
+
*
|
|
1967
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
1968
|
+
*
|
|
1969
|
+
*/
|
|
1970
|
+
403: _Error;
|
|
1971
|
+
/**
|
|
1972
|
+
* Syndicate not found
|
|
1973
|
+
*/
|
|
1974
|
+
404: _Error;
|
|
1975
|
+
};
|
|
1976
|
+
type GetSyndicateError = GetSyndicateErrors[keyof GetSyndicateErrors];
|
|
1977
|
+
type GetSyndicateResponses = {
|
|
1978
|
+
/**
|
|
1979
|
+
* Successful response
|
|
1980
|
+
*/
|
|
1981
|
+
200: SyndicateDetailEnvelope;
|
|
1982
|
+
};
|
|
1983
|
+
type GetSyndicateResponse = GetSyndicateResponses[keyof GetSyndicateResponses];
|
|
1984
|
+
type UpdateSyndicateData = {
|
|
1985
|
+
body: {
|
|
1986
|
+
syndicate: {
|
|
1987
|
+
name?: string;
|
|
1988
|
+
description?: string;
|
|
1989
|
+
tagline?: string;
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
path: {
|
|
1993
|
+
/**
|
|
1994
|
+
* The syndicate ID
|
|
1995
|
+
*/
|
|
1996
|
+
syndicate_id: number;
|
|
1997
|
+
};
|
|
1998
|
+
query?: never;
|
|
1999
|
+
url: '/syndicates/{syndicate_id}';
|
|
2000
|
+
};
|
|
2001
|
+
type UpdateSyndicateErrors = {
|
|
2002
|
+
/**
|
|
2003
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2004
|
+
* - No Authorization header is provided
|
|
2005
|
+
* - The access token is invalid or malformed
|
|
2006
|
+
* - The access token has expired
|
|
2007
|
+
* - The access token has been revoked
|
|
2008
|
+
*
|
|
2009
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2010
|
+
*
|
|
2011
|
+
*/
|
|
2012
|
+
401: _Error;
|
|
2013
|
+
/**
|
|
2014
|
+
* The authenticated user does not have permission to access this resource.
|
|
2015
|
+
* This typically means:
|
|
2016
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2017
|
+
* - The resource belongs to a different user
|
|
2018
|
+
* - The user's role doesn't allow this operation
|
|
2019
|
+
*
|
|
2020
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2021
|
+
*
|
|
2022
|
+
*/
|
|
2023
|
+
403: _Error;
|
|
2024
|
+
/**
|
|
2025
|
+
* Validation error
|
|
2026
|
+
*/
|
|
2027
|
+
422: _Error;
|
|
2028
|
+
};
|
|
2029
|
+
type UpdateSyndicateError = UpdateSyndicateErrors[keyof UpdateSyndicateErrors];
|
|
2030
|
+
type UpdateSyndicateResponses = {
|
|
2031
|
+
/**
|
|
2032
|
+
* Syndicate updated
|
|
2033
|
+
*/
|
|
2034
|
+
200: SyndicateDetailEnvelope;
|
|
2035
|
+
};
|
|
2036
|
+
type UpdateSyndicateResponse = UpdateSyndicateResponses[keyof UpdateSyndicateResponses];
|
|
2037
|
+
type ListSyndicateMembersData = {
|
|
2038
|
+
body?: never;
|
|
2039
|
+
path: {
|
|
2040
|
+
/**
|
|
2041
|
+
* The syndicate ID
|
|
2042
|
+
*/
|
|
2043
|
+
syndicate_id: number;
|
|
2044
|
+
};
|
|
2045
|
+
query?: {
|
|
2046
|
+
/**
|
|
2047
|
+
* Filter by role (e.g. creator, manager, member, invitee, applicant)
|
|
2048
|
+
*/
|
|
2049
|
+
role?: string;
|
|
2050
|
+
/**
|
|
2051
|
+
* Filter by syndicate permission level
|
|
2052
|
+
*/
|
|
2053
|
+
permission?: 'full_access' | 'operator';
|
|
2054
|
+
/**
|
|
2055
|
+
* Search by name or email
|
|
2056
|
+
*/
|
|
2057
|
+
search?: string;
|
|
2058
|
+
/**
|
|
2059
|
+
* Sort order for results
|
|
2060
|
+
*/
|
|
2061
|
+
sort?: 'relevance' | 'newest' | 'oldest' | 'alphabetical' | 'last_activity';
|
|
2062
|
+
/**
|
|
2063
|
+
* Filter by whether the member has invested in any syndicate deal
|
|
2064
|
+
*/
|
|
2065
|
+
has_invested?: 'true' | 'false';
|
|
2066
|
+
/**
|
|
2067
|
+
* Filter to accredited members only
|
|
2068
|
+
*/
|
|
2069
|
+
accredited?: 'true';
|
|
2070
|
+
/**
|
|
2071
|
+
* Filter by 'can help with' tag (ILIKE match)
|
|
2072
|
+
*/
|
|
2073
|
+
tag?: string;
|
|
2074
|
+
};
|
|
2075
|
+
url: '/syndicates/{syndicate_id}/members';
|
|
2076
|
+
};
|
|
2077
|
+
type ListSyndicateMembersErrors = {
|
|
2078
|
+
/**
|
|
2079
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2080
|
+
* - No Authorization header is provided
|
|
2081
|
+
* - The access token is invalid or malformed
|
|
2082
|
+
* - The access token has expired
|
|
2083
|
+
* - The access token has been revoked
|
|
2084
|
+
*
|
|
2085
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2086
|
+
*
|
|
2087
|
+
*/
|
|
2088
|
+
401: _Error;
|
|
2089
|
+
/**
|
|
2090
|
+
* The authenticated user does not have permission to access this resource.
|
|
2091
|
+
* This typically means:
|
|
2092
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2093
|
+
* - The resource belongs to a different user
|
|
2094
|
+
* - The user's role doesn't allow this operation
|
|
2095
|
+
*
|
|
2096
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2097
|
+
*
|
|
2098
|
+
*/
|
|
2099
|
+
403: _Error;
|
|
2100
|
+
};
|
|
2101
|
+
type ListSyndicateMembersError = ListSyndicateMembersErrors[keyof ListSyndicateMembersErrors];
|
|
2102
|
+
type ListSyndicateMembersResponses = {
|
|
2103
|
+
/**
|
|
2104
|
+
* Successful response
|
|
2105
|
+
*/
|
|
2106
|
+
200: SyndicateMemberListEnvelope;
|
|
2107
|
+
};
|
|
2108
|
+
type ListSyndicateMembersResponse = ListSyndicateMembersResponses[keyof ListSyndicateMembersResponses];
|
|
2109
|
+
type InviteSyndicateMemberData = {
|
|
2110
|
+
body: {
|
|
2111
|
+
email: string;
|
|
2112
|
+
/**
|
|
2113
|
+
* Display name for the invitee
|
|
2114
|
+
*/
|
|
2115
|
+
name?: string;
|
|
2116
|
+
/**
|
|
2117
|
+
* Permission level. Only the syndicate creator can assign full_access (admin).
|
|
2118
|
+
*/
|
|
2119
|
+
syndicate_permission?: 'full_access' | 'operator';
|
|
2120
|
+
};
|
|
2121
|
+
path: {
|
|
2122
|
+
/**
|
|
2123
|
+
* The syndicate ID
|
|
2124
|
+
*/
|
|
2125
|
+
syndicate_id: number;
|
|
2126
|
+
};
|
|
2127
|
+
query?: never;
|
|
2128
|
+
url: '/syndicates/{syndicate_id}/members/invite';
|
|
2129
|
+
};
|
|
2130
|
+
type InviteSyndicateMemberErrors = {
|
|
2131
|
+
/**
|
|
2132
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2133
|
+
* - No Authorization header is provided
|
|
2134
|
+
* - The access token is invalid or malformed
|
|
2135
|
+
* - The access token has expired
|
|
2136
|
+
* - The access token has been revoked
|
|
2137
|
+
*
|
|
2138
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2139
|
+
*
|
|
2140
|
+
*/
|
|
2141
|
+
401: _Error;
|
|
2142
|
+
/**
|
|
2143
|
+
* The authenticated user does not have permission to access this resource.
|
|
2144
|
+
* This typically means:
|
|
2145
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2146
|
+
* - The resource belongs to a different user
|
|
2147
|
+
* - The user's role doesn't allow this operation
|
|
2148
|
+
*
|
|
2149
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2150
|
+
*
|
|
2151
|
+
*/
|
|
2152
|
+
403: _Error;
|
|
2153
|
+
/**
|
|
2154
|
+
* Validation error (e.g. already a member)
|
|
2155
|
+
*/
|
|
2156
|
+
422: _Error;
|
|
2157
|
+
};
|
|
2158
|
+
type InviteSyndicateMemberError = InviteSyndicateMemberErrors[keyof InviteSyndicateMemberErrors];
|
|
2159
|
+
type InviteSyndicateMemberResponses = {
|
|
2160
|
+
/**
|
|
2161
|
+
* Invitation sent
|
|
2162
|
+
*/
|
|
2163
|
+
201: SyndicateMemberEnvelope;
|
|
2164
|
+
};
|
|
2165
|
+
type InviteSyndicateMemberResponse = InviteSyndicateMemberResponses[keyof InviteSyndicateMemberResponses];
|
|
2166
|
+
type RemoveSyndicateMemberData = {
|
|
2167
|
+
body?: never;
|
|
2168
|
+
path: {
|
|
2169
|
+
/**
|
|
2170
|
+
* The syndicate ID
|
|
2171
|
+
*/
|
|
2172
|
+
syndicate_id: number;
|
|
2173
|
+
/**
|
|
2174
|
+
* The member ID
|
|
2175
|
+
*/
|
|
2176
|
+
member_id: string;
|
|
2177
|
+
};
|
|
2178
|
+
query?: never;
|
|
2179
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}';
|
|
2180
|
+
};
|
|
2181
|
+
type RemoveSyndicateMemberErrors = {
|
|
2182
|
+
/**
|
|
2183
|
+
* Use intents for this action
|
|
2184
|
+
*/
|
|
2185
|
+
422: _Error;
|
|
2186
|
+
};
|
|
2187
|
+
type RemoveSyndicateMemberError = RemoveSyndicateMemberErrors[keyof RemoveSyndicateMemberErrors];
|
|
2188
|
+
type UpdateSyndicateMemberData = {
|
|
2189
|
+
body: {
|
|
2190
|
+
member: {
|
|
2191
|
+
title?: string;
|
|
2192
|
+
carry_percentage_override?: string;
|
|
2193
|
+
};
|
|
2194
|
+
};
|
|
2195
|
+
path: {
|
|
2196
|
+
/**
|
|
2197
|
+
* The syndicate ID
|
|
2198
|
+
*/
|
|
2199
|
+
syndicate_id: number;
|
|
2200
|
+
/**
|
|
2201
|
+
* The member ID
|
|
2202
|
+
*/
|
|
2203
|
+
member_id: string;
|
|
2204
|
+
};
|
|
2205
|
+
query?: never;
|
|
2206
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}';
|
|
2207
|
+
};
|
|
2208
|
+
type UpdateSyndicateMemberErrors = {
|
|
2209
|
+
/**
|
|
2210
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2211
|
+
* - No Authorization header is provided
|
|
2212
|
+
* - The access token is invalid or malformed
|
|
2213
|
+
* - The access token has expired
|
|
2214
|
+
* - The access token has been revoked
|
|
2215
|
+
*
|
|
2216
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2217
|
+
*
|
|
2218
|
+
*/
|
|
2219
|
+
401: _Error;
|
|
2220
|
+
/**
|
|
2221
|
+
* The authenticated user does not have permission to access this resource.
|
|
2222
|
+
* This typically means:
|
|
2223
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2224
|
+
* - The resource belongs to a different user
|
|
2225
|
+
* - The user's role doesn't allow this operation
|
|
2226
|
+
*
|
|
2227
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2228
|
+
*
|
|
2229
|
+
*/
|
|
2230
|
+
403: _Error;
|
|
2231
|
+
};
|
|
2232
|
+
type UpdateSyndicateMemberError = UpdateSyndicateMemberErrors[keyof UpdateSyndicateMemberErrors];
|
|
2233
|
+
type UpdateSyndicateMemberResponses = {
|
|
2234
|
+
/**
|
|
2235
|
+
* Member updated
|
|
2236
|
+
*/
|
|
2237
|
+
200: SyndicateMemberEnvelope;
|
|
2238
|
+
};
|
|
2239
|
+
type UpdateSyndicateMemberResponse = UpdateSyndicateMemberResponses[keyof UpdateSyndicateMemberResponses];
|
|
2240
|
+
type ApproveSyndicateMemberData = {
|
|
2241
|
+
body?: never;
|
|
2242
|
+
path: {
|
|
2243
|
+
/**
|
|
2244
|
+
* The syndicate ID
|
|
2245
|
+
*/
|
|
2246
|
+
syndicate_id: number;
|
|
2247
|
+
/**
|
|
2248
|
+
* The member ID
|
|
2249
|
+
*/
|
|
2250
|
+
member_id: string;
|
|
2251
|
+
};
|
|
2252
|
+
query?: never;
|
|
2253
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/approve';
|
|
2254
|
+
};
|
|
2255
|
+
type ApproveSyndicateMemberErrors = {
|
|
2256
|
+
/**
|
|
2257
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2258
|
+
* - No Authorization header is provided
|
|
2259
|
+
* - The access token is invalid or malformed
|
|
2260
|
+
* - The access token has expired
|
|
2261
|
+
* - The access token has been revoked
|
|
2262
|
+
*
|
|
2263
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2264
|
+
*
|
|
2265
|
+
*/
|
|
2266
|
+
401: _Error;
|
|
2267
|
+
/**
|
|
2268
|
+
* The authenticated user does not have permission to access this resource.
|
|
2269
|
+
* This typically means:
|
|
2270
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2271
|
+
* - The resource belongs to a different user
|
|
2272
|
+
* - The user's role doesn't allow this operation
|
|
2273
|
+
*
|
|
2274
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2275
|
+
*
|
|
2276
|
+
*/
|
|
2277
|
+
403: _Error;
|
|
2278
|
+
};
|
|
2279
|
+
type ApproveSyndicateMemberError = ApproveSyndicateMemberErrors[keyof ApproveSyndicateMemberErrors];
|
|
2280
|
+
type ApproveSyndicateMemberResponses = {
|
|
2281
|
+
/**
|
|
2282
|
+
* Member approved
|
|
2283
|
+
*/
|
|
2284
|
+
200: SyndicateMemberEnvelope;
|
|
2285
|
+
};
|
|
2286
|
+
type ApproveSyndicateMemberResponse = ApproveSyndicateMemberResponses[keyof ApproveSyndicateMemberResponses];
|
|
2287
|
+
type HideSyndicateMemberData = {
|
|
2288
|
+
body?: never;
|
|
2289
|
+
path: {
|
|
2290
|
+
/**
|
|
2291
|
+
* The syndicate ID
|
|
2292
|
+
*/
|
|
2293
|
+
syndicate_id: number;
|
|
2294
|
+
/**
|
|
2295
|
+
* The member ID
|
|
2296
|
+
*/
|
|
2297
|
+
member_id: string;
|
|
2298
|
+
};
|
|
2299
|
+
query?: never;
|
|
2300
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/hide';
|
|
2301
|
+
};
|
|
2302
|
+
type HideSyndicateMemberErrors = {
|
|
2303
|
+
/**
|
|
2304
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2305
|
+
* - No Authorization header is provided
|
|
2306
|
+
* - The access token is invalid or malformed
|
|
2307
|
+
* - The access token has expired
|
|
2308
|
+
* - The access token has been revoked
|
|
2309
|
+
*
|
|
2310
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2311
|
+
*
|
|
2312
|
+
*/
|
|
2313
|
+
401: _Error;
|
|
2314
|
+
/**
|
|
2315
|
+
* The authenticated user does not have permission to access this resource.
|
|
2316
|
+
* This typically means:
|
|
2317
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2318
|
+
* - The resource belongs to a different user
|
|
2319
|
+
* - The user's role doesn't allow this operation
|
|
2320
|
+
*
|
|
2321
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2322
|
+
*
|
|
2323
|
+
*/
|
|
2324
|
+
403: _Error;
|
|
2325
|
+
};
|
|
2326
|
+
type HideSyndicateMemberError = HideSyndicateMemberErrors[keyof HideSyndicateMemberErrors];
|
|
2327
|
+
type HideSyndicateMemberResponses = {
|
|
2328
|
+
/**
|
|
2329
|
+
* Member hidden
|
|
2330
|
+
*/
|
|
2331
|
+
200: SyndicateMemberEnvelope;
|
|
2332
|
+
};
|
|
2333
|
+
type HideSyndicateMemberResponse = HideSyndicateMemberResponses[keyof HideSyndicateMemberResponses];
|
|
2334
|
+
type PromoteSyndicateMemberData = {
|
|
2335
|
+
body?: never;
|
|
2336
|
+
path: {
|
|
2337
|
+
/**
|
|
2338
|
+
* The syndicate ID
|
|
2339
|
+
*/
|
|
2340
|
+
syndicate_id: number;
|
|
2341
|
+
/**
|
|
2342
|
+
* The member ID
|
|
2343
|
+
*/
|
|
2344
|
+
member_id: string;
|
|
2345
|
+
};
|
|
2346
|
+
query?: never;
|
|
2347
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/promote';
|
|
2348
|
+
};
|
|
2349
|
+
type PromoteSyndicateMemberErrors = {
|
|
2350
|
+
/**
|
|
2351
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2352
|
+
* - No Authorization header is provided
|
|
2353
|
+
* - The access token is invalid or malformed
|
|
2354
|
+
* - The access token has expired
|
|
2355
|
+
* - The access token has been revoked
|
|
2356
|
+
*
|
|
2357
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2358
|
+
*
|
|
2359
|
+
*/
|
|
2360
|
+
401: _Error;
|
|
2361
|
+
/**
|
|
2362
|
+
* The authenticated user does not have permission to access this resource.
|
|
2363
|
+
* This typically means:
|
|
2364
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2365
|
+
* - The resource belongs to a different user
|
|
2366
|
+
* - The user's role doesn't allow this operation
|
|
2367
|
+
*
|
|
2368
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2369
|
+
*
|
|
2370
|
+
*/
|
|
2371
|
+
403: _Error;
|
|
2372
|
+
};
|
|
2373
|
+
type PromoteSyndicateMemberError = PromoteSyndicateMemberErrors[keyof PromoteSyndicateMemberErrors];
|
|
2374
|
+
type PromoteSyndicateMemberResponses = {
|
|
2375
|
+
/**
|
|
2376
|
+
* Member promoted
|
|
2377
|
+
*/
|
|
2378
|
+
200: SyndicateMemberEnvelope;
|
|
2379
|
+
};
|
|
2380
|
+
type PromoteSyndicateMemberResponse = PromoteSyndicateMemberResponses[keyof PromoteSyndicateMemberResponses];
|
|
2381
|
+
type DemoteSyndicateMemberData = {
|
|
2382
|
+
body?: never;
|
|
2383
|
+
path: {
|
|
2384
|
+
/**
|
|
2385
|
+
* The syndicate ID
|
|
2386
|
+
*/
|
|
2387
|
+
syndicate_id: number;
|
|
2388
|
+
/**
|
|
2389
|
+
* The member ID
|
|
2390
|
+
*/
|
|
2391
|
+
member_id: string;
|
|
2392
|
+
};
|
|
2393
|
+
query?: never;
|
|
2394
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/demote';
|
|
2395
|
+
};
|
|
2396
|
+
type DemoteSyndicateMemberErrors = {
|
|
2397
|
+
/**
|
|
2398
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2399
|
+
* - No Authorization header is provided
|
|
2400
|
+
* - The access token is invalid or malformed
|
|
2401
|
+
* - The access token has expired
|
|
2402
|
+
* - The access token has been revoked
|
|
2403
|
+
*
|
|
2404
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2405
|
+
*
|
|
2406
|
+
*/
|
|
2407
|
+
401: _Error;
|
|
2408
|
+
/**
|
|
2409
|
+
* The authenticated user does not have permission to access this resource.
|
|
2410
|
+
* This typically means:
|
|
2411
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2412
|
+
* - The resource belongs to a different user
|
|
2413
|
+
* - The user's role doesn't allow this operation
|
|
2414
|
+
*
|
|
2415
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2416
|
+
*
|
|
2417
|
+
*/
|
|
2418
|
+
403: _Error;
|
|
2419
|
+
};
|
|
2420
|
+
type DemoteSyndicateMemberError = DemoteSyndicateMemberErrors[keyof DemoteSyndicateMemberErrors];
|
|
2421
|
+
type DemoteSyndicateMemberResponses = {
|
|
2422
|
+
/**
|
|
2423
|
+
* Member demoted
|
|
2424
|
+
*/
|
|
2425
|
+
200: SyndicateMemberEnvelope;
|
|
2426
|
+
};
|
|
2427
|
+
type DemoteSyndicateMemberResponse = DemoteSyndicateMemberResponses[keyof DemoteSyndicateMemberResponses];
|
|
2428
|
+
type RestoreSyndicateMemberData = {
|
|
2429
|
+
body?: never;
|
|
2430
|
+
path: {
|
|
2431
|
+
/**
|
|
2432
|
+
* The syndicate ID
|
|
2433
|
+
*/
|
|
2434
|
+
syndicate_id: number;
|
|
2435
|
+
/**
|
|
2436
|
+
* The member ID
|
|
2437
|
+
*/
|
|
2438
|
+
member_id: string;
|
|
2439
|
+
};
|
|
2440
|
+
query?: never;
|
|
2441
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/restore';
|
|
2442
|
+
};
|
|
2443
|
+
type RestoreSyndicateMemberErrors = {
|
|
2444
|
+
/**
|
|
2445
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2446
|
+
* - No Authorization header is provided
|
|
2447
|
+
* - The access token is invalid or malformed
|
|
2448
|
+
* - The access token has expired
|
|
2449
|
+
* - The access token has been revoked
|
|
2450
|
+
*
|
|
2451
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2452
|
+
*
|
|
2453
|
+
*/
|
|
2454
|
+
401: _Error;
|
|
2455
|
+
/**
|
|
2456
|
+
* The authenticated user does not have permission to access this resource.
|
|
2457
|
+
* This typically means:
|
|
2458
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2459
|
+
* - The resource belongs to a different user
|
|
2460
|
+
* - The user's role doesn't allow this operation
|
|
2461
|
+
*
|
|
2462
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2463
|
+
*
|
|
2464
|
+
*/
|
|
2465
|
+
403: _Error;
|
|
2466
|
+
};
|
|
2467
|
+
type RestoreSyndicateMemberError = RestoreSyndicateMemberErrors[keyof RestoreSyndicateMemberErrors];
|
|
2468
|
+
type RestoreSyndicateMemberResponses = {
|
|
2469
|
+
/**
|
|
2470
|
+
* Member restored
|
|
2471
|
+
*/
|
|
2472
|
+
200: SyndicateMemberEnvelope;
|
|
2473
|
+
};
|
|
2474
|
+
type RestoreSyndicateMemberResponse = RestoreSyndicateMemberResponses[keyof RestoreSyndicateMemberResponses];
|
|
2475
|
+
type ResendSyndicateInviteData = {
|
|
2476
|
+
body?: never;
|
|
2477
|
+
path: {
|
|
2478
|
+
/**
|
|
2479
|
+
* The syndicate ID
|
|
2480
|
+
*/
|
|
2481
|
+
syndicate_id: number;
|
|
2482
|
+
/**
|
|
2483
|
+
* The member ID
|
|
2484
|
+
*/
|
|
2485
|
+
member_id: string;
|
|
2486
|
+
};
|
|
2487
|
+
query?: never;
|
|
2488
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/resend_invite';
|
|
2489
|
+
};
|
|
2490
|
+
type ResendSyndicateInviteErrors = {
|
|
2491
|
+
/**
|
|
2492
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2493
|
+
* - No Authorization header is provided
|
|
2494
|
+
* - The access token is invalid or malformed
|
|
2495
|
+
* - The access token has expired
|
|
2496
|
+
* - The access token has been revoked
|
|
2497
|
+
*
|
|
2498
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2499
|
+
*
|
|
2500
|
+
*/
|
|
2501
|
+
401: _Error;
|
|
2502
|
+
/**
|
|
2503
|
+
* The authenticated user does not have permission to access this resource.
|
|
2504
|
+
* This typically means:
|
|
2505
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2506
|
+
* - The resource belongs to a different user
|
|
2507
|
+
* - The user's role doesn't allow this operation
|
|
2508
|
+
*
|
|
2509
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2510
|
+
*
|
|
2511
|
+
*/
|
|
2512
|
+
403: _Error;
|
|
2513
|
+
};
|
|
2514
|
+
type ResendSyndicateInviteError = ResendSyndicateInviteErrors[keyof ResendSyndicateInviteErrors];
|
|
2515
|
+
type ResendSyndicateInviteResponses = {
|
|
2516
|
+
/**
|
|
2517
|
+
* Invitation resent
|
|
2518
|
+
*/
|
|
2519
|
+
200: unknown;
|
|
2520
|
+
};
|
|
2521
|
+
type ReorderSyndicateMembersData = {
|
|
2522
|
+
body: {
|
|
2523
|
+
member_ids: Array<string>;
|
|
2524
|
+
};
|
|
2525
|
+
path: {
|
|
2526
|
+
/**
|
|
2527
|
+
* The syndicate ID
|
|
2528
|
+
*/
|
|
2529
|
+
syndicate_id: number;
|
|
2530
|
+
};
|
|
2531
|
+
query?: never;
|
|
2532
|
+
url: '/syndicates/{syndicate_id}/members/reorder';
|
|
2533
|
+
};
|
|
2534
|
+
type ReorderSyndicateMembersErrors = {
|
|
2535
|
+
/**
|
|
2536
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2537
|
+
* - No Authorization header is provided
|
|
2538
|
+
* - The access token is invalid or malformed
|
|
2539
|
+
* - The access token has expired
|
|
2540
|
+
* - The access token has been revoked
|
|
2541
|
+
*
|
|
2542
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2543
|
+
*
|
|
2544
|
+
*/
|
|
2545
|
+
401: _Error;
|
|
2546
|
+
/**
|
|
2547
|
+
* The authenticated user does not have permission to access this resource.
|
|
2548
|
+
* This typically means:
|
|
2549
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2550
|
+
* - The resource belongs to a different user
|
|
2551
|
+
* - The user's role doesn't allow this operation
|
|
2552
|
+
*
|
|
2553
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2554
|
+
*
|
|
2555
|
+
*/
|
|
2556
|
+
403: _Error;
|
|
2557
|
+
};
|
|
2558
|
+
type ReorderSyndicateMembersError = ReorderSyndicateMembersErrors[keyof ReorderSyndicateMembersErrors];
|
|
2559
|
+
type ReorderSyndicateMembersResponses = {
|
|
2560
|
+
/**
|
|
2561
|
+
* Order updated
|
|
2562
|
+
*/
|
|
2563
|
+
200: unknown;
|
|
2564
|
+
};
|
|
2565
|
+
type ExportSyndicateMembersCsvData = {
|
|
2566
|
+
body?: never;
|
|
2567
|
+
path: {
|
|
2568
|
+
/**
|
|
2569
|
+
* The syndicate ID
|
|
2570
|
+
*/
|
|
2571
|
+
syndicate_id: number;
|
|
2572
|
+
};
|
|
2573
|
+
query?: never;
|
|
2574
|
+
url: '/syndicates/{syndicate_id}/members/export_csv';
|
|
2575
|
+
};
|
|
2576
|
+
type ExportSyndicateMembersCsvErrors = {
|
|
2577
|
+
/**
|
|
2578
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2579
|
+
* - No Authorization header is provided
|
|
2580
|
+
* - The access token is invalid or malformed
|
|
2581
|
+
* - The access token has expired
|
|
2582
|
+
* - The access token has been revoked
|
|
2583
|
+
*
|
|
2584
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2585
|
+
*
|
|
2586
|
+
*/
|
|
2587
|
+
401: _Error;
|
|
2588
|
+
/**
|
|
2589
|
+
* The authenticated user does not have permission to access this resource.
|
|
2590
|
+
* This typically means:
|
|
2591
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2592
|
+
* - The resource belongs to a different user
|
|
2593
|
+
* - The user's role doesn't allow this operation
|
|
2594
|
+
*
|
|
2595
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2596
|
+
*
|
|
2597
|
+
*/
|
|
2598
|
+
403: _Error;
|
|
2599
|
+
};
|
|
2600
|
+
type ExportSyndicateMembersCsvError = ExportSyndicateMembersCsvErrors[keyof ExportSyndicateMembersCsvErrors];
|
|
2601
|
+
type ExportSyndicateMembersCsvResponses = {
|
|
2602
|
+
/**
|
|
2603
|
+
* CSV data
|
|
2604
|
+
*/
|
|
2605
|
+
200: string;
|
|
2606
|
+
};
|
|
2607
|
+
type ExportSyndicateMembersCsvResponse = ExportSyndicateMembersCsvResponses[keyof ExportSyndicateMembersCsvResponses];
|
|
2608
|
+
type ListSyndicateDealsData = {
|
|
2609
|
+
body?: never;
|
|
2610
|
+
path: {
|
|
2611
|
+
/**
|
|
2612
|
+
* The syndicate ID
|
|
2613
|
+
*/
|
|
2614
|
+
syndicate_id: number;
|
|
2615
|
+
};
|
|
2616
|
+
query?: never;
|
|
2617
|
+
url: '/syndicates/{syndicate_id}/deals';
|
|
2618
|
+
};
|
|
2619
|
+
type ListSyndicateDealsErrors = {
|
|
2620
|
+
/**
|
|
2621
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2622
|
+
* - No Authorization header is provided
|
|
2623
|
+
* - The access token is invalid or malformed
|
|
2624
|
+
* - The access token has expired
|
|
2625
|
+
* - The access token has been revoked
|
|
2626
|
+
*
|
|
2627
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2628
|
+
*
|
|
2629
|
+
*/
|
|
2630
|
+
401: _Error;
|
|
2631
|
+
/**
|
|
2632
|
+
* The authenticated user does not have permission to access this resource.
|
|
2633
|
+
* This typically means:
|
|
2634
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2635
|
+
* - The resource belongs to a different user
|
|
2636
|
+
* - The user's role doesn't allow this operation
|
|
2637
|
+
*
|
|
2638
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2639
|
+
*
|
|
2640
|
+
*/
|
|
2641
|
+
403: _Error;
|
|
2642
|
+
};
|
|
2643
|
+
type ListSyndicateDealsError = ListSyndicateDealsErrors[keyof ListSyndicateDealsErrors];
|
|
2644
|
+
type ListSyndicateDealsResponses = {
|
|
2645
|
+
/**
|
|
2646
|
+
* Successful response
|
|
2647
|
+
*/
|
|
2648
|
+
200: SyndicateDealListEnvelope;
|
|
2649
|
+
};
|
|
2650
|
+
type ListSyndicateDealsResponse = ListSyndicateDealsResponses[keyof ListSyndicateDealsResponses];
|
|
2651
|
+
type GetSyndicateDealData = {
|
|
2652
|
+
body?: never;
|
|
2653
|
+
path: {
|
|
2654
|
+
/**
|
|
2655
|
+
* The syndicate ID
|
|
2656
|
+
*/
|
|
2657
|
+
syndicate_id: number;
|
|
2658
|
+
/**
|
|
2659
|
+
* The deal (fundraise) ID
|
|
2660
|
+
*/
|
|
2661
|
+
fundraise_id: number;
|
|
2662
|
+
};
|
|
2663
|
+
query?: never;
|
|
2664
|
+
url: '/syndicates/{syndicate_id}/deals/{fundraise_id}';
|
|
2665
|
+
};
|
|
2666
|
+
type GetSyndicateDealErrors = {
|
|
2667
|
+
/**
|
|
2668
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2669
|
+
* - No Authorization header is provided
|
|
2670
|
+
* - The access token is invalid or malformed
|
|
2671
|
+
* - The access token has expired
|
|
2672
|
+
* - The access token has been revoked
|
|
2673
|
+
*
|
|
2674
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2675
|
+
*
|
|
2676
|
+
*/
|
|
2677
|
+
401: _Error;
|
|
2678
|
+
/**
|
|
2679
|
+
* The authenticated user does not have permission to access this resource.
|
|
2680
|
+
* This typically means:
|
|
2681
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2682
|
+
* - The resource belongs to a different user
|
|
2683
|
+
* - The user's role doesn't allow this operation
|
|
2684
|
+
*
|
|
2685
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2686
|
+
*
|
|
2687
|
+
*/
|
|
2688
|
+
403: _Error;
|
|
2689
|
+
/**
|
|
2690
|
+
* Deal not found
|
|
2691
|
+
*/
|
|
2692
|
+
404: _Error;
|
|
2693
|
+
};
|
|
2694
|
+
type GetSyndicateDealError = GetSyndicateDealErrors[keyof GetSyndicateDealErrors];
|
|
2695
|
+
type GetSyndicateDealResponses = {
|
|
2696
|
+
/**
|
|
2697
|
+
* Successful response
|
|
2698
|
+
*/
|
|
2699
|
+
200: SyndicateDealDetailEnvelope;
|
|
2700
|
+
};
|
|
2701
|
+
type GetSyndicateDealResponse = GetSyndicateDealResponses[keyof GetSyndicateDealResponses];
|
|
2702
|
+
type ListSyndicateDealInvestorsData = {
|
|
2703
|
+
body?: never;
|
|
2704
|
+
path: {
|
|
2705
|
+
/**
|
|
2706
|
+
* The syndicate ID
|
|
2707
|
+
*/
|
|
2708
|
+
syndicate_id: number;
|
|
2709
|
+
/**
|
|
2710
|
+
* The deal (fundraise) ID
|
|
2711
|
+
*/
|
|
2712
|
+
fundraise_id: number;
|
|
2713
|
+
};
|
|
2714
|
+
query?: {
|
|
2715
|
+
/**
|
|
2716
|
+
* Pagination cursor from previous response
|
|
2717
|
+
*/
|
|
2718
|
+
cursor?: string;
|
|
2719
|
+
/**
|
|
2720
|
+
* Results per page
|
|
2721
|
+
*/
|
|
2722
|
+
limit?: number;
|
|
2723
|
+
};
|
|
2724
|
+
url: '/syndicates/{syndicate_id}/deals/{fundraise_id}/investors';
|
|
2725
|
+
};
|
|
2726
|
+
type ListSyndicateDealInvestorsErrors = {
|
|
2727
|
+
/**
|
|
2728
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2729
|
+
* - No Authorization header is provided
|
|
2730
|
+
* - The access token is invalid or malformed
|
|
2731
|
+
* - The access token has expired
|
|
2732
|
+
* - The access token has been revoked
|
|
2733
|
+
*
|
|
2734
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2735
|
+
*
|
|
2736
|
+
*/
|
|
2737
|
+
401: _Error;
|
|
2738
|
+
/**
|
|
2739
|
+
* The authenticated user does not have permission to access this resource.
|
|
2740
|
+
* This typically means:
|
|
2741
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2742
|
+
* - The resource belongs to a different user
|
|
2743
|
+
* - The user's role doesn't allow this operation
|
|
2744
|
+
*
|
|
2745
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2746
|
+
*
|
|
2747
|
+
*/
|
|
2748
|
+
403: _Error;
|
|
2749
|
+
/**
|
|
2750
|
+
* Deal not found
|
|
2751
|
+
*/
|
|
2752
|
+
404: _Error;
|
|
2753
|
+
};
|
|
2754
|
+
type ListSyndicateDealInvestorsError = ListSyndicateDealInvestorsErrors[keyof ListSyndicateDealInvestorsErrors];
|
|
2755
|
+
type ListSyndicateDealInvestorsResponses = {
|
|
2756
|
+
/**
|
|
2757
|
+
* Successful response
|
|
2758
|
+
*/
|
|
2759
|
+
200: DealInvestorListEnvelope;
|
|
2760
|
+
};
|
|
2761
|
+
type ListSyndicateDealInvestorsResponse = ListSyndicateDealInvestorsResponses[keyof ListSyndicateDealInvestorsResponses];
|
|
2762
|
+
type ListSyndicateMemberInvestmentsData = {
|
|
2763
|
+
body?: never;
|
|
2764
|
+
path: {
|
|
2765
|
+
/**
|
|
2766
|
+
* The syndicate ID
|
|
2767
|
+
*/
|
|
2768
|
+
syndicate_id: number;
|
|
2769
|
+
/**
|
|
2770
|
+
* The member ID
|
|
2771
|
+
*/
|
|
2772
|
+
member_id: string;
|
|
2773
|
+
};
|
|
2774
|
+
query?: never;
|
|
2775
|
+
url: '/syndicates/{syndicate_id}/members/{member_id}/investments';
|
|
2776
|
+
};
|
|
2777
|
+
type ListSyndicateMemberInvestmentsErrors = {
|
|
2778
|
+
/**
|
|
2779
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2780
|
+
* - No Authorization header is provided
|
|
2781
|
+
* - The access token is invalid or malformed
|
|
2782
|
+
* - The access token has expired
|
|
2783
|
+
* - The access token has been revoked
|
|
2784
|
+
*
|
|
2785
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2786
|
+
*
|
|
2787
|
+
*/
|
|
2788
|
+
401: _Error;
|
|
2789
|
+
/**
|
|
2790
|
+
* The authenticated user does not have permission to access this resource.
|
|
2791
|
+
* This typically means:
|
|
2792
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2793
|
+
* - The resource belongs to a different user
|
|
2794
|
+
* - The user's role doesn't allow this operation
|
|
2795
|
+
*
|
|
2796
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2797
|
+
*
|
|
2798
|
+
*/
|
|
2799
|
+
403: _Error;
|
|
2800
|
+
/**
|
|
2801
|
+
* Member not found
|
|
2802
|
+
*/
|
|
2803
|
+
404: _Error;
|
|
2804
|
+
};
|
|
2805
|
+
type ListSyndicateMemberInvestmentsError = ListSyndicateMemberInvestmentsErrors[keyof ListSyndicateMemberInvestmentsErrors];
|
|
2806
|
+
type ListSyndicateMemberInvestmentsResponses = {
|
|
2807
|
+
/**
|
|
2808
|
+
* Successful response
|
|
2809
|
+
*/
|
|
2810
|
+
200: MemberInvestmentListEnvelope;
|
|
2811
|
+
};
|
|
2812
|
+
type ListSyndicateMemberInvestmentsResponse = ListSyndicateMemberInvestmentsResponses[keyof ListSyndicateMemberInvestmentsResponses];
|
|
2813
|
+
type GetSyndicateStatisticsData = {
|
|
2814
|
+
body?: never;
|
|
2815
|
+
path: {
|
|
2816
|
+
/**
|
|
2817
|
+
* The syndicate ID
|
|
2818
|
+
*/
|
|
2819
|
+
syndicate_id: number;
|
|
2820
|
+
};
|
|
2821
|
+
query?: never;
|
|
2822
|
+
url: '/syndicates/{syndicate_id}/statistics';
|
|
2823
|
+
};
|
|
2824
|
+
type GetSyndicateStatisticsErrors = {
|
|
2825
|
+
/**
|
|
2826
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2827
|
+
* - No Authorization header is provided
|
|
2828
|
+
* - The access token is invalid or malformed
|
|
2829
|
+
* - The access token has expired
|
|
2830
|
+
* - The access token has been revoked
|
|
2831
|
+
*
|
|
2832
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2833
|
+
*
|
|
2834
|
+
*/
|
|
2835
|
+
401: _Error;
|
|
2836
|
+
/**
|
|
2837
|
+
* The authenticated user does not have permission to access this resource.
|
|
2838
|
+
* This typically means:
|
|
2839
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2840
|
+
* - The resource belongs to a different user
|
|
2841
|
+
* - The user's role doesn't allow this operation
|
|
2842
|
+
*
|
|
2843
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2844
|
+
*
|
|
2845
|
+
*/
|
|
2846
|
+
403: _Error;
|
|
2847
|
+
/**
|
|
2848
|
+
* Syndicate not found
|
|
2849
|
+
*/
|
|
2850
|
+
404: _Error;
|
|
2851
|
+
};
|
|
2852
|
+
type GetSyndicateStatisticsError = GetSyndicateStatisticsErrors[keyof GetSyndicateStatisticsErrors];
|
|
2853
|
+
type GetSyndicateStatisticsResponses = {
|
|
2854
|
+
/**
|
|
2855
|
+
* Successful response
|
|
2856
|
+
*/
|
|
2857
|
+
200: SyndicateStatisticsEnvelope;
|
|
2858
|
+
};
|
|
2859
|
+
type GetSyndicateStatisticsResponse = GetSyndicateStatisticsResponses[keyof GetSyndicateStatisticsResponses];
|
|
2860
|
+
type CloseSyndicateDealData = {
|
|
2861
|
+
body?: never;
|
|
2862
|
+
path: {
|
|
2863
|
+
/**
|
|
2864
|
+
* The syndicate ID
|
|
2865
|
+
*/
|
|
2866
|
+
syndicate_id: number;
|
|
2867
|
+
/**
|
|
2868
|
+
* The deal (fundraise) ID
|
|
2869
|
+
*/
|
|
2870
|
+
fundraise_id: number;
|
|
2871
|
+
};
|
|
2872
|
+
query?: never;
|
|
2873
|
+
url: '/syndicates/{syndicate_id}/deals/{fundraise_id}/close';
|
|
2874
|
+
};
|
|
2875
|
+
type CloseSyndicateDealErrors = {
|
|
2876
|
+
/**
|
|
2877
|
+
* Use intents for this action
|
|
2878
|
+
*/
|
|
2879
|
+
422: _Error;
|
|
2880
|
+
};
|
|
2881
|
+
type CloseSyndicateDealError = CloseSyndicateDealErrors[keyof CloseSyndicateDealErrors];
|
|
2882
|
+
type FinalizeSyndicateDealData = {
|
|
2883
|
+
body?: never;
|
|
2884
|
+
path: {
|
|
2885
|
+
/**
|
|
2886
|
+
* The syndicate ID
|
|
2887
|
+
*/
|
|
2888
|
+
syndicate_id: number;
|
|
2889
|
+
/**
|
|
2890
|
+
* The deal (fundraise) ID
|
|
2891
|
+
*/
|
|
2892
|
+
fundraise_id: number;
|
|
2893
|
+
};
|
|
2894
|
+
query?: never;
|
|
2895
|
+
url: '/syndicates/{syndicate_id}/deals/{fundraise_id}/finalize';
|
|
2896
|
+
};
|
|
2897
|
+
type FinalizeSyndicateDealErrors = {
|
|
2898
|
+
/**
|
|
2899
|
+
* Use intents for this action
|
|
2900
|
+
*/
|
|
2901
|
+
422: _Error;
|
|
2902
|
+
};
|
|
2903
|
+
type FinalizeSyndicateDealError = FinalizeSyndicateDealErrors[keyof FinalizeSyndicateDealErrors];
|
|
2904
|
+
type ListIntentsData = {
|
|
2905
|
+
body?: never;
|
|
2906
|
+
path?: never;
|
|
2907
|
+
query?: {
|
|
2908
|
+
status?: 'pending' | 'approved' | 'executed' | 'expired' | 'rejected' | 'failed';
|
|
2909
|
+
resource_type?: string;
|
|
2910
|
+
resource_id?: number;
|
|
2911
|
+
cursor?: string;
|
|
2912
|
+
limit?: number;
|
|
2913
|
+
};
|
|
2914
|
+
url: '/intents';
|
|
2915
|
+
};
|
|
2916
|
+
type ListIntentsErrors = {
|
|
2917
|
+
/**
|
|
2918
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2919
|
+
* - No Authorization header is provided
|
|
2920
|
+
* - The access token is invalid or malformed
|
|
2921
|
+
* - The access token has expired
|
|
2922
|
+
* - The access token has been revoked
|
|
2923
|
+
*
|
|
2924
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2925
|
+
*
|
|
2926
|
+
*/
|
|
2927
|
+
401: _Error;
|
|
2928
|
+
};
|
|
2929
|
+
type ListIntentsError = ListIntentsErrors[keyof ListIntentsErrors];
|
|
2930
|
+
type ListIntentsResponses = {
|
|
2931
|
+
/**
|
|
2932
|
+
* Successful response
|
|
2933
|
+
*/
|
|
2934
|
+
200: IntentListEnvelope;
|
|
2935
|
+
};
|
|
2936
|
+
type ListIntentsResponse = ListIntentsResponses[keyof ListIntentsResponses];
|
|
2937
|
+
type CreateIntentData = {
|
|
2938
|
+
body: {
|
|
2939
|
+
/**
|
|
2940
|
+
* The action to perform
|
|
2941
|
+
*/
|
|
2942
|
+
action_name: 'syndicates.close_deal' | 'syndicates.finalize_deal' | 'syndicates.publish' | 'syndicates.remove_member' | 'syndicates.delete_draft';
|
|
2943
|
+
/**
|
|
2944
|
+
* The model class name of the resource
|
|
2945
|
+
*/
|
|
2946
|
+
resource_type: string;
|
|
2947
|
+
resource_id: number;
|
|
2948
|
+
/**
|
|
2949
|
+
* Action-specific parameters
|
|
2950
|
+
*/
|
|
2951
|
+
params?: {
|
|
2952
|
+
[key: string]: unknown;
|
|
2953
|
+
};
|
|
2954
|
+
/**
|
|
2955
|
+
* Client-provided deduplication key. If a pending/executed intent exists with this key, the existing intent is returned.
|
|
2956
|
+
*/
|
|
2957
|
+
idempotency_key?: string;
|
|
2958
|
+
/**
|
|
2959
|
+
* Human-readable name of the agent proposing the action
|
|
2960
|
+
*/
|
|
2961
|
+
requested_by_agent?: string;
|
|
2962
|
+
};
|
|
2963
|
+
path?: never;
|
|
2964
|
+
query?: never;
|
|
2965
|
+
url: '/intents';
|
|
2966
|
+
};
|
|
2967
|
+
type CreateIntentErrors = {
|
|
2968
|
+
/**
|
|
2969
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
2970
|
+
* - No Authorization header is provided
|
|
2971
|
+
* - The access token is invalid or malformed
|
|
2972
|
+
* - The access token has expired
|
|
2973
|
+
* - The access token has been revoked
|
|
2974
|
+
*
|
|
2975
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
2976
|
+
*
|
|
2977
|
+
*/
|
|
2978
|
+
401: _Error;
|
|
2979
|
+
/**
|
|
2980
|
+
* The authenticated user does not have permission to access this resource.
|
|
2981
|
+
* This typically means:
|
|
2982
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
2983
|
+
* - The resource belongs to a different user
|
|
2984
|
+
* - The user's role doesn't allow this operation
|
|
2985
|
+
*
|
|
2986
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
2987
|
+
*
|
|
2988
|
+
*/
|
|
2989
|
+
403: _Error;
|
|
2990
|
+
/**
|
|
2991
|
+
* Duplicate idempotency key (returns existing intent)
|
|
2992
|
+
*/
|
|
2993
|
+
409: IntentEnvelope;
|
|
2994
|
+
/**
|
|
2995
|
+
* Invalid action or parameters
|
|
2996
|
+
*/
|
|
2997
|
+
422: _Error;
|
|
2998
|
+
};
|
|
2999
|
+
type CreateIntentError = CreateIntentErrors[keyof CreateIntentErrors];
|
|
3000
|
+
type CreateIntentResponses = {
|
|
3001
|
+
/**
|
|
3002
|
+
* Intent created
|
|
3003
|
+
*/
|
|
3004
|
+
201: IntentEnvelope;
|
|
3005
|
+
};
|
|
3006
|
+
type CreateIntentResponse = CreateIntentResponses[keyof CreateIntentResponses];
|
|
3007
|
+
type GetIntentData = {
|
|
3008
|
+
body?: never;
|
|
3009
|
+
path: {
|
|
3010
|
+
/**
|
|
3011
|
+
* Intent UUID
|
|
3012
|
+
*/
|
|
3013
|
+
intent_id: string;
|
|
3014
|
+
};
|
|
3015
|
+
query?: never;
|
|
3016
|
+
url: '/intents/{intent_id}';
|
|
3017
|
+
};
|
|
3018
|
+
type GetIntentErrors = {
|
|
3019
|
+
/**
|
|
3020
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3021
|
+
* - No Authorization header is provided
|
|
3022
|
+
* - The access token is invalid or malformed
|
|
3023
|
+
* - The access token has expired
|
|
3024
|
+
* - The access token has been revoked
|
|
3025
|
+
*
|
|
3026
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3027
|
+
*
|
|
3028
|
+
*/
|
|
3029
|
+
401: _Error;
|
|
3030
|
+
/**
|
|
3031
|
+
* Intent not found
|
|
3032
|
+
*/
|
|
3033
|
+
404: _Error;
|
|
3034
|
+
};
|
|
3035
|
+
type GetIntentError = GetIntentErrors[keyof GetIntentErrors];
|
|
3036
|
+
type GetIntentResponses = {
|
|
3037
|
+
/**
|
|
3038
|
+
* Successful response
|
|
3039
|
+
*/
|
|
3040
|
+
200: IntentEnvelope;
|
|
3041
|
+
};
|
|
3042
|
+
type GetIntentResponse = GetIntentResponses[keyof GetIntentResponses];
|
|
3043
|
+
type ListActivityData = {
|
|
3044
|
+
body?: never;
|
|
3045
|
+
path?: never;
|
|
3046
|
+
query?: {
|
|
3047
|
+
/**
|
|
3048
|
+
* Filter by connected app
|
|
3049
|
+
*/
|
|
3050
|
+
app_id?: number;
|
|
3051
|
+
/**
|
|
3052
|
+
* Filter by action pattern (e.g. syndicates.* or syndicates.member.*)
|
|
3053
|
+
*/
|
|
3054
|
+
action_pattern?: string;
|
|
3055
|
+
/**
|
|
3056
|
+
* Filter by resource type (e.g. Club). Must be used with resource_id.
|
|
3057
|
+
*/
|
|
3058
|
+
resource_type?: string;
|
|
3059
|
+
/**
|
|
3060
|
+
* Filter by specific resource ID. Must be used with resource_type.
|
|
3061
|
+
*/
|
|
3062
|
+
resource_id?: number;
|
|
3063
|
+
status?: 'success' | 'failure' | 'denied';
|
|
3064
|
+
since?: string;
|
|
3065
|
+
until?: string;
|
|
3066
|
+
cursor?: string;
|
|
3067
|
+
limit?: number;
|
|
3068
|
+
};
|
|
3069
|
+
url: '/activity';
|
|
3070
|
+
};
|
|
3071
|
+
type ListActivityErrors = {
|
|
3072
|
+
/**
|
|
3073
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3074
|
+
* - No Authorization header is provided
|
|
3075
|
+
* - The access token is invalid or malformed
|
|
3076
|
+
* - The access token has expired
|
|
3077
|
+
* - The access token has been revoked
|
|
3078
|
+
*
|
|
3079
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3080
|
+
*
|
|
3081
|
+
*/
|
|
3082
|
+
401: _Error;
|
|
3083
|
+
};
|
|
3084
|
+
type ListActivityError = ListActivityErrors[keyof ListActivityErrors];
|
|
3085
|
+
type ListActivityResponses = {
|
|
3086
|
+
/**
|
|
3087
|
+
* Successful response
|
|
3088
|
+
*/
|
|
3089
|
+
200: AuditEventListEnvelope;
|
|
3090
|
+
};
|
|
3091
|
+
type ListActivityResponse = ListActivityResponses[keyof ListActivityResponses];
|
|
3092
|
+
type ListConnectedAppsData = {
|
|
3093
|
+
body?: never;
|
|
3094
|
+
path?: never;
|
|
3095
|
+
query?: never;
|
|
3096
|
+
url: '/connected-apps';
|
|
3097
|
+
};
|
|
3098
|
+
type ListConnectedAppsErrors = {
|
|
3099
|
+
/**
|
|
3100
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3101
|
+
* - No Authorization header is provided
|
|
3102
|
+
* - The access token is invalid or malformed
|
|
3103
|
+
* - The access token has expired
|
|
3104
|
+
* - The access token has been revoked
|
|
3105
|
+
*
|
|
3106
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3107
|
+
*
|
|
3108
|
+
*/
|
|
3109
|
+
401: _Error;
|
|
3110
|
+
};
|
|
3111
|
+
type ListConnectedAppsError = ListConnectedAppsErrors[keyof ListConnectedAppsErrors];
|
|
3112
|
+
type ListConnectedAppsResponses = {
|
|
3113
|
+
/**
|
|
3114
|
+
* Successful response
|
|
3115
|
+
*/
|
|
3116
|
+
200: ConnectedAppListEnvelope;
|
|
3117
|
+
};
|
|
3118
|
+
type ListConnectedAppsResponse = ListConnectedAppsResponses[keyof ListConnectedAppsResponses];
|
|
3119
|
+
type RevokeConnectedAppData = {
|
|
3120
|
+
body?: never;
|
|
3121
|
+
path: {
|
|
3122
|
+
app_id: number;
|
|
3123
|
+
};
|
|
3124
|
+
query?: never;
|
|
3125
|
+
url: '/connected-apps/{app_id}';
|
|
3126
|
+
};
|
|
3127
|
+
type RevokeConnectedAppErrors = {
|
|
3128
|
+
/**
|
|
3129
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3130
|
+
* - No Authorization header is provided
|
|
3131
|
+
* - The access token is invalid or malformed
|
|
3132
|
+
* - The access token has expired
|
|
3133
|
+
* - The access token has been revoked
|
|
3134
|
+
*
|
|
3135
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3136
|
+
*
|
|
3137
|
+
*/
|
|
3138
|
+
401: _Error;
|
|
3139
|
+
/**
|
|
3140
|
+
* App not found
|
|
3141
|
+
*/
|
|
3142
|
+
404: _Error;
|
|
3143
|
+
};
|
|
3144
|
+
type RevokeConnectedAppError = RevokeConnectedAppErrors[keyof RevokeConnectedAppErrors];
|
|
3145
|
+
type RevokeConnectedAppResponses = {
|
|
3146
|
+
/**
|
|
3147
|
+
* App revoked, all tokens and pending intents expired
|
|
3148
|
+
*/
|
|
3149
|
+
200: ConnectedAppRevocationEnvelope;
|
|
3150
|
+
};
|
|
3151
|
+
type RevokeConnectedAppResponse = RevokeConnectedAppResponses[keyof RevokeConnectedAppResponses];
|
|
3152
|
+
type GetAttributionStatsData = {
|
|
3153
|
+
body?: never;
|
|
3154
|
+
path: {
|
|
3155
|
+
/**
|
|
3156
|
+
* The fundraise/campaign ID
|
|
3157
|
+
*/
|
|
3158
|
+
campaign_id: number;
|
|
3159
|
+
};
|
|
3160
|
+
query?: {
|
|
3161
|
+
/**
|
|
3162
|
+
* Filter results to attributions on or after this date. Format: YYYY-MM-DD.
|
|
3163
|
+
* Defaults to 90 days ago if not specified.
|
|
3164
|
+
*
|
|
3165
|
+
*/
|
|
3166
|
+
start_date?: string;
|
|
3167
|
+
/**
|
|
3168
|
+
* Filter results to attributions on or before this date. Format: YYYY-MM-DD.
|
|
3169
|
+
* Defaults to today if not specified.
|
|
3170
|
+
*
|
|
3171
|
+
*/
|
|
3172
|
+
end_date?: string;
|
|
3173
|
+
/**
|
|
3174
|
+
* Filter by UTM source (e.g., "GoogleAds", "facebook", "Klaviyo")
|
|
3175
|
+
*/
|
|
3176
|
+
utm_source?: string;
|
|
3177
|
+
/**
|
|
3178
|
+
* Filter by UTM campaign name
|
|
3179
|
+
*/
|
|
3180
|
+
utm_campaign?: string;
|
|
3181
|
+
};
|
|
3182
|
+
url: '/campaigns/{campaign_id}/attribution/stats';
|
|
3183
|
+
};
|
|
3184
|
+
type GetAttributionStatsErrors = {
|
|
3185
|
+
/**
|
|
3186
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3187
|
+
* - No Authorization header is provided
|
|
3188
|
+
* - The access token is invalid or malformed
|
|
3189
|
+
* - The access token has expired
|
|
3190
|
+
* - The access token has been revoked
|
|
3191
|
+
*
|
|
3192
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3193
|
+
*
|
|
3194
|
+
*/
|
|
3195
|
+
401: _Error;
|
|
3196
|
+
/**
|
|
3197
|
+
* The authenticated user does not have permission to access this resource.
|
|
3198
|
+
* This typically means:
|
|
3199
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3200
|
+
* - The resource belongs to a different user
|
|
3201
|
+
* - The user's role doesn't allow this operation
|
|
3202
|
+
*
|
|
3203
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3204
|
+
*
|
|
3205
|
+
*/
|
|
3206
|
+
403: _Error;
|
|
3207
|
+
/**
|
|
3208
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
3209
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
3210
|
+
* error along with headers indicating when you can retry.
|
|
3211
|
+
*
|
|
3212
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
3213
|
+
* Consider implementing exponential backoff in your application.
|
|
3214
|
+
*
|
|
3215
|
+
*/
|
|
3216
|
+
429: _Error;
|
|
3217
|
+
};
|
|
3218
|
+
type GetAttributionStatsError = GetAttributionStatsErrors[keyof GetAttributionStatsErrors];
|
|
3219
|
+
type GetAttributionStatsResponses = {
|
|
3220
|
+
/**
|
|
3221
|
+
* Successful response
|
|
3222
|
+
*/
|
|
3223
|
+
200: AttributionStatsEnvelope;
|
|
3224
|
+
};
|
|
3225
|
+
type GetAttributionStatsResponse = GetAttributionStatsResponses[keyof GetAttributionStatsResponses];
|
|
3226
|
+
type ListAttributedInvestmentsData = {
|
|
3227
|
+
body?: never;
|
|
3228
|
+
path: {
|
|
3229
|
+
/**
|
|
3230
|
+
* The fundraise/campaign ID
|
|
3231
|
+
*/
|
|
3232
|
+
campaign_id: number;
|
|
3233
|
+
};
|
|
3234
|
+
query?: {
|
|
3235
|
+
/**
|
|
3236
|
+
* Cursor-based pagination token. Use the `next_cursor` value from the previous response's
|
|
3237
|
+
* `meta` object to retrieve the next page of results. Omit this parameter to retrieve the
|
|
3238
|
+
* first page.
|
|
3239
|
+
*
|
|
3240
|
+
*/
|
|
3241
|
+
cursor?: number;
|
|
3242
|
+
/**
|
|
3243
|
+
* Filter results to attributions on or after this date. Format: YYYY-MM-DD.
|
|
3244
|
+
* Defaults to 90 days ago if not specified.
|
|
3245
|
+
*
|
|
3246
|
+
*/
|
|
3247
|
+
start_date?: string;
|
|
3248
|
+
/**
|
|
3249
|
+
* Filter results to attributions on or before this date. Format: YYYY-MM-DD.
|
|
3250
|
+
* Defaults to today if not specified.
|
|
3251
|
+
*
|
|
3252
|
+
*/
|
|
3253
|
+
end_date?: string;
|
|
3254
|
+
/**
|
|
3255
|
+
* Filter by UTM source (e.g., "GoogleAds", "facebook", "Klaviyo")
|
|
3256
|
+
*/
|
|
3257
|
+
utm_source?: string;
|
|
3258
|
+
/**
|
|
3259
|
+
* Filter by UTM campaign name
|
|
3260
|
+
*/
|
|
3261
|
+
utm_campaign?: string;
|
|
3262
|
+
/**
|
|
3263
|
+
* Level of detail to return:
|
|
3264
|
+
* - `anonymized` (default): Opaque tokens, amount tiers
|
|
3265
|
+
* - `full`: Real IDs, exact amounts, investor PII (founders only)
|
|
3266
|
+
*
|
|
3267
|
+
* Marketing partners always receive anonymized data regardless of this parameter.
|
|
3268
|
+
*
|
|
3269
|
+
*/
|
|
3270
|
+
detail_level?: 'anonymized' | 'full';
|
|
3271
|
+
};
|
|
3272
|
+
url: '/campaigns/{campaign_id}/attribution/investments';
|
|
3273
|
+
};
|
|
3274
|
+
type ListAttributedInvestmentsErrors = {
|
|
3275
|
+
/**
|
|
3276
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3277
|
+
* - No Authorization header is provided
|
|
3278
|
+
* - The access token is invalid or malformed
|
|
3279
|
+
* - The access token has expired
|
|
3280
|
+
* - The access token has been revoked
|
|
3281
|
+
*
|
|
3282
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3283
|
+
*
|
|
3284
|
+
*/
|
|
3285
|
+
401: _Error;
|
|
3286
|
+
/**
|
|
3287
|
+
* Access denied. This typically means:
|
|
3288
|
+
* - Your OAuth application hasn't been approved for Tier 1 access
|
|
3289
|
+
* - Your token doesn't include the `read:attribution:anonymized` scope
|
|
3290
|
+
*
|
|
3291
|
+
* To request Tier 1 access, visit https://wefunder.com/api/request-access
|
|
3292
|
+
*
|
|
3293
|
+
*/
|
|
3294
|
+
403: _Error;
|
|
3295
|
+
/**
|
|
3296
|
+
* Too many requests in a short time period. The API enforces rate limits to ensure
|
|
3297
|
+
* fair usage and system stability. When you exceed the limit, you'll receive this
|
|
3298
|
+
* error along with headers indicating when you can retry.
|
|
3299
|
+
*
|
|
3300
|
+
* Check the `X-RateLimit-Reset` header to know when your limit will reset.
|
|
3301
|
+
* Consider implementing exponential backoff in your application.
|
|
3302
|
+
*
|
|
3303
|
+
*/
|
|
3304
|
+
429: _Error;
|
|
3305
|
+
};
|
|
3306
|
+
type ListAttributedInvestmentsError = ListAttributedInvestmentsErrors[keyof ListAttributedInvestmentsErrors];
|
|
3307
|
+
type ListAttributedInvestmentsResponses = {
|
|
3308
|
+
/**
|
|
3309
|
+
* Successful response
|
|
3310
|
+
*/
|
|
3311
|
+
200: AttributedInvestmentListEnvelope;
|
|
3312
|
+
};
|
|
3313
|
+
type ListAttributedInvestmentsResponse = ListAttributedInvestmentsResponses[keyof ListAttributedInvestmentsResponses];
|
|
3314
|
+
type ListWebhookSubscriptionsData = {
|
|
3315
|
+
body?: never;
|
|
3316
|
+
path: {
|
|
3317
|
+
/**
|
|
3318
|
+
* The fundraise/campaign ID
|
|
3319
|
+
*/
|
|
3320
|
+
campaign_id: number;
|
|
3321
|
+
};
|
|
3322
|
+
query?: never;
|
|
3323
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks';
|
|
3324
|
+
};
|
|
3325
|
+
type ListWebhookSubscriptionsErrors = {
|
|
3326
|
+
/**
|
|
3327
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3328
|
+
* - No Authorization header is provided
|
|
3329
|
+
* - The access token is invalid or malformed
|
|
3330
|
+
* - The access token has expired
|
|
3331
|
+
* - The access token has been revoked
|
|
3332
|
+
*
|
|
3333
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3334
|
+
*
|
|
3335
|
+
*/
|
|
3336
|
+
401: _Error;
|
|
3337
|
+
/**
|
|
3338
|
+
* The authenticated user does not have permission to access this resource.
|
|
3339
|
+
* This typically means:
|
|
3340
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3341
|
+
* - The resource belongs to a different user
|
|
3342
|
+
* - The user's role doesn't allow this operation
|
|
3343
|
+
*
|
|
3344
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3345
|
+
*
|
|
3346
|
+
*/
|
|
3347
|
+
403: _Error;
|
|
3348
|
+
};
|
|
3349
|
+
type ListWebhookSubscriptionsError = ListWebhookSubscriptionsErrors[keyof ListWebhookSubscriptionsErrors];
|
|
3350
|
+
type ListWebhookSubscriptionsResponses = {
|
|
3351
|
+
/**
|
|
3352
|
+
* Successful response
|
|
3353
|
+
*/
|
|
3354
|
+
200: WebhookSubscriptionListEnvelope;
|
|
3355
|
+
};
|
|
3356
|
+
type ListWebhookSubscriptionsResponse = ListWebhookSubscriptionsResponses[keyof ListWebhookSubscriptionsResponses];
|
|
3357
|
+
type CreateWebhookSubscriptionData = {
|
|
3358
|
+
body: {
|
|
3359
|
+
/**
|
|
3360
|
+
* HTTPS URL to receive webhook POSTs
|
|
3361
|
+
*/
|
|
3362
|
+
target_url: string;
|
|
3363
|
+
/**
|
|
3364
|
+
* Events to subscribe to
|
|
3365
|
+
*/
|
|
3366
|
+
events: Array<'investment.applied' | 'investment.confirmed' | 'investment.canceled'>;
|
|
3367
|
+
};
|
|
3368
|
+
path: {
|
|
3369
|
+
/**
|
|
3370
|
+
* The fundraise/campaign ID
|
|
3371
|
+
*/
|
|
3372
|
+
campaign_id: number;
|
|
3373
|
+
};
|
|
3374
|
+
query?: never;
|
|
3375
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks';
|
|
3376
|
+
};
|
|
3377
|
+
type CreateWebhookSubscriptionErrors = {
|
|
3378
|
+
/**
|
|
3379
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3380
|
+
* - No Authorization header is provided
|
|
3381
|
+
* - The access token is invalid or malformed
|
|
3382
|
+
* - The access token has expired
|
|
3383
|
+
* - The access token has been revoked
|
|
3384
|
+
*
|
|
3385
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3386
|
+
*
|
|
3387
|
+
*/
|
|
3388
|
+
401: _Error;
|
|
3389
|
+
/**
|
|
3390
|
+
* The authenticated user does not have permission to access this resource.
|
|
3391
|
+
* This typically means:
|
|
3392
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3393
|
+
* - The resource belongs to a different user
|
|
3394
|
+
* - The user's role doesn't allow this operation
|
|
3395
|
+
*
|
|
3396
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3397
|
+
*
|
|
3398
|
+
*/
|
|
3399
|
+
403: _Error;
|
|
3400
|
+
/**
|
|
3401
|
+
* Validation error (invalid URL, events, or limit reached)
|
|
3402
|
+
*/
|
|
3403
|
+
422: _Error;
|
|
3404
|
+
};
|
|
3405
|
+
type CreateWebhookSubscriptionError = CreateWebhookSubscriptionErrors[keyof CreateWebhookSubscriptionErrors];
|
|
3406
|
+
type CreateWebhookSubscriptionResponses = {
|
|
3407
|
+
/**
|
|
3408
|
+
* Subscription created
|
|
3409
|
+
*/
|
|
3410
|
+
201: WebhookSubscriptionWithSecretEnvelope;
|
|
3411
|
+
};
|
|
3412
|
+
type CreateWebhookSubscriptionResponse = CreateWebhookSubscriptionResponses[keyof CreateWebhookSubscriptionResponses];
|
|
3413
|
+
type DeleteWebhookSubscriptionData = {
|
|
3414
|
+
body?: never;
|
|
3415
|
+
path: {
|
|
3416
|
+
/**
|
|
3417
|
+
* The fundraise/campaign ID
|
|
3418
|
+
*/
|
|
3419
|
+
campaign_id: number;
|
|
3420
|
+
/**
|
|
3421
|
+
* The webhook subscription ID
|
|
3422
|
+
*/
|
|
3423
|
+
webhook_id: number;
|
|
3424
|
+
};
|
|
3425
|
+
query?: never;
|
|
3426
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks/{webhook_id}';
|
|
3427
|
+
};
|
|
3428
|
+
type DeleteWebhookSubscriptionErrors = {
|
|
3429
|
+
/**
|
|
3430
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3431
|
+
* - No Authorization header is provided
|
|
3432
|
+
* - The access token is invalid or malformed
|
|
3433
|
+
* - The access token has expired
|
|
3434
|
+
* - The access token has been revoked
|
|
3435
|
+
*
|
|
3436
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3437
|
+
*
|
|
3438
|
+
*/
|
|
3439
|
+
401: _Error;
|
|
3440
|
+
/**
|
|
3441
|
+
* The authenticated user does not have permission to access this resource.
|
|
3442
|
+
* This typically means:
|
|
3443
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3444
|
+
* - The resource belongs to a different user
|
|
3445
|
+
* - The user's role doesn't allow this operation
|
|
3446
|
+
*
|
|
3447
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3448
|
+
*
|
|
3449
|
+
*/
|
|
3450
|
+
403: _Error;
|
|
3451
|
+
/**
|
|
3452
|
+
* Subscription not found
|
|
3453
|
+
*/
|
|
3454
|
+
404: _Error;
|
|
3455
|
+
};
|
|
3456
|
+
type DeleteWebhookSubscriptionError = DeleteWebhookSubscriptionErrors[keyof DeleteWebhookSubscriptionErrors];
|
|
3457
|
+
type DeleteWebhookSubscriptionResponses = {
|
|
3458
|
+
/**
|
|
3459
|
+
* Subscription deleted
|
|
3460
|
+
*/
|
|
3461
|
+
204: void;
|
|
3462
|
+
};
|
|
3463
|
+
type DeleteWebhookSubscriptionResponse = DeleteWebhookSubscriptionResponses[keyof DeleteWebhookSubscriptionResponses];
|
|
3464
|
+
type GetWebhookSubscriptionData = {
|
|
3465
|
+
body?: never;
|
|
3466
|
+
path: {
|
|
3467
|
+
/**
|
|
3468
|
+
* The fundraise/campaign ID
|
|
3469
|
+
*/
|
|
3470
|
+
campaign_id: number;
|
|
3471
|
+
/**
|
|
3472
|
+
* The webhook subscription ID
|
|
3473
|
+
*/
|
|
3474
|
+
webhook_id: number;
|
|
3475
|
+
};
|
|
3476
|
+
query?: never;
|
|
3477
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks/{webhook_id}';
|
|
3478
|
+
};
|
|
3479
|
+
type GetWebhookSubscriptionErrors = {
|
|
3480
|
+
/**
|
|
3481
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3482
|
+
* - No Authorization header is provided
|
|
3483
|
+
* - The access token is invalid or malformed
|
|
3484
|
+
* - The access token has expired
|
|
3485
|
+
* - The access token has been revoked
|
|
3486
|
+
*
|
|
3487
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3488
|
+
*
|
|
3489
|
+
*/
|
|
3490
|
+
401: _Error;
|
|
3491
|
+
/**
|
|
3492
|
+
* The authenticated user does not have permission to access this resource.
|
|
3493
|
+
* This typically means:
|
|
3494
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3495
|
+
* - The resource belongs to a different user
|
|
3496
|
+
* - The user's role doesn't allow this operation
|
|
3497
|
+
*
|
|
3498
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3499
|
+
*
|
|
3500
|
+
*/
|
|
3501
|
+
403: _Error;
|
|
3502
|
+
/**
|
|
3503
|
+
* Subscription not found
|
|
3504
|
+
*/
|
|
3505
|
+
404: _Error;
|
|
3506
|
+
};
|
|
3507
|
+
type GetWebhookSubscriptionError = GetWebhookSubscriptionErrors[keyof GetWebhookSubscriptionErrors];
|
|
3508
|
+
type GetWebhookSubscriptionResponses = {
|
|
3509
|
+
/**
|
|
3510
|
+
* Successful response
|
|
3511
|
+
*/
|
|
3512
|
+
200: WebhookSubscriptionWithRecentDeliveriesEnvelope;
|
|
3513
|
+
};
|
|
3514
|
+
type GetWebhookSubscriptionResponse = GetWebhookSubscriptionResponses[keyof GetWebhookSubscriptionResponses];
|
|
3515
|
+
type TestWebhookSubscriptionData = {
|
|
3516
|
+
body?: never;
|
|
3517
|
+
path: {
|
|
3518
|
+
/**
|
|
3519
|
+
* The fundraise/campaign ID
|
|
3520
|
+
*/
|
|
3521
|
+
campaign_id: number;
|
|
3522
|
+
/**
|
|
3523
|
+
* The webhook subscription ID
|
|
3524
|
+
*/
|
|
3525
|
+
webhook_id: number;
|
|
3526
|
+
};
|
|
3527
|
+
query?: never;
|
|
3528
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks/{webhook_id}/test';
|
|
3529
|
+
};
|
|
3530
|
+
type TestWebhookSubscriptionErrors = {
|
|
3531
|
+
/**
|
|
3532
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3533
|
+
* - No Authorization header is provided
|
|
3534
|
+
* - The access token is invalid or malformed
|
|
3535
|
+
* - The access token has expired
|
|
3536
|
+
* - The access token has been revoked
|
|
3537
|
+
*
|
|
3538
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3539
|
+
*
|
|
3540
|
+
*/
|
|
3541
|
+
401: _Error;
|
|
3542
|
+
/**
|
|
3543
|
+
* The authenticated user does not have permission to access this resource.
|
|
3544
|
+
* This typically means:
|
|
3545
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3546
|
+
* - The resource belongs to a different user
|
|
3547
|
+
* - The user's role doesn't allow this operation
|
|
3548
|
+
*
|
|
3549
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3550
|
+
*
|
|
3551
|
+
*/
|
|
3552
|
+
403: _Error;
|
|
3553
|
+
/**
|
|
3554
|
+
* Subscription not found
|
|
3555
|
+
*/
|
|
3556
|
+
404: _Error;
|
|
3557
|
+
/**
|
|
3558
|
+
* Subscription is inactive
|
|
3559
|
+
*/
|
|
3560
|
+
422: _Error;
|
|
3561
|
+
};
|
|
3562
|
+
type TestWebhookSubscriptionError = TestWebhookSubscriptionErrors[keyof TestWebhookSubscriptionErrors];
|
|
3563
|
+
type TestWebhookSubscriptionResponses = {
|
|
3564
|
+
/**
|
|
3565
|
+
* Test webhook queued
|
|
3566
|
+
*/
|
|
3567
|
+
200: WebhookTestResultEnvelope;
|
|
3568
|
+
};
|
|
3569
|
+
type TestWebhookSubscriptionResponse = TestWebhookSubscriptionResponses[keyof TestWebhookSubscriptionResponses];
|
|
3570
|
+
type RegenerateWebhookSecretData = {
|
|
3571
|
+
body?: never;
|
|
3572
|
+
path: {
|
|
3573
|
+
/**
|
|
3574
|
+
* The fundraise/campaign ID
|
|
3575
|
+
*/
|
|
3576
|
+
campaign_id: number;
|
|
3577
|
+
/**
|
|
3578
|
+
* The webhook subscription ID
|
|
3579
|
+
*/
|
|
3580
|
+
webhook_id: number;
|
|
3581
|
+
};
|
|
3582
|
+
query?: never;
|
|
3583
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks/{webhook_id}/regenerate_secret';
|
|
3584
|
+
};
|
|
3585
|
+
type RegenerateWebhookSecretErrors = {
|
|
3586
|
+
/**
|
|
3587
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3588
|
+
* - No Authorization header is provided
|
|
3589
|
+
* - The access token is invalid or malformed
|
|
3590
|
+
* - The access token has expired
|
|
3591
|
+
* - The access token has been revoked
|
|
3592
|
+
*
|
|
3593
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3594
|
+
*
|
|
3595
|
+
*/
|
|
3596
|
+
401: _Error;
|
|
3597
|
+
/**
|
|
3598
|
+
* The authenticated user does not have permission to access this resource.
|
|
3599
|
+
* This typically means:
|
|
3600
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3601
|
+
* - The resource belongs to a different user
|
|
3602
|
+
* - The user's role doesn't allow this operation
|
|
3603
|
+
*
|
|
3604
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3605
|
+
*
|
|
3606
|
+
*/
|
|
3607
|
+
403: _Error;
|
|
3608
|
+
/**
|
|
3609
|
+
* Subscription not found
|
|
3610
|
+
*/
|
|
3611
|
+
404: _Error;
|
|
3612
|
+
};
|
|
3613
|
+
type RegenerateWebhookSecretError = RegenerateWebhookSecretErrors[keyof RegenerateWebhookSecretErrors];
|
|
3614
|
+
type RegenerateWebhookSecretResponses = {
|
|
3615
|
+
/**
|
|
3616
|
+
* Secret regenerated
|
|
3617
|
+
*/
|
|
3618
|
+
200: WebhookSubscriptionWithSecret2Envelope;
|
|
3619
|
+
};
|
|
3620
|
+
type RegenerateWebhookSecretResponse = RegenerateWebhookSecretResponses[keyof RegenerateWebhookSecretResponses];
|
|
3621
|
+
type ReactivateWebhookSubscriptionData = {
|
|
3622
|
+
body?: never;
|
|
3623
|
+
path: {
|
|
3624
|
+
/**
|
|
3625
|
+
* The fundraise/campaign ID
|
|
3626
|
+
*/
|
|
3627
|
+
campaign_id: number;
|
|
3628
|
+
/**
|
|
3629
|
+
* The webhook subscription ID
|
|
3630
|
+
*/
|
|
3631
|
+
webhook_id: number;
|
|
3632
|
+
};
|
|
3633
|
+
query?: never;
|
|
3634
|
+
url: '/campaigns/{campaign_id}/attribution/webhooks/{webhook_id}/reactivate';
|
|
3635
|
+
};
|
|
3636
|
+
type ReactivateWebhookSubscriptionErrors = {
|
|
3637
|
+
/**
|
|
3638
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3639
|
+
* - No Authorization header is provided
|
|
3640
|
+
* - The access token is invalid or malformed
|
|
3641
|
+
* - The access token has expired
|
|
3642
|
+
* - The access token has been revoked
|
|
3643
|
+
*
|
|
3644
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3645
|
+
*
|
|
3646
|
+
*/
|
|
3647
|
+
401: _Error;
|
|
3648
|
+
/**
|
|
3649
|
+
* The authenticated user does not have permission to access this resource.
|
|
3650
|
+
* This typically means:
|
|
3651
|
+
* - The user is authenticated but lacks the required OAuth scope
|
|
3652
|
+
* - The resource belongs to a different user
|
|
3653
|
+
* - The user's role doesn't allow this operation
|
|
3654
|
+
*
|
|
3655
|
+
* Check that your OAuth token includes the necessary scopes for this endpoint.
|
|
3656
|
+
*
|
|
3657
|
+
*/
|
|
3658
|
+
403: _Error;
|
|
3659
|
+
/**
|
|
3660
|
+
* Subscription not found
|
|
3661
|
+
*/
|
|
3662
|
+
404: _Error;
|
|
3663
|
+
/**
|
|
3664
|
+
* Webhook is already active
|
|
3665
|
+
*/
|
|
3666
|
+
422: _Error;
|
|
3667
|
+
};
|
|
3668
|
+
type ReactivateWebhookSubscriptionError = ReactivateWebhookSubscriptionErrors[keyof ReactivateWebhookSubscriptionErrors];
|
|
3669
|
+
type ReactivateWebhookSubscriptionResponses = {
|
|
3670
|
+
/**
|
|
3671
|
+
* Webhook reactivated
|
|
3672
|
+
*/
|
|
3673
|
+
200: WebhookSubscriptionEnvelope;
|
|
3674
|
+
};
|
|
3675
|
+
type ReactivateWebhookSubscriptionResponse = ReactivateWebhookSubscriptionResponses[keyof ReactivateWebhookSubscriptionResponses];
|
|
3676
|
+
type GetAttributionMeData = {
|
|
3677
|
+
body?: never;
|
|
3678
|
+
path?: never;
|
|
3679
|
+
query?: never;
|
|
3680
|
+
url: '/attribution/me';
|
|
3681
|
+
};
|
|
3682
|
+
type GetAttributionMeErrors = {
|
|
3683
|
+
/**
|
|
3684
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3685
|
+
* - No Authorization header is provided
|
|
3686
|
+
* - The access token is invalid or malformed
|
|
3687
|
+
* - The access token has expired
|
|
3688
|
+
* - The access token has been revoked
|
|
3689
|
+
*
|
|
3690
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3691
|
+
*
|
|
3692
|
+
*/
|
|
3693
|
+
401: _Error;
|
|
3694
|
+
};
|
|
3695
|
+
type GetAttributionMeError = GetAttributionMeErrors[keyof GetAttributionMeErrors];
|
|
3696
|
+
type GetAttributionMeResponses = {
|
|
3697
|
+
/**
|
|
3698
|
+
* Successful response
|
|
3699
|
+
*/
|
|
3700
|
+
200: AttributionMeEnvelope;
|
|
3701
|
+
};
|
|
3702
|
+
type GetAttributionMeResponse = GetAttributionMeResponses[keyof GetAttributionMeResponses];
|
|
3703
|
+
type ListAttributionCampaignsData = {
|
|
3704
|
+
body?: never;
|
|
3705
|
+
path?: never;
|
|
3706
|
+
query?: never;
|
|
3707
|
+
url: '/attribution/campaigns';
|
|
3708
|
+
};
|
|
3709
|
+
type ListAttributionCampaignsErrors = {
|
|
3710
|
+
/**
|
|
3711
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3712
|
+
* - No Authorization header is provided
|
|
3713
|
+
* - The access token is invalid or malformed
|
|
3714
|
+
* - The access token has expired
|
|
3715
|
+
* - The access token has been revoked
|
|
3716
|
+
*
|
|
3717
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3718
|
+
*
|
|
3719
|
+
*/
|
|
3720
|
+
401: _Error;
|
|
3721
|
+
};
|
|
3722
|
+
type ListAttributionCampaignsError = ListAttributionCampaignsErrors[keyof ListAttributionCampaignsErrors];
|
|
3723
|
+
type ListAttributionCampaignsResponses = {
|
|
3724
|
+
/**
|
|
3725
|
+
* Successful response
|
|
3726
|
+
*/
|
|
3727
|
+
200: AttributionCampaignSummaryListEnvelope;
|
|
3728
|
+
};
|
|
3729
|
+
type ListAttributionCampaignsResponse = ListAttributionCampaignsResponses[keyof ListAttributionCampaignsResponses];
|
|
3730
|
+
type RegisterAsPartnerData = {
|
|
3731
|
+
body: {
|
|
3732
|
+
/**
|
|
3733
|
+
* Name of the marketing/agency company
|
|
3734
|
+
*/
|
|
3735
|
+
company_name: string;
|
|
3736
|
+
/**
|
|
3737
|
+
* Company website URL
|
|
3738
|
+
*/
|
|
3739
|
+
website?: string;
|
|
3740
|
+
};
|
|
3741
|
+
path?: never;
|
|
3742
|
+
query?: never;
|
|
3743
|
+
url: '/attribution/partners/register';
|
|
3744
|
+
};
|
|
3745
|
+
type RegisterAsPartnerErrors = {
|
|
3746
|
+
/**
|
|
3747
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3748
|
+
* - No Authorization header is provided
|
|
3749
|
+
* - The access token is invalid or malformed
|
|
3750
|
+
* - The access token has expired
|
|
3751
|
+
* - The access token has been revoked
|
|
3752
|
+
*
|
|
3753
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3754
|
+
*
|
|
3755
|
+
*/
|
|
3756
|
+
401: _Error;
|
|
3757
|
+
/**
|
|
3758
|
+
* Already registered or validation error
|
|
3759
|
+
*/
|
|
3760
|
+
422: _Error;
|
|
3761
|
+
};
|
|
3762
|
+
type RegisterAsPartnerError = RegisterAsPartnerErrors[keyof RegisterAsPartnerErrors];
|
|
3763
|
+
type RegisterAsPartnerResponses = {
|
|
3764
|
+
/**
|
|
3765
|
+
* Partner registered
|
|
3766
|
+
*/
|
|
3767
|
+
201: MarketingPartnerEnvelope;
|
|
3768
|
+
};
|
|
3769
|
+
type RegisterAsPartnerResponse = RegisterAsPartnerResponses[keyof RegisterAsPartnerResponses];
|
|
3770
|
+
type ListPartnerInvitesData = {
|
|
3771
|
+
body?: never;
|
|
3772
|
+
path?: never;
|
|
3773
|
+
query?: never;
|
|
3774
|
+
url: '/attribution/invites';
|
|
3775
|
+
};
|
|
3776
|
+
type ListPartnerInvitesErrors = {
|
|
3777
|
+
/**
|
|
3778
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3779
|
+
* - No Authorization header is provided
|
|
3780
|
+
* - The access token is invalid or malformed
|
|
3781
|
+
* - The access token has expired
|
|
3782
|
+
* - The access token has been revoked
|
|
3783
|
+
*
|
|
3784
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3785
|
+
*
|
|
3786
|
+
*/
|
|
3787
|
+
401: _Error;
|
|
3788
|
+
};
|
|
3789
|
+
type ListPartnerInvitesError = ListPartnerInvitesErrors[keyof ListPartnerInvitesErrors];
|
|
3790
|
+
type ListPartnerInvitesResponses = {
|
|
3791
|
+
/**
|
|
3792
|
+
* Successful response
|
|
3793
|
+
*/
|
|
3794
|
+
200: PartnerInviteListEnvelope;
|
|
3795
|
+
};
|
|
3796
|
+
type ListPartnerInvitesResponse = ListPartnerInvitesResponses[keyof ListPartnerInvitesResponses];
|
|
3797
|
+
type CreatePartnerInviteData = {
|
|
3798
|
+
body: {
|
|
3799
|
+
direction: 'partner_to_founder' | 'founder_to_partner';
|
|
3800
|
+
/**
|
|
3801
|
+
* Required for founder_to_partner direction
|
|
3802
|
+
*/
|
|
3803
|
+
company_id?: number;
|
|
3804
|
+
/**
|
|
3805
|
+
* Required for founder_to_partner direction
|
|
3806
|
+
*/
|
|
3807
|
+
partner_email?: string;
|
|
3808
|
+
/**
|
|
3809
|
+
* 1=anonymized (default), 2=detailed (future)
|
|
3810
|
+
*/
|
|
3811
|
+
access_level?: number;
|
|
3812
|
+
};
|
|
3813
|
+
path?: never;
|
|
3814
|
+
query?: never;
|
|
3815
|
+
url: '/attribution/invites';
|
|
3816
|
+
};
|
|
3817
|
+
type CreatePartnerInviteErrors = {
|
|
3818
|
+
/**
|
|
3819
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3820
|
+
* - No Authorization header is provided
|
|
3821
|
+
* - The access token is invalid or malformed
|
|
3822
|
+
* - The access token has expired
|
|
3823
|
+
* - The access token has been revoked
|
|
3824
|
+
*
|
|
3825
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3826
|
+
*
|
|
3827
|
+
*/
|
|
3828
|
+
401: _Error;
|
|
3829
|
+
/**
|
|
3830
|
+
* Not authorized to create this invite
|
|
3831
|
+
*/
|
|
3832
|
+
403: _Error;
|
|
3833
|
+
/**
|
|
3834
|
+
* Validation error
|
|
3835
|
+
*/
|
|
3836
|
+
422: _Error;
|
|
3837
|
+
};
|
|
3838
|
+
type CreatePartnerInviteError = CreatePartnerInviteErrors[keyof CreatePartnerInviteErrors];
|
|
3839
|
+
type CreatePartnerInviteResponses = {
|
|
3840
|
+
/**
|
|
3841
|
+
* Invite created
|
|
3842
|
+
*/
|
|
3843
|
+
201: PartnerInviteEnvelope;
|
|
3844
|
+
};
|
|
3845
|
+
type CreatePartnerInviteResponse = CreatePartnerInviteResponses[keyof CreatePartnerInviteResponses];
|
|
3846
|
+
type RevokePartnerInviteData = {
|
|
3847
|
+
body?: never;
|
|
3848
|
+
path: {
|
|
3849
|
+
/**
|
|
3850
|
+
* The invite token
|
|
3851
|
+
*/
|
|
3852
|
+
token: string;
|
|
3853
|
+
};
|
|
3854
|
+
query?: never;
|
|
3855
|
+
url: '/attribution/invites/{token}';
|
|
3856
|
+
};
|
|
3857
|
+
type RevokePartnerInviteErrors = {
|
|
3858
|
+
/**
|
|
3859
|
+
* Authentication required or token is invalid/expired. This error occurs when:
|
|
3860
|
+
* - No Authorization header is provided
|
|
3861
|
+
* - The access token is invalid or malformed
|
|
3862
|
+
* - The access token has expired
|
|
3863
|
+
* - The access token has been revoked
|
|
3864
|
+
*
|
|
3865
|
+
* To resolve: Obtain a new access token using the OAuth 2.0 flow.
|
|
3866
|
+
*
|
|
3867
|
+
*/
|
|
3868
|
+
401: _Error;
|
|
3869
|
+
/**
|
|
3870
|
+
* Not authorized to revoke this invite
|
|
3871
|
+
*/
|
|
3872
|
+
403: _Error;
|
|
3873
|
+
/**
|
|
3874
|
+
* Invite not found
|
|
3875
|
+
*/
|
|
3876
|
+
404: _Error;
|
|
3877
|
+
};
|
|
3878
|
+
type RevokePartnerInviteError = RevokePartnerInviteErrors[keyof RevokePartnerInviteErrors];
|
|
3879
|
+
type RevokePartnerInviteResponses = {
|
|
3880
|
+
/**
|
|
3881
|
+
* Invite revoked
|
|
3882
|
+
*/
|
|
3883
|
+
204: void;
|
|
3884
|
+
};
|
|
3885
|
+
type RevokePartnerInviteResponse = RevokePartnerInviteResponses[keyof RevokePartnerInviteResponses];
|
|
3886
|
+
type ClientOptions = {
|
|
3887
|
+
baseUrl: 'https://{environment}.wefunder.com/api/v2' | (string & {});
|
|
3888
|
+
};
|
|
3889
|
+
|
|
3890
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
3891
|
+
/**
|
|
3892
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
3893
|
+
* individual options. This might be also useful if you want to implement a
|
|
3894
|
+
* custom client.
|
|
3895
|
+
*/
|
|
3896
|
+
client?: Client;
|
|
3897
|
+
/**
|
|
3898
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
3899
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
3900
|
+
*/
|
|
3901
|
+
meta?: Record<string, unknown>;
|
|
3902
|
+
};
|
|
3903
|
+
/**
|
|
3904
|
+
* List public offerings
|
|
3905
|
+
* Returns the offerings shown on wefunder.com/explore — the curated set of companies that
|
|
3906
|
+
* meet Wefunder's discoverability bar (a soft-confirmed traction threshold plus approval),
|
|
3907
|
+
* **one offering per company**. An "offering" is a fundraise, addressed by its `ofr_`
|
|
3908
|
+
* external id.
|
|
3909
|
+
*
|
|
3910
|
+
* This is a public, read-only endpoint backed by the `read:public` scope. It is reachable
|
|
3911
|
+
* with either a server-side (client_credentials) token or a user access token carrying
|
|
3912
|
+
* `read:public`. Private rounds (e.g. Reg D 506(b)) are never listed, and low-traction or
|
|
3913
|
+
* unapproved companies are excluded — exactly as they are on the website.
|
|
3914
|
+
*
|
|
3915
|
+
* Order with `sort` (default: most raised); paginate with `cursor`. `meta.total_count` is
|
|
3916
|
+
* the number of offerings across all pages.
|
|
3917
|
+
*
|
|
3918
|
+
* Use this endpoint to:
|
|
3919
|
+
* - Discover and monitor active deals
|
|
3920
|
+
* - Build deal aggregators and public listings
|
|
3921
|
+
*
|
|
3922
|
+
*/
|
|
3923
|
+
declare const listOfferings: <ThrowOnError extends boolean = false>(options?: Options<ListOfferingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<OfferingListEnvelope, _Error, ThrowOnError, "fields">;
|
|
3924
|
+
/**
|
|
3925
|
+
* Get a public offering
|
|
3926
|
+
* Retrieves a single public offering by its `ofr_` external id.
|
|
3927
|
+
*
|
|
3928
|
+
* A valid id for a non-public offering (e.g. a private Reg D 506(b) round) returns `404` —
|
|
3929
|
+
* having an id does not make an offering publicly resolvable.
|
|
3930
|
+
*
|
|
3931
|
+
*/
|
|
3932
|
+
declare const getOffering: <ThrowOnError extends boolean = false>(options: Options<GetOfferingData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<OfferingEnvelope, _Error, ThrowOnError, "fields">;
|
|
3933
|
+
/**
|
|
3934
|
+
* Get current user profile
|
|
3935
|
+
* Retrieves the profile information for the currently authenticated user. This endpoint returns
|
|
3936
|
+
* basic user details including name, email, and account status.
|
|
3937
|
+
*
|
|
3938
|
+
* Use this endpoint to:
|
|
3939
|
+
* - Display user information in your application
|
|
3940
|
+
* - Verify the identity of the authenticated user
|
|
3941
|
+
* - Check user account status and permissions
|
|
3942
|
+
*
|
|
3943
|
+
* The response includes the user's unique ID which can be used to reference the user in other API calls.
|
|
3944
|
+
*
|
|
3945
|
+
*/
|
|
3946
|
+
declare const getCurrentUser: <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<UserEnvelope, _Error, ThrowOnError, "fields">;
|
|
3947
|
+
/**
|
|
3948
|
+
* List user investments
|
|
3949
|
+
* Retrieves a paginated list of all investments made by the authenticated user. Each investment
|
|
3950
|
+
* includes details about the amount invested, the company, investment date, and current status.
|
|
3951
|
+
*
|
|
3952
|
+
* Use this endpoint to:
|
|
3953
|
+
* - Display a user's investment portfolio
|
|
3954
|
+
* - Track investment history and performance
|
|
3955
|
+
* - Build custom reporting and analytics
|
|
3956
|
+
*
|
|
3957
|
+
* The list is ordered by investment date (newest first) and supports cursor-based pagination
|
|
3958
|
+
* for efficient iteration through large portfolios. Each investment object includes the
|
|
3959
|
+
* campaign details and current valuation information.
|
|
3960
|
+
*
|
|
3961
|
+
*/
|
|
3962
|
+
declare const listInvestments: <ThrowOnError extends boolean = false>(options?: Options<ListInvestmentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<InvestmentListEnvelope, _Error, ThrowOnError, "fields">;
|
|
3963
|
+
/**
|
|
3964
|
+
* List founder campaigns
|
|
3965
|
+
* Retrieves all fundraising campaigns for companies where the authenticated user is a founder.
|
|
3966
|
+
* This endpoint returns comprehensive campaign data including funding progress, investor counts,
|
|
3967
|
+
* and campaign status.
|
|
3968
|
+
*
|
|
3969
|
+
* Use this endpoint to:
|
|
3970
|
+
* - Build custom founder dashboards
|
|
3971
|
+
* - Monitor fundraising progress across multiple campaigns
|
|
3972
|
+
* - Generate reports on campaign performance
|
|
3973
|
+
* - Integrate campaign data into your own tools
|
|
3974
|
+
*
|
|
3975
|
+
* Only founders with the appropriate permissions can access this endpoint. The response includes
|
|
3976
|
+
* both active and closed campaigns, with detailed metrics for each.
|
|
3977
|
+
*
|
|
3978
|
+
*/
|
|
3979
|
+
declare const listCampaigns: <ThrowOnError extends boolean = false>(options?: Options<ListCampaignsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<CampaignListEnvelope, _Error, ThrowOnError, "fields">;
|
|
3980
|
+
/**
|
|
3981
|
+
* List syndicates
|
|
3982
|
+
* Returns syndicates the authenticated user can manage, based on their roles.
|
|
3983
|
+
* Results can be filtered by status and sorted by name or creation date.
|
|
3984
|
+
*
|
|
3985
|
+
*/
|
|
3986
|
+
declare const listSyndicates: <ThrowOnError extends boolean = false>(options?: Options<ListSyndicatesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateListEnvelope, _Error, ThrowOnError, "fields">;
|
|
3987
|
+
/**
|
|
3988
|
+
* Get syndicate details
|
|
3989
|
+
* Returns full details for a specific syndicate including settings, team configuration, and summary metrics.
|
|
3990
|
+
*/
|
|
3991
|
+
declare const getSyndicate: <ThrowOnError extends boolean = false>(options: Options<GetSyndicateData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateDetailEnvelope, _Error, ThrowOnError, "fields">;
|
|
3992
|
+
/**
|
|
3993
|
+
* Update syndicate settings
|
|
3994
|
+
* Update syndicate configuration. Currently supports name, description, and tagline.
|
|
3995
|
+
* Requires `write:syndicates` scope and at least operator permission.
|
|
3996
|
+
*
|
|
3997
|
+
*/
|
|
3998
|
+
declare const updateSyndicate: <ThrowOnError extends boolean = false>(options: Options<UpdateSyndicateData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateDetailEnvelope, _Error, ThrowOnError, "fields">;
|
|
3999
|
+
/**
|
|
4000
|
+
* List members
|
|
4001
|
+
* Returns the member directory for a syndicate with role, status, tags, sidebar notes,
|
|
4002
|
+
* and investment history summaries. Supports filtering, sorting, search, and pagination.
|
|
4003
|
+
*
|
|
4004
|
+
*/
|
|
4005
|
+
declare const listSyndicateMembers: <ThrowOnError extends boolean = false>(options: Options<ListSyndicateMembersData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4006
|
+
/**
|
|
4007
|
+
* Invite member
|
|
4008
|
+
* Send an invitation to join the syndicate by email.
|
|
4009
|
+
*/
|
|
4010
|
+
declare const inviteSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<InviteSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4011
|
+
/**
|
|
4012
|
+
* Remove member (requires intent)
|
|
4013
|
+
* Removing a member is irreversible and requires human approval through the Intent system.
|
|
4014
|
+
* This endpoint always returns 422 with a `use_intents` error directing you to
|
|
4015
|
+
* `POST /v2/intents` with action `syndicates.remove_member`.
|
|
4016
|
+
*
|
|
4017
|
+
*/
|
|
4018
|
+
declare const removeSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<RemoveSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<unknown, _Error, ThrowOnError, "fields">;
|
|
4019
|
+
/**
|
|
4020
|
+
* Update member
|
|
4021
|
+
* Update title and carry override for a member. Requires operator permission.
|
|
4022
|
+
*/
|
|
4023
|
+
declare const updateSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<UpdateSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4024
|
+
/**
|
|
4025
|
+
* Approve applicant
|
|
4026
|
+
* Approve a pending applicant. Only applicants can be approved via API; invitees must accept their invite link.
|
|
4027
|
+
*/
|
|
4028
|
+
declare const approveSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<ApproveSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4029
|
+
/**
|
|
4030
|
+
* Exile member
|
|
4031
|
+
* Exile (hide) a member from the syndicate. Sets their role to exiled.
|
|
4032
|
+
*/
|
|
4033
|
+
declare const hideSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<HideSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4034
|
+
/**
|
|
4035
|
+
* Promote member to admin
|
|
4036
|
+
* Promote a member to full_access (admin) role. Only the syndicate creator can promote members.
|
|
4037
|
+
*/
|
|
4038
|
+
declare const promoteSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<PromoteSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4039
|
+
/**
|
|
4040
|
+
* Demote member to operator
|
|
4041
|
+
* Demote a member from full_access (admin) to operator permission.
|
|
4042
|
+
*/
|
|
4043
|
+
declare const demoteSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<DemoteSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4044
|
+
/**
|
|
4045
|
+
* Restore exiled or resigned member
|
|
4046
|
+
* Restore a member who was previously exiled or resigned. Sets their role back to member.
|
|
4047
|
+
*/
|
|
4048
|
+
declare const restoreSyndicateMember: <ThrowOnError extends boolean = false>(options: Options<RestoreSyndicateMemberData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateMemberEnvelope, _Error, ThrowOnError, "fields">;
|
|
4049
|
+
/**
|
|
4050
|
+
* Resend invitation
|
|
4051
|
+
*/
|
|
4052
|
+
declare const resendSyndicateInvite: <ThrowOnError extends boolean = false>(options: Options<ResendSyndicateInviteData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<unknown, _Error, ThrowOnError, "fields">;
|
|
4053
|
+
/**
|
|
4054
|
+
* Reorder members
|
|
4055
|
+
* Set the display order for the member directory.
|
|
4056
|
+
*/
|
|
4057
|
+
declare const reorderSyndicateMembers: <ThrowOnError extends boolean = false>(options: Options<ReorderSyndicateMembersData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<unknown, _Error, ThrowOnError, "fields">;
|
|
4058
|
+
/**
|
|
4059
|
+
* Export members CSV
|
|
4060
|
+
* Generate a CSV export of the member directory. Returns the CSV data directly
|
|
4061
|
+
* with Content-Type text/csv. Requires operator permission.
|
|
4062
|
+
*
|
|
4063
|
+
*/
|
|
4064
|
+
declare const exportSyndicateMembersCsv: <ThrowOnError extends boolean = false>(options: Options<ExportSyndicateMembersCsvData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<string, _Error, ThrowOnError, "fields">;
|
|
4065
|
+
/**
|
|
4066
|
+
* List deals
|
|
4067
|
+
* Returns all deals (fundraises) within a syndicate with status, terms, and metrics.
|
|
4068
|
+
*/
|
|
4069
|
+
declare const listSyndicateDeals: <ThrowOnError extends boolean = false>(options: Options<ListSyndicateDealsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateDealListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4070
|
+
/**
|
|
4071
|
+
* Get deal details
|
|
4072
|
+
* Returns full details for a specific deal including investor breakdown.
|
|
4073
|
+
*/
|
|
4074
|
+
declare const getSyndicateDeal: <ThrowOnError extends boolean = false>(options: Options<GetSyndicateDealData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateDealDetailEnvelope, _Error, ThrowOnError, "fields">;
|
|
4075
|
+
/**
|
|
4076
|
+
* List deal investors
|
|
4077
|
+
* Returns syndicate members who invested in this deal. Results are scoped to
|
|
4078
|
+
* syndicate member user IDs only and sorted by amount descending.
|
|
4079
|
+
*
|
|
4080
|
+
* The `user_email` field is **moderator-only** — it returns null for non-moderator
|
|
4081
|
+
* callers (i.e., users who are not a manager/operator of the syndicate).
|
|
4082
|
+
*
|
|
4083
|
+
* All monetary values are strings representing cents to avoid floating-point precision issues.
|
|
4084
|
+
*
|
|
4085
|
+
*/
|
|
4086
|
+
declare const listSyndicateDealInvestors: <ThrowOnError extends boolean = false>(options: Options<ListSyndicateDealInvestorsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DealInvestorListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4087
|
+
/**
|
|
4088
|
+
* List member investments
|
|
4089
|
+
* Returns this member's investments in syndicate deals. Scoped to the syndicate's
|
|
4090
|
+
* selected deals (one per company, matching directory semantics).
|
|
4091
|
+
*
|
|
4092
|
+
* All monetary values are strings representing cents to avoid floating-point precision issues.
|
|
4093
|
+
*
|
|
4094
|
+
*/
|
|
4095
|
+
declare const listSyndicateMemberInvestments: <ThrowOnError extends boolean = false>(options: Options<ListSyndicateMemberInvestmentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<MemberInvestmentListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4096
|
+
/**
|
|
4097
|
+
* Get syndicate statistics
|
|
4098
|
+
* Returns aggregate metrics for a syndicate including member counts, deal counts,
|
|
4099
|
+
* total raised, and recent activity.
|
|
4100
|
+
*
|
|
4101
|
+
* `total_raised` and `total_investors` are computed from directory-selected deals
|
|
4102
|
+
* (one per company). `total_deals` and `live_deals` use all linked deals.
|
|
4103
|
+
*
|
|
4104
|
+
* All monetary values are strings representing cents to avoid floating-point precision issues.
|
|
4105
|
+
*
|
|
4106
|
+
*/
|
|
4107
|
+
declare const getSyndicateStatistics: <ThrowOnError extends boolean = false>(options: Options<GetSyndicateStatisticsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SyndicateStatisticsEnvelope, _Error, ThrowOnError, "fields">;
|
|
4108
|
+
/**
|
|
4109
|
+
* Close deal (requires intent)
|
|
4110
|
+
* Closing a deal is irreversible and requires human approval through the Intent system.
|
|
4111
|
+
* This endpoint always returns 422 with a `use_intents` error directing you to
|
|
4112
|
+
* `POST /v2/intents` with action `syndicates.close_deal`.
|
|
4113
|
+
*
|
|
4114
|
+
*/
|
|
4115
|
+
declare const closeSyndicateDeal: <ThrowOnError extends boolean = false>(options: Options<CloseSyndicateDealData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<unknown, _Error, ThrowOnError, "fields">;
|
|
4116
|
+
/**
|
|
4117
|
+
* Finalize deal (requires intent)
|
|
4118
|
+
* Finalizing a deal triggers disbursement and is irreversible. It requires human approval
|
|
4119
|
+
* through the Intent system. This endpoint always returns 422 with a `use_intents` error
|
|
4120
|
+
* directing you to `POST /v2/intents` with action `syndicates.finalize_deal`.
|
|
4121
|
+
*
|
|
4122
|
+
*/
|
|
4123
|
+
declare const finalizeSyndicateDeal: <ThrowOnError extends boolean = false>(options: Options<FinalizeSyndicateDealData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<unknown, _Error, ThrowOnError, "fields">;
|
|
4124
|
+
/**
|
|
4125
|
+
* List intents
|
|
4126
|
+
* List intents created by the current token, optionally filtered by status or resource.
|
|
4127
|
+
*/
|
|
4128
|
+
declare const listIntents: <ThrowOnError extends boolean = false>(options?: Options<ListIntentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<IntentListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4129
|
+
/**
|
|
4130
|
+
* Propose an intent
|
|
4131
|
+
* Propose a dangerous or irreversible action for human approval. Returns a `review_url`
|
|
4132
|
+
* where a human must review the impact and approve before the action executes.
|
|
4133
|
+
*
|
|
4134
|
+
* The entity that proposes an intent can never approve it. Approval always happens
|
|
4135
|
+
* on Wefunder's UI by a user with permission on the resource.
|
|
4136
|
+
*
|
|
4137
|
+
* See [Intents documentation](/concepts/intents) for the full pattern.
|
|
4138
|
+
*
|
|
4139
|
+
*/
|
|
4140
|
+
declare const createIntent: <ThrowOnError extends boolean = false>(options: Options<CreateIntentData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<IntentEnvelope, CreateIntentError, ThrowOnError, "fields">;
|
|
4141
|
+
/**
|
|
4142
|
+
* Get intent status
|
|
4143
|
+
* Check the current status of an intent. Use this to poll for approval
|
|
4144
|
+
* after proposing an intent, or subscribe to `intent.*` webhook events instead.
|
|
4145
|
+
*
|
|
4146
|
+
*/
|
|
4147
|
+
declare const getIntent: <ThrowOnError extends boolean = false>(options: Options<GetIntentData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<IntentEnvelope, _Error, ThrowOnError, "fields">;
|
|
4148
|
+
/**
|
|
4149
|
+
* List activity events
|
|
4150
|
+
* Returns actions taken by OAuth apps authorized by the current user.
|
|
4151
|
+
* This is the API backing the user-facing activity feed at Settings > Activity.
|
|
4152
|
+
*
|
|
4153
|
+
*/
|
|
4154
|
+
declare const listActivity: <ThrowOnError extends boolean = false>(options?: Options<ListActivityData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AuditEventListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4155
|
+
/**
|
|
4156
|
+
* List connected apps
|
|
4157
|
+
* Returns all OAuth apps the user has authorized, with summary stats.
|
|
4158
|
+
*/
|
|
4159
|
+
declare const listConnectedApps: <ThrowOnError extends boolean = false>(options?: Options<ListConnectedAppsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ConnectedAppListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4160
|
+
/**
|
|
4161
|
+
* Revoke connected app
|
|
4162
|
+
* Revoke all tokens for this app. Any pending intents from this app are automatically expired.
|
|
4163
|
+
*
|
|
4164
|
+
*/
|
|
4165
|
+
declare const revokeConnectedApp: <ThrowOnError extends boolean = false>(options: Options<RevokeConnectedAppData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ConnectedAppRevocationEnvelope, _Error, ThrowOnError, "fields">;
|
|
4166
|
+
/**
|
|
4167
|
+
* Get aggregate attribution statistics
|
|
4168
|
+
* Returns aggregate attribution statistics for a campaign. This is a **Tier 0** endpoint
|
|
4169
|
+
* available to all OAuth applications with the `read:attribution:aggregate` scope.
|
|
4170
|
+
*
|
|
4171
|
+
* Use this endpoint to:
|
|
4172
|
+
* - Track overall marketing campaign performance
|
|
4173
|
+
* - Measure conversion rates by UTM source/campaign
|
|
4174
|
+
* - Monitor investment quality metrics
|
|
4175
|
+
* - Build performance dashboards
|
|
4176
|
+
*
|
|
4177
|
+
* The response includes totals and breakdowns by UTM parameters. All counts exclude
|
|
4178
|
+
* disputed attributions.
|
|
4179
|
+
*
|
|
4180
|
+
* **Privacy**: This endpoint returns aggregate data only. No individual investor
|
|
4181
|
+
* information is exposed.
|
|
4182
|
+
*
|
|
4183
|
+
*/
|
|
4184
|
+
declare const getAttributionStats: <ThrowOnError extends boolean = false>(options: Options<GetAttributionStatsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AttributionStatsEnvelope, _Error, ThrowOnError, "fields">;
|
|
4185
|
+
/**
|
|
4186
|
+
* List attributed investments
|
|
4187
|
+
* Returns a list of attributed investments. The detail level depends on your access:
|
|
4188
|
+
*
|
|
4189
|
+
* **Tier 1 (Marketing Partners)** - Anonymized data:
|
|
4190
|
+
* - Investor identity represented by opaque tokens (not real IDs)
|
|
4191
|
+
* - Tokens are campaign-scoped (different token per campaign for same investor)
|
|
4192
|
+
* - Investment amounts shown as tiers (small/medium/large), not exact values
|
|
4193
|
+
* - No PII (email, name, address) is returned
|
|
4194
|
+
*
|
|
4195
|
+
* **Tier 2 (Founders/Employees)** - Full data with `detail_level=full`:
|
|
4196
|
+
* - Real investment IDs (linkable to Wefunder admin)
|
|
4197
|
+
* - Investor name, email, and username
|
|
4198
|
+
* - Exact dollar amounts
|
|
4199
|
+
*
|
|
4200
|
+
* **Access**: Requires Tier 1+ access approval from Wefunder admin.
|
|
4201
|
+
*
|
|
4202
|
+
*/
|
|
4203
|
+
declare const listAttributedInvestments: <ThrowOnError extends boolean = false>(options: Options<ListAttributedInvestmentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AttributedInvestmentListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4204
|
+
/**
|
|
4205
|
+
* List attribution webhook subscriptions
|
|
4206
|
+
* Returns all active webhook subscriptions for this campaign belonging to
|
|
4207
|
+
* your OAuth application.
|
|
4208
|
+
*
|
|
4209
|
+
* **Tier 1** endpoint requiring admin-approved access with the
|
|
4210
|
+
* `read:attribution:anonymized` scope.
|
|
4211
|
+
*
|
|
4212
|
+
*/
|
|
4213
|
+
declare const listWebhookSubscriptions: <ThrowOnError extends boolean = false>(options: Options<ListWebhookSubscriptionsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WebhookSubscriptionListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4214
|
+
/**
|
|
4215
|
+
* Create webhook subscription
|
|
4216
|
+
* Creates a new webhook subscription for this campaign. When attributed
|
|
4217
|
+
* investments change state, we'll POST a JSON payload to your target URL.
|
|
4218
|
+
*
|
|
4219
|
+
* **Tier 1** endpoint requiring admin-approved access.
|
|
4220
|
+
*
|
|
4221
|
+
* ## Webhook Payload
|
|
4222
|
+
*
|
|
4223
|
+
* Payloads include anonymized data (tokens, amount tiers) matching the
|
|
4224
|
+
* `/attribution/investments` endpoint.
|
|
4225
|
+
*
|
|
4226
|
+
* ## Security
|
|
4227
|
+
*
|
|
4228
|
+
* - `target_url` must use HTTPS
|
|
4229
|
+
* - `target_url` cannot resolve to private/internal IPs (SSRF protection)
|
|
4230
|
+
* - Payloads are signed with HMAC-SHA256 using the returned `secret`
|
|
4231
|
+
*
|
|
4232
|
+
* ## Verification
|
|
4233
|
+
*
|
|
4234
|
+
* Verify webhook signatures using the `X-Wefunder-Signature` header:
|
|
4235
|
+
* ```
|
|
4236
|
+
* timestamp = headers['X-Wefunder-Timestamp']
|
|
4237
|
+
* signature = headers['X-Wefunder-Signature']
|
|
4238
|
+
* expected = "sha256=" + HMAC-SHA256(secret, timestamp + "." + raw_body)
|
|
4239
|
+
* ```
|
|
4240
|
+
*
|
|
4241
|
+
* Reject requests where:
|
|
4242
|
+
* - Signature doesn't match
|
|
4243
|
+
* - Timestamp is more than 5 minutes old (replay protection)
|
|
4244
|
+
*
|
|
4245
|
+
*/
|
|
4246
|
+
declare const createWebhookSubscription: <ThrowOnError extends boolean = false>(options: Options<CreateWebhookSubscriptionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WebhookSubscriptionWithSecretEnvelope, _Error, ThrowOnError, "fields">;
|
|
4247
|
+
/**
|
|
4248
|
+
* Delete webhook subscription
|
|
4249
|
+
* Deactivates a webhook subscription. The subscription will stop receiving
|
|
4250
|
+
* events but historical delivery data is retained for 7 days.
|
|
4251
|
+
*
|
|
4252
|
+
*/
|
|
4253
|
+
declare const deleteWebhookSubscription: <ThrowOnError extends boolean = false>(options: Options<DeleteWebhookSubscriptionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<void, _Error, ThrowOnError, "fields">;
|
|
4254
|
+
/**
|
|
4255
|
+
* Get webhook subscription details
|
|
4256
|
+
* Returns details for a specific webhook subscription including recent
|
|
4257
|
+
* delivery history.
|
|
4258
|
+
*
|
|
4259
|
+
*/
|
|
4260
|
+
declare const getWebhookSubscription: <ThrowOnError extends boolean = false>(options: Options<GetWebhookSubscriptionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WebhookSubscriptionWithRecentDeliveriesEnvelope, _Error, ThrowOnError, "fields">;
|
|
4261
|
+
/**
|
|
4262
|
+
* Send test webhook
|
|
4263
|
+
* Sends a test webhook to verify your endpoint is working correctly.
|
|
4264
|
+
* The test payload includes a `"event": "test"` field to distinguish
|
|
4265
|
+
* it from real events.
|
|
4266
|
+
*
|
|
4267
|
+
*/
|
|
4268
|
+
declare const testWebhookSubscription: <ThrowOnError extends boolean = false>(options: Options<TestWebhookSubscriptionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WebhookTestResultEnvelope, _Error, ThrowOnError, "fields">;
|
|
4269
|
+
/**
|
|
4270
|
+
* Regenerate webhook signing secret
|
|
4271
|
+
* Generates a new HMAC signing secret for the webhook subscription.
|
|
4272
|
+
* The old secret is immediately invalidated.
|
|
4273
|
+
*
|
|
4274
|
+
* **Important**: Store the new secret securely - it cannot be retrieved later.
|
|
4275
|
+
*
|
|
4276
|
+
*/
|
|
4277
|
+
declare const regenerateWebhookSecret: <ThrowOnError extends boolean = false>(options: Options<RegenerateWebhookSecretData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WebhookSubscriptionWithSecret2Envelope, _Error, ThrowOnError, "fields">;
|
|
4278
|
+
/**
|
|
4279
|
+
* Reactivate disabled webhook
|
|
4280
|
+
* Reactivates a webhook subscription that was auto-disabled after
|
|
4281
|
+
* consecutive failures. Resets the failure counter to 0.
|
|
4282
|
+
*
|
|
4283
|
+
* Use this after fixing issues with your webhook endpoint.
|
|
4284
|
+
*
|
|
4285
|
+
*/
|
|
4286
|
+
declare const reactivateWebhookSubscription: <ThrowOnError extends boolean = false>(options: Options<ReactivateWebhookSubscriptionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WebhookSubscriptionEnvelope, _Error, ThrowOnError, "fields">;
|
|
4287
|
+
/**
|
|
4288
|
+
* Get current user's attribution profile
|
|
4289
|
+
* Returns the authenticated user's marketing partner profile and connected campaigns.
|
|
4290
|
+
* If the user is not registered as a marketing partner, returns partner info as null.
|
|
4291
|
+
*
|
|
4292
|
+
*/
|
|
4293
|
+
declare const getAttributionMe: <ThrowOnError extends boolean = false>(options?: Options<GetAttributionMeData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AttributionMeEnvelope, _Error, ThrowOnError, "fields">;
|
|
4294
|
+
/**
|
|
4295
|
+
* List campaigns accessible to the current user
|
|
4296
|
+
* Returns all campaigns the authenticated user can access for attribution data.
|
|
4297
|
+
* For founders, this includes their own campaigns.
|
|
4298
|
+
* For marketing partners, this includes campaigns they've been granted access to.
|
|
4299
|
+
*
|
|
4300
|
+
*/
|
|
4301
|
+
declare const listAttributionCampaigns: <ThrowOnError extends boolean = false>(options?: Options<ListAttributionCampaignsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AttributionCampaignSummaryListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4302
|
+
/**
|
|
4303
|
+
* Register as a marketing partner
|
|
4304
|
+
* Registers the authenticated user as a marketing partner.
|
|
4305
|
+
* After registration, the partner can create invites to request access to campaigns.
|
|
4306
|
+
*
|
|
4307
|
+
*/
|
|
4308
|
+
declare const registerAsPartner: <ThrowOnError extends boolean = false>(options: Options<RegisterAsPartnerData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<MarketingPartnerEnvelope, _Error, ThrowOnError, "fields">;
|
|
4309
|
+
/**
|
|
4310
|
+
* List partner invites
|
|
4311
|
+
* Returns all invites created by or sent to the authenticated user.
|
|
4312
|
+
* Includes both pending and accepted invites.
|
|
4313
|
+
*
|
|
4314
|
+
*/
|
|
4315
|
+
declare const listPartnerInvites: <ThrowOnError extends boolean = false>(options?: Options<ListPartnerInvitesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<PartnerInviteListEnvelope, _Error, ThrowOnError, "fields">;
|
|
4316
|
+
/**
|
|
4317
|
+
* Create a partner invite
|
|
4318
|
+
* Creates an invite to establish a partner-company connection.
|
|
4319
|
+
*
|
|
4320
|
+
* **Directions**:
|
|
4321
|
+
* - `partner_to_founder`: Marketing partner invites a founder to grant access
|
|
4322
|
+
* - `founder_to_partner`: Founder invites a marketing partner to access their campaign
|
|
4323
|
+
*
|
|
4324
|
+
* For `partner_to_founder`: Creates a shareable invite link.
|
|
4325
|
+
* For `founder_to_partner`: Sends an email to the partner.
|
|
4326
|
+
*
|
|
4327
|
+
*/
|
|
4328
|
+
declare const createPartnerInvite: <ThrowOnError extends boolean = false>(options: Options<CreatePartnerInviteData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<PartnerInviteEnvelope, _Error, ThrowOnError, "fields">;
|
|
4329
|
+
/**
|
|
4330
|
+
* Revoke a partner invite
|
|
4331
|
+
* Revokes a pending invite. Only the creator can revoke an invite.
|
|
4332
|
+
* Accepted invites cannot be revoked (delete the connection instead).
|
|
4333
|
+
*
|
|
4334
|
+
*/
|
|
4335
|
+
declare const revokePartnerInvite: <ThrowOnError extends boolean = false>(options: Options<RevokePartnerInviteData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<void, _Error, ThrowOnError, "fields">;
|
|
4336
|
+
|
|
4337
|
+
type ops_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options<TData, ThrowOnError>;
|
|
4338
|
+
declare const ops_approveSyndicateMember: typeof approveSyndicateMember;
|
|
4339
|
+
declare const ops_closeSyndicateDeal: typeof closeSyndicateDeal;
|
|
4340
|
+
declare const ops_createIntent: typeof createIntent;
|
|
4341
|
+
declare const ops_createPartnerInvite: typeof createPartnerInvite;
|
|
4342
|
+
declare const ops_createWebhookSubscription: typeof createWebhookSubscription;
|
|
4343
|
+
declare const ops_deleteWebhookSubscription: typeof deleteWebhookSubscription;
|
|
4344
|
+
declare const ops_demoteSyndicateMember: typeof demoteSyndicateMember;
|
|
4345
|
+
declare const ops_exportSyndicateMembersCsv: typeof exportSyndicateMembersCsv;
|
|
4346
|
+
declare const ops_finalizeSyndicateDeal: typeof finalizeSyndicateDeal;
|
|
4347
|
+
declare const ops_getAttributionMe: typeof getAttributionMe;
|
|
4348
|
+
declare const ops_getAttributionStats: typeof getAttributionStats;
|
|
4349
|
+
declare const ops_getCurrentUser: typeof getCurrentUser;
|
|
4350
|
+
declare const ops_getIntent: typeof getIntent;
|
|
4351
|
+
declare const ops_getOffering: typeof getOffering;
|
|
4352
|
+
declare const ops_getSyndicate: typeof getSyndicate;
|
|
4353
|
+
declare const ops_getSyndicateDeal: typeof getSyndicateDeal;
|
|
4354
|
+
declare const ops_getSyndicateStatistics: typeof getSyndicateStatistics;
|
|
4355
|
+
declare const ops_getWebhookSubscription: typeof getWebhookSubscription;
|
|
4356
|
+
declare const ops_hideSyndicateMember: typeof hideSyndicateMember;
|
|
4357
|
+
declare const ops_inviteSyndicateMember: typeof inviteSyndicateMember;
|
|
4358
|
+
declare const ops_listActivity: typeof listActivity;
|
|
4359
|
+
declare const ops_listAttributedInvestments: typeof listAttributedInvestments;
|
|
4360
|
+
declare const ops_listAttributionCampaigns: typeof listAttributionCampaigns;
|
|
4361
|
+
declare const ops_listCampaigns: typeof listCampaigns;
|
|
4362
|
+
declare const ops_listConnectedApps: typeof listConnectedApps;
|
|
4363
|
+
declare const ops_listIntents: typeof listIntents;
|
|
4364
|
+
declare const ops_listInvestments: typeof listInvestments;
|
|
4365
|
+
declare const ops_listOfferings: typeof listOfferings;
|
|
4366
|
+
declare const ops_listPartnerInvites: typeof listPartnerInvites;
|
|
4367
|
+
declare const ops_listSyndicateDealInvestors: typeof listSyndicateDealInvestors;
|
|
4368
|
+
declare const ops_listSyndicateDeals: typeof listSyndicateDeals;
|
|
4369
|
+
declare const ops_listSyndicateMemberInvestments: typeof listSyndicateMemberInvestments;
|
|
4370
|
+
declare const ops_listSyndicateMembers: typeof listSyndicateMembers;
|
|
4371
|
+
declare const ops_listSyndicates: typeof listSyndicates;
|
|
4372
|
+
declare const ops_listWebhookSubscriptions: typeof listWebhookSubscriptions;
|
|
4373
|
+
declare const ops_promoteSyndicateMember: typeof promoteSyndicateMember;
|
|
4374
|
+
declare const ops_reactivateWebhookSubscription: typeof reactivateWebhookSubscription;
|
|
4375
|
+
declare const ops_regenerateWebhookSecret: typeof regenerateWebhookSecret;
|
|
4376
|
+
declare const ops_registerAsPartner: typeof registerAsPartner;
|
|
4377
|
+
declare const ops_removeSyndicateMember: typeof removeSyndicateMember;
|
|
4378
|
+
declare const ops_reorderSyndicateMembers: typeof reorderSyndicateMembers;
|
|
4379
|
+
declare const ops_resendSyndicateInvite: typeof resendSyndicateInvite;
|
|
4380
|
+
declare const ops_restoreSyndicateMember: typeof restoreSyndicateMember;
|
|
4381
|
+
declare const ops_revokeConnectedApp: typeof revokeConnectedApp;
|
|
4382
|
+
declare const ops_revokePartnerInvite: typeof revokePartnerInvite;
|
|
4383
|
+
declare const ops_testWebhookSubscription: typeof testWebhookSubscription;
|
|
4384
|
+
declare const ops_updateSyndicate: typeof updateSyndicate;
|
|
4385
|
+
declare const ops_updateSyndicateMember: typeof updateSyndicateMember;
|
|
4386
|
+
declare namespace ops {
|
|
4387
|
+
export { type ops_Options as Options, ops_approveSyndicateMember as approveSyndicateMember, ops_closeSyndicateDeal as closeSyndicateDeal, ops_createIntent as createIntent, ops_createPartnerInvite as createPartnerInvite, ops_createWebhookSubscription as createWebhookSubscription, ops_deleteWebhookSubscription as deleteWebhookSubscription, ops_demoteSyndicateMember as demoteSyndicateMember, ops_exportSyndicateMembersCsv as exportSyndicateMembersCsv, ops_finalizeSyndicateDeal as finalizeSyndicateDeal, ops_getAttributionMe as getAttributionMe, ops_getAttributionStats as getAttributionStats, ops_getCurrentUser as getCurrentUser, ops_getIntent as getIntent, ops_getOffering as getOffering, ops_getSyndicate as getSyndicate, ops_getSyndicateDeal as getSyndicateDeal, ops_getSyndicateStatistics as getSyndicateStatistics, ops_getWebhookSubscription as getWebhookSubscription, ops_hideSyndicateMember as hideSyndicateMember, ops_inviteSyndicateMember as inviteSyndicateMember, ops_listActivity as listActivity, ops_listAttributedInvestments as listAttributedInvestments, ops_listAttributionCampaigns as listAttributionCampaigns, ops_listCampaigns as listCampaigns, ops_listConnectedApps as listConnectedApps, ops_listIntents as listIntents, ops_listInvestments as listInvestments, ops_listOfferings as listOfferings, ops_listPartnerInvites as listPartnerInvites, ops_listSyndicateDealInvestors as listSyndicateDealInvestors, ops_listSyndicateDeals as listSyndicateDeals, ops_listSyndicateMemberInvestments as listSyndicateMemberInvestments, ops_listSyndicateMembers as listSyndicateMembers, ops_listSyndicates as listSyndicates, ops_listWebhookSubscriptions as listWebhookSubscriptions, ops_promoteSyndicateMember as promoteSyndicateMember, ops_reactivateWebhookSubscription as reactivateWebhookSubscription, ops_regenerateWebhookSecret as regenerateWebhookSecret, ops_registerAsPartner as registerAsPartner, ops_removeSyndicateMember as removeSyndicateMember, ops_reorderSyndicateMembers as reorderSyndicateMembers, ops_resendSyndicateInvite as resendSyndicateInvite, ops_restoreSyndicateMember as restoreSyndicateMember, ops_revokeConnectedApp as revokeConnectedApp, ops_revokePartnerInvite as revokePartnerInvite, ops_testWebhookSubscription as testWebhookSubscription, ops_updateSyndicate as updateSyndicate, ops_updateSyndicateMember as updateSyndicateMember };
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
/** Documented `sort` values for the offerings list, from the generated op. */
|
|
4391
|
+
type OfferingSort = NonNullable<ListOfferingsData["query"]>["sort"];
|
|
4392
|
+
declare const DEFAULT_API_BASE_URL = "https://api.wefunder.com/api/v2";
|
|
4393
|
+
declare const DEFAULT_API_VERSION = "2025-01-15";
|
|
4394
|
+
type Mode = "live" | "test" | "unknown";
|
|
4395
|
+
declare function modeForToken(token: string): Mode;
|
|
4396
|
+
interface WefunderOptions extends OAuthHostOptions {
|
|
4397
|
+
/** A bearer access token. Either this or `tokens` is required. */
|
|
4398
|
+
accessToken?: string;
|
|
4399
|
+
/** A full token set (access + rotating refresh). Enables auto-refresh. */
|
|
4400
|
+
tokens?: TokenSet;
|
|
4401
|
+
/** Needed (with the refresh token) to auto-refresh on expiry/401. */
|
|
4402
|
+
clientId?: string;
|
|
4403
|
+
clientSecret?: string;
|
|
4404
|
+
/**
|
|
4405
|
+
* Marks this as a client_credentials client so the SDK auto-re-mints on expiry/401
|
|
4406
|
+
* (cc tokens have no refresh token). `fromClientCredentials` sets this for you.
|
|
4407
|
+
*/
|
|
4408
|
+
clientCredentials?: {
|
|
4409
|
+
scopes?: string[];
|
|
4410
|
+
};
|
|
4411
|
+
apiVersion?: string;
|
|
4412
|
+
/** Override the API base. The edge proxy routes mode by token prefix — leave default in prod. */
|
|
4413
|
+
baseUrl?: string;
|
|
4414
|
+
store?: TokenStore;
|
|
4415
|
+
onTokenRefresh?: (tokens: TokenSet) => void | Promise<void>;
|
|
4416
|
+
retry?: RetryOptions;
|
|
4417
|
+
fetch?: typeof fetch;
|
|
4418
|
+
now?: () => number;
|
|
4419
|
+
sleep?: (ms: number) => Promise<void>;
|
|
4420
|
+
random?: () => number;
|
|
4421
|
+
}
|
|
4422
|
+
type Result<T> = Promise<{
|
|
4423
|
+
data?: T;
|
|
4424
|
+
error?: unknown;
|
|
4425
|
+
response?: Response;
|
|
4426
|
+
}>;
|
|
4427
|
+
/** Every generated operation, pre-bound to this client. */
|
|
4428
|
+
type RawOps = {
|
|
4429
|
+
[K in keyof typeof ops]: (typeof ops)[K] extends (o: infer O) => infer R ? (options?: Omit<O & object, "client">) => R : never;
|
|
4430
|
+
};
|
|
4431
|
+
declare class Wefunder {
|
|
4432
|
+
#private;
|
|
4433
|
+
readonly mode: Mode;
|
|
4434
|
+
readonly raw: RawOps;
|
|
4435
|
+
constructor(opts: WefunderOptions);
|
|
4436
|
+
/** Server-to-server: exchange client credentials for a token, then build a client. */
|
|
4437
|
+
static fromClientCredentials(opts: OAuthHostOptions & {
|
|
4438
|
+
clientId: string;
|
|
4439
|
+
clientSecret: string;
|
|
4440
|
+
scopes?: string[];
|
|
4441
|
+
apiVersion?: string;
|
|
4442
|
+
baseUrl?: string;
|
|
4443
|
+
fetch?: typeof fetch;
|
|
4444
|
+
now?: () => number;
|
|
4445
|
+
}): Promise<Wefunder>;
|
|
4446
|
+
/** The live token set (e.g. to persist after construction). */
|
|
4447
|
+
get tokens(): TokenSet;
|
|
4448
|
+
/**
|
|
4449
|
+
* Unwrap any generated op result (incl. `wf.raw.*`) the way the ergonomic
|
|
4450
|
+
* namespaces do: returns the response body on success, throws a typed
|
|
4451
|
+
* `WefunderError` (with `request_id`) on failure. Lets `raw` callers keep the
|
|
4452
|
+
* SDK's error handling. (Stress-test finding C.)
|
|
4453
|
+
*/
|
|
4454
|
+
unwrap<T>(p: Result<T>): Promise<T>;
|
|
4455
|
+
users: {
|
|
4456
|
+
me: () => Promise<User>;
|
|
4457
|
+
};
|
|
4458
|
+
offerings: {
|
|
4459
|
+
list: (query?: {
|
|
4460
|
+
cursor?: Cursor;
|
|
4461
|
+
sort?: OfferingSort;
|
|
4462
|
+
} | undefined) => Promise<Page<Offering>>;
|
|
4463
|
+
all: (query?: {
|
|
4464
|
+
sort?: OfferingSort;
|
|
4465
|
+
}) => AsyncGenerator<Offering>;
|
|
4466
|
+
collect: (query?: {
|
|
4467
|
+
sort?: OfferingSort;
|
|
4468
|
+
}) => Promise<Offering[]>;
|
|
4469
|
+
get: (externalId: string) => Promise<Offering>;
|
|
4470
|
+
};
|
|
4471
|
+
investments: {
|
|
4472
|
+
list: (query?: {
|
|
4473
|
+
cursor?: Cursor;
|
|
4474
|
+
} | undefined) => Promise<Page<Investment>>;
|
|
4475
|
+
all: () => AsyncGenerator<Investment>;
|
|
4476
|
+
collect: () => Promise<Investment[]>;
|
|
4477
|
+
};
|
|
4478
|
+
campaigns: {
|
|
4479
|
+
list: (query?: {
|
|
4480
|
+
cursor?: Cursor;
|
|
4481
|
+
} | undefined) => Promise<Page<Campaign>>;
|
|
4482
|
+
all: () => AsyncGenerator<Campaign>;
|
|
4483
|
+
collect: () => Promise<Campaign[]>;
|
|
4484
|
+
};
|
|
4485
|
+
syndicates: {
|
|
4486
|
+
list: (query?: {
|
|
4487
|
+
cursor?: Cursor;
|
|
4488
|
+
} | undefined) => Promise<Page<Syndicate>>;
|
|
4489
|
+
all: () => AsyncGenerator<Syndicate>;
|
|
4490
|
+
get: (id: number | string) => Promise<Syndicate>;
|
|
4491
|
+
};
|
|
4492
|
+
intents: {
|
|
4493
|
+
list: (query?: {
|
|
4494
|
+
cursor?: Cursor;
|
|
4495
|
+
} | undefined) => Promise<Page<Intent>>;
|
|
4496
|
+
all: () => AsyncGenerator<Intent>;
|
|
4497
|
+
get: (id: number | string) => Promise<Intent>;
|
|
4498
|
+
};
|
|
4499
|
+
attribution: {
|
|
4500
|
+
me: () => Promise<AttributionMe>;
|
|
4501
|
+
};
|
|
4502
|
+
}
|
|
4503
|
+
|
|
4504
|
+
/** Response header carrying the partner-facing request id (Stripe-style `req_…`). */
|
|
4505
|
+
declare const REQUEST_ID_HEADER = "x-wf-request-id";
|
|
4506
|
+
declare class WefunderError extends Error {
|
|
4507
|
+
readonly status: number;
|
|
4508
|
+
readonly type: string;
|
|
4509
|
+
readonly requestId?: string;
|
|
4510
|
+
readonly details?: unknown;
|
|
4511
|
+
/** Server-provided hint on how to resolve the error, when present. */
|
|
4512
|
+
readonly remediation?: string;
|
|
4513
|
+
/** Documentation pointer surfaced to developers in stack traces / logs. */
|
|
4514
|
+
readonly documentationUrl = "https://docs.wefunder.com/api-reference";
|
|
4515
|
+
constructor(args: {
|
|
4516
|
+
status: number;
|
|
4517
|
+
type: string;
|
|
4518
|
+
message: string;
|
|
4519
|
+
requestId?: string;
|
|
4520
|
+
details?: unknown;
|
|
4521
|
+
remediation?: string;
|
|
4522
|
+
});
|
|
4523
|
+
}
|
|
4524
|
+
/** Raised when token refresh is needed but no refresh token / refresher is configured. */
|
|
4525
|
+
declare class WefunderAuthError extends WefunderError {
|
|
4526
|
+
constructor(message: string);
|
|
4527
|
+
}
|
|
4528
|
+
|
|
4529
|
+
declare const SIGNATURE_HEADER = "x-wefunder-signature";
|
|
4530
|
+
declare const TIMESTAMP_HEADER = "x-wefunder-timestamp";
|
|
4531
|
+
declare const EVENT_HEADER = "x-wefunder-event";
|
|
4532
|
+
declare const DELIVERY_ID_HEADER = "x-wefunder-delivery-id";
|
|
4533
|
+
interface VerifyWebhookOptions {
|
|
4534
|
+
/** The exact raw request body bytes/string (NOT a re-serialized object). */
|
|
4535
|
+
payload: string;
|
|
4536
|
+
/** Value of the X-Wefunder-Signature header (`sha256=<hex>`). */
|
|
4537
|
+
signature: string;
|
|
4538
|
+
/** Value of the X-Wefunder-Timestamp header (unix seconds). */
|
|
4539
|
+
timestamp: string | number;
|
|
4540
|
+
secret: string;
|
|
4541
|
+
/** Reject if |now - timestamp| exceeds this. Default 300s. Set 0 to disable. */
|
|
4542
|
+
toleranceSeconds?: number;
|
|
4543
|
+
now?: () => number;
|
|
4544
|
+
}
|
|
4545
|
+
/**
|
|
4546
|
+
* Returns true iff the signature is valid AND (when tolerance > 0) the timestamp
|
|
4547
|
+
* is within tolerance. Does not throw on a bad signature — returns false so the
|
|
4548
|
+
* caller can respond 400 without a try/catch.
|
|
4549
|
+
*/
|
|
4550
|
+
declare function verifyWebhook(opts: VerifyWebhookOptions): boolean;
|
|
4551
|
+
interface ParsedWebhook<T = unknown> {
|
|
4552
|
+
event: string;
|
|
4553
|
+
deliveryId: string;
|
|
4554
|
+
timestamp: number;
|
|
4555
|
+
data: T;
|
|
4556
|
+
}
|
|
4557
|
+
/**
|
|
4558
|
+
* Verify + parse in one step using a header lookup (works with Node's
|
|
4559
|
+
* IncomingHttpHeaders, a Headers instance, or a plain object). Returns the parsed
|
|
4560
|
+
* event on success; throws on an invalid signature so handlers fail loudly.
|
|
4561
|
+
*/
|
|
4562
|
+
declare function constructEvent<T = unknown>(payload: string, headers: Headers | Record<string, string | string[] | undefined>, secret: string, opts?: {
|
|
4563
|
+
toleranceSeconds?: number;
|
|
4564
|
+
now?: () => number;
|
|
4565
|
+
}): ParsedWebhook<T>;
|
|
4566
|
+
|
|
4567
|
+
export { type AnonymizedAttribution, type ApproveSyndicateMemberData, type ApproveSyndicateMemberError, type ApproveSyndicateMemberErrors, type ApproveSyndicateMemberResponse, type ApproveSyndicateMemberResponses, type AttributedInvestmentListEnvelope, type AttributionCampaignAccess, type AttributionCampaignSummary, type AttributionCampaignSummaryListEnvelope, type AttributionMe, type AttributionMeEnvelope, type AttributionPartner, type AttributionStats, type AttributionStatsEnvelope, type AttributionUser, type AuditEvent, type AuditEventListEnvelope, type AuthorizationUrlOptions, type Campaign, type CampaignId, type CampaignListEnvelope, type ClientCredentialsOptions, type ClientOptions, type CloseSyndicateDealData, type CloseSyndicateDealError, type CloseSyndicateDealErrors, type ConnectedApp, type ConnectedAppListEnvelope, type ConnectedAppRevocation, type ConnectedAppRevocationEnvelope, type CreateIntentData, type CreateIntentError, type CreateIntentErrors, type CreateIntentResponse, type CreateIntentResponses, type CreatePartnerInviteData, type CreatePartnerInviteError, type CreatePartnerInviteErrors, type CreatePartnerInviteResponse, type CreatePartnerInviteResponses, type CreateWebhookSubscriptionData, type CreateWebhookSubscriptionError, type CreateWebhookSubscriptionErrors, type CreateWebhookSubscriptionResponse, type CreateWebhookSubscriptionResponses, type Cursor, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_AUTHORIZE_BASE_URL, DEFAULT_OAUTH_BASE_URL, DEFAULT_TOKEN_BASE_URL, DELIVERY_ID_HEADER, type DealInvestor, type DealInvestorListEnvelope, type DeleteWebhookSubscriptionData, type DeleteWebhookSubscriptionError, type DeleteWebhookSubscriptionErrors, type DeleteWebhookSubscriptionResponse, type DeleteWebhookSubscriptionResponses, type DemoteSyndicateMemberData, type DemoteSyndicateMemberError, type DemoteSyndicateMemberErrors, type DemoteSyndicateMemberResponse, type DemoteSyndicateMemberResponses, EVENT_HEADER, type EndDate, type ExchangeCodeOptions, type Exemption, type ExportSyndicateMembersCsvData, type ExportSyndicateMembersCsvError, type ExportSyndicateMembersCsvErrors, type ExportSyndicateMembersCsvResponse, type ExportSyndicateMembersCsvResponses, type FinalizeSyndicateDealData, type FinalizeSyndicateDealError, type FinalizeSyndicateDealErrors, type FullAttribution, type FundraiseId, type GetAttributionMeData, type GetAttributionMeError, type GetAttributionMeErrors, type GetAttributionMeResponse, type GetAttributionMeResponses, type GetAttributionStatsData, type GetAttributionStatsError, type GetAttributionStatsErrors, type GetAttributionStatsResponse, type GetAttributionStatsResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetIntentData, type GetIntentError, type GetIntentErrors, type GetIntentResponse, type GetIntentResponses, type GetOfferingData, type GetOfferingError, type GetOfferingErrors, type GetOfferingResponse, type GetOfferingResponses, type GetSyndicateData, type GetSyndicateDealData, type GetSyndicateDealError, type GetSyndicateDealErrors, type GetSyndicateDealResponse, type GetSyndicateDealResponses, type GetSyndicateError, type GetSyndicateErrors, type GetSyndicateResponse, type GetSyndicateResponses, type GetSyndicateStatisticsData, type GetSyndicateStatisticsError, type GetSyndicateStatisticsErrors, type GetSyndicateStatisticsResponse, type GetSyndicateStatisticsResponses, type GetWebhookSubscriptionData, type GetWebhookSubscriptionError, type GetWebhookSubscriptionErrors, type GetWebhookSubscriptionResponse, type GetWebhookSubscriptionResponses, type HideSyndicateMemberData, type HideSyndicateMemberError, type HideSyndicateMemberErrors, type HideSyndicateMemberResponse, type HideSyndicateMemberResponses, type IdempotencyKey, type Intent, type IntentEnvelope, type IntentListEnvelope, type Investment, type InvestmentLink, type InvestmentLinkCreateInput, type InvestmentLinkEnvelope, type InvestmentListEnvelope, type InvestmentSession, type InvestmentSessionCreateInput, type InvestmentSessionEnvelope, type InvestmentSessionId, type Investor, type InvestorEnvelope, type InvestorListEnvelope, type Invite, type InviteCreateInput, type InviteEnvelope, type InviteId, type InviteListEnvelope, type InviteSyndicateMemberData, type InviteSyndicateMemberError, type InviteSyndicateMemberErrors, type InviteSyndicateMemberResponse, type InviteSyndicateMemberResponses, type ListActivityData, type ListActivityError, type ListActivityErrors, type ListActivityResponse, type ListActivityResponses, type ListAttributedInvestmentsData, type ListAttributedInvestmentsError, type ListAttributedInvestmentsErrors, type ListAttributedInvestmentsResponse, type ListAttributedInvestmentsResponses, type ListAttributionCampaignsData, type ListAttributionCampaignsError, type ListAttributionCampaignsErrors, type ListAttributionCampaignsResponse, type ListAttributionCampaignsResponses, type ListCampaignsData, type ListCampaignsError, type ListCampaignsErrors, type ListCampaignsResponse, type ListCampaignsResponses, type ListConnectedAppsData, type ListConnectedAppsError, type ListConnectedAppsErrors, type ListConnectedAppsResponse, type ListConnectedAppsResponses, type ListIntentsData, type ListIntentsError, type ListIntentsErrors, type ListIntentsResponse, type ListIntentsResponses, type ListInvestmentsData, type ListInvestmentsError, type ListInvestmentsErrors, type ListInvestmentsResponse, type ListInvestmentsResponses, type ListOfferingsData, type ListOfferingsError, type ListOfferingsErrors, type ListOfferingsResponse, type ListOfferingsResponses, type ListPartnerInvitesData, type ListPartnerInvitesError, type ListPartnerInvitesErrors, type ListPartnerInvitesResponse, type ListPartnerInvitesResponses, type ListSyndicateDealInvestorsData, type ListSyndicateDealInvestorsError, type ListSyndicateDealInvestorsErrors, type ListSyndicateDealInvestorsResponse, type ListSyndicateDealInvestorsResponses, type ListSyndicateDealsData, type ListSyndicateDealsError, type ListSyndicateDealsErrors, type ListSyndicateDealsResponse, type ListSyndicateDealsResponses, type ListSyndicateMemberInvestmentsData, type ListSyndicateMemberInvestmentsError, type ListSyndicateMemberInvestmentsErrors, type ListSyndicateMemberInvestmentsResponse, type ListSyndicateMemberInvestmentsResponses, type ListSyndicateMembersData, type ListSyndicateMembersError, type ListSyndicateMembersErrors, type ListSyndicateMembersResponse, type ListSyndicateMembersResponses, type ListSyndicatesData, type ListSyndicatesError, type ListSyndicatesErrors, type ListSyndicatesResponse, type ListSyndicatesResponses, type ListWebhookSubscriptionsData, type ListWebhookSubscriptionsError, type ListWebhookSubscriptionsErrors, type ListWebhookSubscriptionsResponse, type ListWebhookSubscriptionsResponses, type MarketingPartner, type MarketingPartnerEnvelope, type MemberId, type MemberInvestment, type MemberInvestmentListEnvelope, type Mode, type OAuthHostOptions, type Offering, type OfferingEnvelope, type OfferingListEnvelope, type OfferingSort, type Page, type PageFetcher, type PaginationMeta, type ParsedWebhook, type PartnerInvestment, type PartnerInvestmentEnvelope, type PartnerInvestmentId, type PartnerInvestmentListEnvelope, type PartnerInvite, type PartnerInviteEnvelope, type PartnerInviteListEnvelope, type PartnerWebhookEvent, type PartnerWebhookEventEnvelope, type PartnerWebhookSubscription, type PartnerWebhookSubscriptionCreateInput, type PartnerWebhookSubscriptionEnvelope, type PartnerWebhookSubscriptionListEnvelope, type PartnerWebhookSubscriptionWithSecret, type PartnerWebhookSubscriptionWithSecretEnvelope, type Pkce, type PromoteSyndicateMemberData, type PromoteSyndicateMemberError, type PromoteSyndicateMemberErrors, type PromoteSyndicateMemberResponse, type PromoteSyndicateMemberResponses, REQUEST_ID_HEADER, type ReactivateWebhookSubscriptionData, type ReactivateWebhookSubscriptionError, type ReactivateWebhookSubscriptionErrors, type ReactivateWebhookSubscriptionResponse, type ReactivateWebhookSubscriptionResponses, type RefreshOptions, type RegenerateWebhookSecretData, type RegenerateWebhookSecretError, type RegenerateWebhookSecretErrors, type RegenerateWebhookSecretResponse, type RegenerateWebhookSecretResponses, type RegisterAsPartnerData, type RegisterAsPartnerError, type RegisterAsPartnerErrors, type RegisterAsPartnerResponse, type RegisterAsPartnerResponses, type RemoveSyndicateMemberData, type RemoveSyndicateMemberError, type RemoveSyndicateMemberErrors, type ReorderSyndicateMembersData, type ReorderSyndicateMembersError, type ReorderSyndicateMembersErrors, type ReorderSyndicateMembersResponses, type ResendSyndicateInviteData, type ResendSyndicateInviteError, type ResendSyndicateInviteErrors, type ResendSyndicateInviteResponses, type RestoreSyndicateMemberData, type RestoreSyndicateMemberError, type RestoreSyndicateMemberErrors, type RestoreSyndicateMemberResponse, type RestoreSyndicateMemberResponses, type RevokeConnectedAppData, type RevokeConnectedAppError, type RevokeConnectedAppErrors, type RevokeConnectedAppResponse, type RevokeConnectedAppResponses, type RevokePartnerInviteData, type RevokePartnerInviteError, type RevokePartnerInviteErrors, type RevokePartnerInviteResponse, type RevokePartnerInviteResponses, SIGNATURE_HEADER, type Spv, type SpvCloseStatus, type SpvCloseStatusEnvelope, type SpvCreateInput, type SpvEnvelope, type SpvId, type SpvListEnvelope, type SpvMetrics, type SpvSettings, type SpvTerms, type SpvWithMetaEnvelope, type StartDate, type Syndicate, type SyndicateDeal, type SyndicateDealDetail, type SyndicateDealDetailEnvelope, type SyndicateDealEnvelope, type SyndicateDealListEnvelope, type SyndicateDetail, type SyndicateDetailEnvelope, type SyndicateId, type SyndicateListEnvelope, type SyndicateMember, type SyndicateMemberEnvelope, type SyndicateMemberListEnvelope, type SyndicatePortfolio, type SyndicateStatistics, type SyndicateStatisticsEnvelope, TIMESTAMP_HEADER, type TargetCompanyInput, type TestWebhookSubscriptionData, type TestWebhookSubscriptionError, type TestWebhookSubscriptionErrors, type TestWebhookSubscriptionResponse, type TestWebhookSubscriptionResponses, type TokenManagerOptions, type TokenSet, type TokenStore, type UpdateSyndicateData, type UpdateSyndicateError, type UpdateSyndicateErrors, type UpdateSyndicateMemberData, type UpdateSyndicateMemberError, type UpdateSyndicateMemberErrors, type UpdateSyndicateMemberResponse, type UpdateSyndicateMemberResponses, type UpdateSyndicateResponse, type UpdateSyndicateResponses, type User, type UserEnvelope, type UtmCampaign, type UtmSource, type ValidationError, type VerifyWebhookOptions, type WebhookDelivery, type WebhookId, type WebhookSubscription, type WebhookSubscriptionEnvelope, type WebhookSubscriptionId, type WebhookSubscriptionListEnvelope, type WebhookSubscriptionWithRecentDeliveriesEnvelope, type WebhookSubscriptionWithSecret2Envelope, type WebhookSubscriptionWithSecretEnvelope, type WebhookTestResult, type WebhookTestResultEnvelope, Wefunder, WefunderAuthError, WefunderError, type WefunderOptions, type _Error, clientCredentialsGrant, collect, constructEvent, createAuthorizationUrl, exchangeCode, generatePkce, modeForToken, paginate, refreshToken, verifyWebhook };
|