glitch-javascript-sdk 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +467 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +197 -0
- package/dist/esm/api/GameShows.d.ts +121 -0
- package/dist/esm/api/Influencers.d.ts +8 -0
- package/dist/esm/api/Publications.d.ts +1 -1
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +467 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/GameShowsRoute.d.ts +7 -0
- package/dist/index.d.ts +325 -0
- package/package.json +1 -1
- package/src/api/Communities.ts +359 -74
- package/src/api/GameShows.ts +187 -0
- package/src/api/Influencers.ts +11 -0
- package/src/api/Publications.ts +1 -1
- package/src/api/index.ts +3 -1
- package/src/index.ts +2 -0
- package/src/routes/CommunitiesRoute.ts +69 -39
- package/src/routes/GameShowsRoute.ts +24 -0
- package/src/routes/InfluencerRoutes.ts +1 -0
|
@@ -348,5 +348,202 @@ declare class Communities {
|
|
|
348
348
|
* @returns Promise
|
|
349
349
|
*/
|
|
350
350
|
static populateEmailTemplate<T>(community_id: string, template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
351
|
+
/**
|
|
352
|
+
* List all newsletters for a community.
|
|
353
|
+
*
|
|
354
|
+
* @param community_id The ID of the community.
|
|
355
|
+
* @param params Query parameters.
|
|
356
|
+
* @returns Promise
|
|
357
|
+
*/
|
|
358
|
+
static listNewsletters<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
359
|
+
/**
|
|
360
|
+
* Create a new newsletter for a community.
|
|
361
|
+
*
|
|
362
|
+
* @param community_id The ID of the community.
|
|
363
|
+
* @param data The data for the new newsletter.
|
|
364
|
+
* @returns Promise
|
|
365
|
+
*/
|
|
366
|
+
static createNewsletter<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
367
|
+
/**
|
|
368
|
+
* Get a specific newsletter.
|
|
369
|
+
*
|
|
370
|
+
* @param community_id The ID of the community.
|
|
371
|
+
* @param newsletter_id The ID of the newsletter.
|
|
372
|
+
* @param params Query parameters.
|
|
373
|
+
* @returns Promise
|
|
374
|
+
*/
|
|
375
|
+
static viewNewsletter<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
376
|
+
/**
|
|
377
|
+
* Update a specific newsletter.
|
|
378
|
+
*
|
|
379
|
+
* @param community_id The ID of the community.
|
|
380
|
+
* @param newsletter_id The ID of the newsletter.
|
|
381
|
+
* @param data The data to update.
|
|
382
|
+
* @returns Promise
|
|
383
|
+
*/
|
|
384
|
+
static updateNewsletter<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
385
|
+
/**
|
|
386
|
+
* Delete a specific newsletter.
|
|
387
|
+
*
|
|
388
|
+
* @param community_id The ID of the community.
|
|
389
|
+
* @param newsletter_id The ID of the newsletter.
|
|
390
|
+
* @returns Promise
|
|
391
|
+
*/
|
|
392
|
+
static deleteNewsletter<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
393
|
+
/**
|
|
394
|
+
* Import subscribers from a CSV or XLS file into a newsletter.
|
|
395
|
+
*
|
|
396
|
+
* @param community_id The ID of the community.
|
|
397
|
+
* @param newsletter_id The ID of the newsletter.
|
|
398
|
+
* @param file The CSV or XLS file.
|
|
399
|
+
* @param params Additional parameters.
|
|
400
|
+
* @returns Promise
|
|
401
|
+
*/
|
|
402
|
+
static importNewsletterSubscribers<T>(community_id: string, newsletter_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
403
|
+
/**
|
|
404
|
+
* Updates the banner image for the game show using a File object.
|
|
405
|
+
*
|
|
406
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
407
|
+
*
|
|
408
|
+
* @param file The file object to upload.
|
|
409
|
+
* @param data Any additional data to pass along to the upload.
|
|
410
|
+
*
|
|
411
|
+
* @returns promise
|
|
412
|
+
*/
|
|
413
|
+
static uploadNewsletterBannerImageFile<T>(community_id: string, newsletter_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
414
|
+
/**
|
|
415
|
+
* Updates the banner image for the game show using a Blob.
|
|
416
|
+
*
|
|
417
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
418
|
+
*
|
|
419
|
+
* @param blob The blob to upload.
|
|
420
|
+
* @param data Any additional data to pass along to the upload
|
|
421
|
+
*
|
|
422
|
+
* @returns promise
|
|
423
|
+
*/
|
|
424
|
+
static uploadNewsletterBannerImageBlob<T>(community_id: string, newsletter_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
425
|
+
/**
|
|
426
|
+
* List all campaigns for a newsletter.
|
|
427
|
+
*
|
|
428
|
+
* @param community_id The ID of the community.
|
|
429
|
+
* @param newsletter_id The ID of the newsletter.
|
|
430
|
+
* @param params Query parameters.
|
|
431
|
+
* @returns Promise
|
|
432
|
+
*/
|
|
433
|
+
static listCampaigns<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
434
|
+
/**
|
|
435
|
+
* Create a new campaign for a newsletter.
|
|
436
|
+
*
|
|
437
|
+
* @param community_id The ID of the community.
|
|
438
|
+
* @param newsletter_id The ID of the newsletter.
|
|
439
|
+
* @param data The data for the new campaign.
|
|
440
|
+
* @returns Promise
|
|
441
|
+
*/
|
|
442
|
+
static createCampaign<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
443
|
+
/**
|
|
444
|
+
* Get a specific campaign.
|
|
445
|
+
*
|
|
446
|
+
* @param community_id The ID of the community.
|
|
447
|
+
* @param newsletter_id The ID of the newsletter.
|
|
448
|
+
* @param campaign_id The ID of the campaign.
|
|
449
|
+
* @param params Query parameters.
|
|
450
|
+
* @returns Promise
|
|
451
|
+
*/
|
|
452
|
+
static viewCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
453
|
+
/**
|
|
454
|
+
* Update a specific campaign.
|
|
455
|
+
*
|
|
456
|
+
* @param community_id The ID of the community.
|
|
457
|
+
* @param newsletter_id The ID of the newsletter.
|
|
458
|
+
* @param campaign_id The ID of the campaign.
|
|
459
|
+
* @param data The data to update.
|
|
460
|
+
* @returns Promise
|
|
461
|
+
*/
|
|
462
|
+
static updateCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
463
|
+
/**
|
|
464
|
+
* Delete a specific campaign.
|
|
465
|
+
*
|
|
466
|
+
* @param community_id The ID of the community.
|
|
467
|
+
* @param newsletter_id The ID of the newsletter.
|
|
468
|
+
* @param campaign_id The ID of the campaign.
|
|
469
|
+
* @returns Promise
|
|
470
|
+
*/
|
|
471
|
+
static deleteCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
472
|
+
/**
|
|
473
|
+
* Send a campaign immediately.
|
|
474
|
+
*
|
|
475
|
+
* @param community_id The ID of the community.
|
|
476
|
+
* @param newsletter_id The ID of the newsletter.
|
|
477
|
+
* @param campaign_id The ID of the campaign.
|
|
478
|
+
* @returns Promise
|
|
479
|
+
*/
|
|
480
|
+
static sendCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
481
|
+
/**
|
|
482
|
+
* Schedule a campaign to be sent later.
|
|
483
|
+
*
|
|
484
|
+
* @param community_id The ID of the community.
|
|
485
|
+
* @param newsletter_id The ID of the newsletter.
|
|
486
|
+
* @param campaign_id The ID of the campaign.
|
|
487
|
+
* @param data The scheduling data (e.g., scheduled_at).
|
|
488
|
+
* @returns Promise
|
|
489
|
+
*/
|
|
490
|
+
static scheduleCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
491
|
+
/**
|
|
492
|
+
* List all emails sent in a campaign.
|
|
493
|
+
*
|
|
494
|
+
* @param community_id The ID of the community.
|
|
495
|
+
* @param newsletter_id The ID of the newsletter.
|
|
496
|
+
* @param campaign_id The ID of the campaign.
|
|
497
|
+
* @param params Query parameters.
|
|
498
|
+
* @returns Promise
|
|
499
|
+
*/
|
|
500
|
+
static listCampaignEmails<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
501
|
+
/**
|
|
502
|
+
* List all subscribers of a newsletter (admin only).
|
|
503
|
+
*
|
|
504
|
+
* @param community_id The ID of the community.
|
|
505
|
+
* @param newsletter_id The ID of the newsletter.
|
|
506
|
+
* @param params Query parameters.
|
|
507
|
+
* @returns Promise
|
|
508
|
+
*/
|
|
509
|
+
static listNewsletterSubscribers<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
510
|
+
/**
|
|
511
|
+
* Get a specific subscriber of a newsletter (admin only).
|
|
512
|
+
*
|
|
513
|
+
* @param community_id The ID of the community.
|
|
514
|
+
* @param newsletter_id The ID of the newsletter.
|
|
515
|
+
* @param subscriber_id The ID of the subscriber.
|
|
516
|
+
* @param params Query parameters.
|
|
517
|
+
* @returns Promise
|
|
518
|
+
*/
|
|
519
|
+
static viewNewsletterSubscriber<T>(community_id: string, newsletter_id: string, subscriber_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
520
|
+
/**
|
|
521
|
+
* Update a specific subscriber of a newsletter (admin only).
|
|
522
|
+
*
|
|
523
|
+
* @param community_id The ID of the community.
|
|
524
|
+
* @param newsletter_id The ID of the newsletter.
|
|
525
|
+
* @param subscriber_id The ID of the subscriber.
|
|
526
|
+
* @param data The data to update.
|
|
527
|
+
* @returns Promise
|
|
528
|
+
*/
|
|
529
|
+
static updateNewsletterSubscriber<T>(community_id: string, newsletter_id: string, subscriber_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
530
|
+
/**
|
|
531
|
+
* Delete a specific subscriber from a newsletter (admin only).
|
|
532
|
+
*
|
|
533
|
+
* @param community_id The ID of the community.
|
|
534
|
+
* @param newsletter_id The ID of the newsletter.
|
|
535
|
+
* @param subscriber_id The ID of the subscriber.
|
|
536
|
+
* @returns Promise
|
|
537
|
+
*/
|
|
538
|
+
static deleteNewsletterSubscriber<T>(community_id: string, newsletter_id: string, subscriber_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
539
|
+
/**
|
|
540
|
+
* Register a new subscriber to a newsletter.
|
|
541
|
+
*
|
|
542
|
+
* @param community_id The ID of the community.
|
|
543
|
+
* @param newsletter_id The ID of the newsletter.
|
|
544
|
+
* @param data The subscriber data.
|
|
545
|
+
* @returns Promise
|
|
546
|
+
*/
|
|
547
|
+
static registerNewsletterSubscriber<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
351
548
|
}
|
|
352
549
|
export default Communities;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class GameShows {
|
|
4
|
+
/**
|
|
5
|
+
* List all the GameShows.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new game show.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
|
|
16
|
+
*
|
|
17
|
+
* @param data The data to be passed when creating a game show.
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a game show.
|
|
24
|
+
*
|
|
25
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
|
|
26
|
+
*
|
|
27
|
+
* @param show_id The id of the game show to update.
|
|
28
|
+
* @param data The data to update.
|
|
29
|
+
*
|
|
30
|
+
* @returns promise
|
|
31
|
+
*/
|
|
32
|
+
static update<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve the information for a single game show.
|
|
35
|
+
*
|
|
36
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
|
|
37
|
+
*
|
|
38
|
+
* @param show_id The id fo the game show to retrieve.
|
|
39
|
+
*
|
|
40
|
+
* @returns promise
|
|
41
|
+
*/
|
|
42
|
+
static view<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a game show.
|
|
45
|
+
*
|
|
46
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
|
|
47
|
+
*
|
|
48
|
+
* @param show_id The id of the game show to delete.
|
|
49
|
+
* @returns promise
|
|
50
|
+
*/
|
|
51
|
+
static delete<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Updates the main image for the game show using a File object.
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
56
|
+
*
|
|
57
|
+
* @param file The file object to upload.
|
|
58
|
+
* @param data Any additional data to pass along to the upload.
|
|
59
|
+
*
|
|
60
|
+
* @returns promise
|
|
61
|
+
*/
|
|
62
|
+
static uploadLogoFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
63
|
+
/**
|
|
64
|
+
* Updates the main image for the game show using a Blob.
|
|
65
|
+
*
|
|
66
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
67
|
+
*
|
|
68
|
+
* @param blob The blob to upload.
|
|
69
|
+
* @param data Any additional data to pass along to the upload
|
|
70
|
+
*
|
|
71
|
+
* @returns promise
|
|
72
|
+
*/
|
|
73
|
+
static uploadLogoBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
74
|
+
/**
|
|
75
|
+
* Updates the banner image for the game show using a File object.
|
|
76
|
+
*
|
|
77
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
78
|
+
*
|
|
79
|
+
* @param file The file object to upload.
|
|
80
|
+
* @param data Any additional data to pass along to the upload.
|
|
81
|
+
*
|
|
82
|
+
* @returns promise
|
|
83
|
+
*/
|
|
84
|
+
static uploadBannerImageFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
85
|
+
/**
|
|
86
|
+
* Updates the banner image for the game show using a Blob.
|
|
87
|
+
*
|
|
88
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
89
|
+
*
|
|
90
|
+
* @param blob The blob to upload.
|
|
91
|
+
* @param data Any additional data to pass along to the upload
|
|
92
|
+
*
|
|
93
|
+
* @returns promise
|
|
94
|
+
*/
|
|
95
|
+
static uploadBannerImageBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
96
|
+
/**
|
|
97
|
+
* Register a title to a game show.
|
|
98
|
+
*/
|
|
99
|
+
static registerTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
100
|
+
/**
|
|
101
|
+
* Add a title to a game show by admin.
|
|
102
|
+
*/
|
|
103
|
+
static addTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
104
|
+
/**
|
|
105
|
+
* List all titles for a game show.
|
|
106
|
+
*/
|
|
107
|
+
static listTitles<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
108
|
+
/**
|
|
109
|
+
* Get details of a specific title in a game show.
|
|
110
|
+
*/
|
|
111
|
+
static getTitle<T>(show_id: string, title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
112
|
+
/**
|
|
113
|
+
* Update a specific title in a game show.
|
|
114
|
+
*/
|
|
115
|
+
static updateTitle<T>(show_id: string, title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
116
|
+
/**
|
|
117
|
+
* Delete a specific title from a game show.
|
|
118
|
+
*/
|
|
119
|
+
static deleteTitle<T>(show_id: string, title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
120
|
+
}
|
|
121
|
+
export default GameShows;
|
|
@@ -81,5 +81,13 @@ declare class Influencers {
|
|
|
81
81
|
* @returns promise
|
|
82
82
|
*/
|
|
83
83
|
static listContracts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
84
|
+
/**
|
|
85
|
+
* Download the influencer work
|
|
86
|
+
*
|
|
87
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
|
|
88
|
+
*
|
|
89
|
+
* @returns promise
|
|
90
|
+
*/
|
|
91
|
+
static workbook<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
84
92
|
}
|
|
85
93
|
export default Influencers;
|
|
@@ -18,6 +18,6 @@ declare class Publications {
|
|
|
18
18
|
*
|
|
19
19
|
* @returns Promise
|
|
20
20
|
*/
|
|
21
|
-
static
|
|
21
|
+
static download<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
22
|
}
|
|
23
23
|
export default Publications;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import Feedback from "./Feedback";
|
|
|
22
22
|
import Influencers from "./Influencers";
|
|
23
23
|
import Games from "./Games";
|
|
24
24
|
import Publications from "./Publications";
|
|
25
|
+
import GameShows from "./GameShows";
|
|
25
26
|
export { Auth };
|
|
26
27
|
export { Competitions };
|
|
27
28
|
export { Communities };
|
|
@@ -46,3 +47,4 @@ export { Feedback };
|
|
|
46
47
|
export { Influencers };
|
|
47
48
|
export { Games };
|
|
48
49
|
export { Publications };
|
|
50
|
+
export { GameShows };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { Feedback } from "./api";
|
|
|
22
22
|
import { Influencers } from "./api";
|
|
23
23
|
import { Games } from "./api";
|
|
24
24
|
import { Publications } from "./api";
|
|
25
|
+
import { GameShows } from "./api";
|
|
25
26
|
import Requests from "./util/Requests";
|
|
26
27
|
import Parser from "./util/Parser";
|
|
27
28
|
import Session from "./util/Session";
|
|
@@ -48,6 +49,7 @@ declare class Glitch {
|
|
|
48
49
|
Users: typeof Users;
|
|
49
50
|
Events: typeof Events;
|
|
50
51
|
Games: typeof Games;
|
|
52
|
+
GameShows: typeof GameShows;
|
|
51
53
|
Feedback: typeof Feedback;
|
|
52
54
|
Influencers: typeof Influencers;
|
|
53
55
|
Teams: typeof Teams;
|