@cjavdev/believe 0.6.2 → 0.8.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/CHANGELOG.md +31 -0
- package/README.md +18 -1
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +5 -0
- package/client.js.map +1 -1
- package/client.mjs +5 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/characters.d.mts +1 -1
- package/resources/characters.d.ts +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/matches/matches.d.mts +2 -2
- package/resources/matches/matches.d.ts +2 -2
- package/resources/quotes.d.mts +3 -3
- package/resources/quotes.d.ts +3 -3
- package/resources/team-members.d.mts +3 -3
- package/resources/team-members.d.ts +3 -3
- package/resources/teams/teams.d.mts +1 -1
- package/resources/teams/teams.d.ts +1 -1
- package/resources/webhooks.d.mts +155 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +155 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -0
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +21 -1
- package/src/resources/characters.ts +1 -1
- package/src/resources/index.ts +3 -0
- package/src/resources/matches/matches.ts +2 -2
- package/src/resources/quotes.ts +3 -3
- package/src/resources/team-members.ts +3 -3
- package/src/resources/teams/teams.ts +1 -1
- package/src/resources/webhooks.ts +192 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/index.ts
CHANGED
|
@@ -112,6 +112,9 @@ export {
|
|
|
112
112
|
type WebhookListResponse,
|
|
113
113
|
type WebhookDeleteResponse,
|
|
114
114
|
type WebhookTriggerEventResponse,
|
|
115
|
+
type MatchCompletedWebhookEvent,
|
|
116
|
+
type TeamMemberTransferredWebhookEvent,
|
|
117
|
+
type UnwrapWebhookEvent,
|
|
115
118
|
type WebhookCreateParams,
|
|
116
119
|
type WebhookTriggerEventParams,
|
|
117
120
|
} from './webhooks';
|
|
@@ -409,12 +409,12 @@ export interface MatchUpdateParams {
|
|
|
409
409
|
|
|
410
410
|
export interface MatchListParams extends SkipLimitPageParams {
|
|
411
411
|
/**
|
|
412
|
-
*
|
|
412
|
+
* Filter by match type
|
|
413
413
|
*/
|
|
414
414
|
match_type?: MatchType | null;
|
|
415
415
|
|
|
416
416
|
/**
|
|
417
|
-
*
|
|
417
|
+
* Filter by result
|
|
418
418
|
*/
|
|
419
419
|
result?: MatchResult | null;
|
|
420
420
|
|
package/src/resources/quotes.ts
CHANGED
|
@@ -392,12 +392,12 @@ export interface QuoteListParams extends SkipLimitPageParams {
|
|
|
392
392
|
inspirational?: boolean | null;
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
|
-
*
|
|
395
|
+
* Filter by moment type
|
|
396
396
|
*/
|
|
397
397
|
moment_type?: QuoteMoment | null;
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
|
-
*
|
|
400
|
+
* Filter by theme
|
|
401
401
|
*/
|
|
402
402
|
theme?: QuoteTheme | null;
|
|
403
403
|
}
|
|
@@ -414,7 +414,7 @@ export interface QuoteGetRandomParams {
|
|
|
414
414
|
inspirational?: boolean | null;
|
|
415
415
|
|
|
416
416
|
/**
|
|
417
|
-
*
|
|
417
|
+
* Filter by theme
|
|
418
418
|
*/
|
|
419
419
|
theme?: QuoteTheme | null;
|
|
420
420
|
}
|
|
@@ -649,7 +649,7 @@ export namespace TeamMemberUpdateParams {
|
|
|
649
649
|
|
|
650
650
|
export interface TeamMemberListParams extends SkipLimitPageParams {
|
|
651
651
|
/**
|
|
652
|
-
*
|
|
652
|
+
* Filter by member type
|
|
653
653
|
*/
|
|
654
654
|
member_type?: 'player' | 'coach' | 'medical_staff' | 'equipment_manager' | null;
|
|
655
655
|
|
|
@@ -661,7 +661,7 @@ export interface TeamMemberListParams extends SkipLimitPageParams {
|
|
|
661
661
|
|
|
662
662
|
export interface TeamMemberListCoachesParams extends SkipLimitPageParams {
|
|
663
663
|
/**
|
|
664
|
-
*
|
|
664
|
+
* Filter by specialty
|
|
665
665
|
*/
|
|
666
666
|
specialty?: CoachSpecialty | null;
|
|
667
667
|
|
|
@@ -673,7 +673,7 @@ export interface TeamMemberListCoachesParams extends SkipLimitPageParams {
|
|
|
673
673
|
|
|
674
674
|
export interface TeamMemberListPlayersParams extends SkipLimitPageParams {
|
|
675
675
|
/**
|
|
676
|
-
*
|
|
676
|
+
* Filter by position
|
|
677
677
|
*/
|
|
678
678
|
position?: Position | null;
|
|
679
679
|
|
|
@@ -91,6 +91,10 @@ export class Webhooks extends APIResource {
|
|
|
91
91
|
): APIPromise<WebhookTriggerEventResponse> {
|
|
92
92
|
return this._client.post('/webhooks/trigger', { body, ...options });
|
|
93
93
|
}
|
|
94
|
+
|
|
95
|
+
unwrap(body: string): UnwrapWebhookEvent {
|
|
96
|
+
return JSON.parse(body) as UnwrapWebhookEvent;
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
/**
|
|
@@ -219,6 +223,191 @@ export namespace WebhookTriggerEventResponse {
|
|
|
219
223
|
}
|
|
220
224
|
}
|
|
221
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Webhook event sent when a match completes.
|
|
228
|
+
*/
|
|
229
|
+
export interface MatchCompletedWebhookEvent {
|
|
230
|
+
/**
|
|
231
|
+
* When the event was created
|
|
232
|
+
*/
|
|
233
|
+
created_at: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Data payload for a match completed event.
|
|
237
|
+
*/
|
|
238
|
+
data: MatchCompletedWebhookEvent.Data;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Unique identifier for this event
|
|
242
|
+
*/
|
|
243
|
+
event_id: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* The type of webhook event
|
|
247
|
+
*/
|
|
248
|
+
event_type: 'match.completed';
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export namespace MatchCompletedWebhookEvent {
|
|
252
|
+
/**
|
|
253
|
+
* Data payload for a match completed event.
|
|
254
|
+
*/
|
|
255
|
+
export interface Data {
|
|
256
|
+
/**
|
|
257
|
+
* Final away team score
|
|
258
|
+
*/
|
|
259
|
+
away_score: number;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Away team ID
|
|
263
|
+
*/
|
|
264
|
+
away_team_id: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* When the match completed
|
|
268
|
+
*/
|
|
269
|
+
completed_at: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Final home team score
|
|
273
|
+
*/
|
|
274
|
+
home_score: number;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Home team ID
|
|
278
|
+
*/
|
|
279
|
+
home_team_id: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Unique match identifier
|
|
283
|
+
*/
|
|
284
|
+
match_id: string;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Type of match
|
|
288
|
+
*/
|
|
289
|
+
match_type: 'league' | 'cup' | 'friendly' | 'playoff' | 'final';
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Match result from home team perspective
|
|
293
|
+
*/
|
|
294
|
+
result: 'home_win' | 'away_win' | 'draw';
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Ted's post-match wisdom
|
|
298
|
+
*/
|
|
299
|
+
ted_post_match_quote: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Ted's lesson from the match
|
|
303
|
+
*/
|
|
304
|
+
lesson_learned?: string | null;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Player of the match (if awarded)
|
|
308
|
+
*/
|
|
309
|
+
man_of_the_match?: string | null;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Webhook event sent when a team member (player, coach, staff) transfers between
|
|
315
|
+
* teams.
|
|
316
|
+
*/
|
|
317
|
+
export interface TeamMemberTransferredWebhookEvent {
|
|
318
|
+
/**
|
|
319
|
+
* When the event was created
|
|
320
|
+
*/
|
|
321
|
+
created_at: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Data payload for a team member transfer event.
|
|
325
|
+
*/
|
|
326
|
+
data: TeamMemberTransferredWebhookEvent.Data;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Unique identifier for this event
|
|
330
|
+
*/
|
|
331
|
+
event_id: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The type of webhook event
|
|
335
|
+
*/
|
|
336
|
+
event_type: 'team_member.transferred';
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export namespace TeamMemberTransferredWebhookEvent {
|
|
340
|
+
/**
|
|
341
|
+
* Data payload for a team member transfer event.
|
|
342
|
+
*/
|
|
343
|
+
export interface Data {
|
|
344
|
+
/**
|
|
345
|
+
* ID of the character (links to /characters)
|
|
346
|
+
*/
|
|
347
|
+
character_id: string;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Name of the character
|
|
351
|
+
*/
|
|
352
|
+
character_name: string;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Type of team member
|
|
356
|
+
*/
|
|
357
|
+
member_type: 'player' | 'coach' | 'medical_staff' | 'equipment_manager';
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* ID of the team involved
|
|
361
|
+
*/
|
|
362
|
+
team_id: string;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* ID of the team member
|
|
366
|
+
*/
|
|
367
|
+
team_member_id: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Name of the team involved
|
|
371
|
+
*/
|
|
372
|
+
team_name: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Ted's reaction to the transfer
|
|
376
|
+
*/
|
|
377
|
+
ted_reaction: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Whether the member joined or departed
|
|
381
|
+
*/
|
|
382
|
+
transfer_type: 'joined' | 'departed';
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Previous team ID (for joins from another team)
|
|
386
|
+
*/
|
|
387
|
+
previous_team_id?: string | null;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Previous team name (for joins from another team)
|
|
391
|
+
*/
|
|
392
|
+
previous_team_name?: string | null;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Transfer fee in GBP (for players)
|
|
396
|
+
*/
|
|
397
|
+
transfer_fee_gbp?: string | null;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Years spent with previous team
|
|
401
|
+
*/
|
|
402
|
+
years_with_previous_team?: number | null;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Webhook event sent when a match completes.
|
|
408
|
+
*/
|
|
409
|
+
export type UnwrapWebhookEvent = MatchCompletedWebhookEvent | TeamMemberTransferredWebhookEvent;
|
|
410
|
+
|
|
222
411
|
export interface WebhookCreateParams {
|
|
223
412
|
/**
|
|
224
413
|
* The URL to send webhook events to
|
|
@@ -419,6 +608,9 @@ export declare namespace Webhooks {
|
|
|
419
608
|
type WebhookListResponse as WebhookListResponse,
|
|
420
609
|
type WebhookDeleteResponse as WebhookDeleteResponse,
|
|
421
610
|
type WebhookTriggerEventResponse as WebhookTriggerEventResponse,
|
|
611
|
+
type MatchCompletedWebhookEvent as MatchCompletedWebhookEvent,
|
|
612
|
+
type TeamMemberTransferredWebhookEvent as TeamMemberTransferredWebhookEvent,
|
|
613
|
+
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
422
614
|
type WebhookCreateParams as WebhookCreateParams,
|
|
423
615
|
type WebhookTriggerEventParams as WebhookTriggerEventParams,
|
|
424
616
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.8.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.8.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|