glitch-javascript-sdk 1.9.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +52 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +19 -0
- package/dist/esm/api/Communities.d.ts +24 -0
- package/dist/esm/index.js +52 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +43 -0
- package/package.json +1 -1
- package/src/api/Ads.ts +29 -0
- package/src/api/Communities.ts +33 -0
- package/src/routes/AdsRoute.ts +4 -0
- package/src/routes/CommunitiesRoute.ts +11 -6
package/dist/esm/api/Ads.d.ts
CHANGED
|
@@ -457,5 +457,24 @@ declare class Ads {
|
|
|
457
457
|
static pauseGoogleAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
458
458
|
/** POST /ads/posts/google/{post_id}/enable */
|
|
459
459
|
static enableGoogleAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
460
|
+
/**
|
|
461
|
+
* Creates a new Google Ads client account under a specified manager account.
|
|
462
|
+
* Corresponds to POST /ads/google/accounts/create
|
|
463
|
+
*
|
|
464
|
+
* @param data The creation payload.
|
|
465
|
+
* @param data.scheduler_id The UUID of the scheduler with auth tokens.
|
|
466
|
+
* @param data.manager_customer_id The 10-digit MCC ID.
|
|
467
|
+
* @param data.descriptive_name The name for the new account.
|
|
468
|
+
* @param data.currency_code ISO 4217 currency code.
|
|
469
|
+
* @param data.time_zone Time zone identifier (e.g., 'America/New_York').
|
|
470
|
+
* @returns The newly created Google Ads account details.
|
|
471
|
+
*/
|
|
472
|
+
static createGoogleAccount<T>(data: {
|
|
473
|
+
scheduler_id: string;
|
|
474
|
+
manager_customer_id: string;
|
|
475
|
+
descriptive_name: string;
|
|
476
|
+
currency_code: string;
|
|
477
|
+
time_zone: string;
|
|
478
|
+
}): AxiosPromise<Response<T>>;
|
|
460
479
|
}
|
|
461
480
|
export default Ads;
|
|
@@ -605,5 +605,29 @@ declare class Communities {
|
|
|
605
605
|
static importGameInstalls<T>(community_id: string, newsletter_id: string, data: {
|
|
606
606
|
format: 'csv' | 'xlsx';
|
|
607
607
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
608
|
+
/**
|
|
609
|
+
* Retrieve the current user's pending community invitations across all communities.
|
|
610
|
+
*
|
|
611
|
+
* @returns promise
|
|
612
|
+
*/
|
|
613
|
+
static myInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
614
|
+
/**
|
|
615
|
+
* Resends an invitation to a user.
|
|
616
|
+
*
|
|
617
|
+
* @param community_id The id of the community.
|
|
618
|
+
* @param invite_id The id of the invite to resend.
|
|
619
|
+
*
|
|
620
|
+
* @returns promise
|
|
621
|
+
*/
|
|
622
|
+
static resendInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
623
|
+
/**
|
|
624
|
+
* Revokes/deletes a community invitation.
|
|
625
|
+
*
|
|
626
|
+
* @param community_id The id of the community.
|
|
627
|
+
* @param invite_id The id of the invite to delete.
|
|
628
|
+
*
|
|
629
|
+
* @returns promise
|
|
630
|
+
*/
|
|
631
|
+
static deleteInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
608
632
|
}
|
|
609
633
|
export default Communities;
|
package/dist/esm/index.js
CHANGED
|
@@ -7001,6 +7001,10 @@ var AdsRoute = /** @class */ (function () {
|
|
|
7001
7001
|
url: "/ads/posts/google/{post_id}/enable",
|
|
7002
7002
|
method: HTTP_METHODS.POST,
|
|
7003
7003
|
},
|
|
7004
|
+
createGoogleAccount: {
|
|
7005
|
+
url: "/ads/google/accounts/create",
|
|
7006
|
+
method: HTTP_METHODS.POST,
|
|
7007
|
+
},
|
|
7004
7008
|
};
|
|
7005
7009
|
return AdsRoute;
|
|
7006
7010
|
}());
|
|
@@ -7666,6 +7670,21 @@ var Ads = /** @class */ (function () {
|
|
|
7666
7670
|
Ads.enableGoogleAdPost = function (post_id, params) {
|
|
7667
7671
|
return Requests.processRoute(AdsRoute.routes.enableGoogleAdPost, {}, { post_id: post_id }, params);
|
|
7668
7672
|
};
|
|
7673
|
+
/**
|
|
7674
|
+
* Creates a new Google Ads client account under a specified manager account.
|
|
7675
|
+
* Corresponds to POST /ads/google/accounts/create
|
|
7676
|
+
*
|
|
7677
|
+
* @param data The creation payload.
|
|
7678
|
+
* @param data.scheduler_id The UUID of the scheduler with auth tokens.
|
|
7679
|
+
* @param data.manager_customer_id The 10-digit MCC ID.
|
|
7680
|
+
* @param data.descriptive_name The name for the new account.
|
|
7681
|
+
* @param data.currency_code ISO 4217 currency code.
|
|
7682
|
+
* @param data.time_zone Time zone identifier (e.g., 'America/New_York').
|
|
7683
|
+
* @returns The newly created Google Ads account details.
|
|
7684
|
+
*/
|
|
7685
|
+
Ads.createGoogleAccount = function (data) {
|
|
7686
|
+
return Requests.processRoute(AdsRoute.routes.createGoogleAccount, data, undefined, undefined);
|
|
7687
|
+
};
|
|
7669
7688
|
return Ads;
|
|
7670
7689
|
}());
|
|
7671
7690
|
|
|
@@ -7686,6 +7705,9 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
7686
7705
|
acceptInvite: { url: '/communities/{community_id}/acceptInvite', method: HTTP_METHODS.POST },
|
|
7687
7706
|
retrieveInvite: { url: '/communities/{community_id}/invites/{token}', method: HTTP_METHODS.GET },
|
|
7688
7707
|
listUsers: { url: '/communities/{community_id}/users', method: HTTP_METHODS.GET },
|
|
7708
|
+
myInvites: { url: '/communities/invites/mine', method: HTTP_METHODS.GET },
|
|
7709
|
+
resendInvite: { url: '/communities/{community_id}/invites/{invite_id}/resend', method: HTTP_METHODS.POST },
|
|
7710
|
+
deleteInvite: { url: '/communities/{community_id}/invites/{invite_id}', method: HTTP_METHODS.DELETE },
|
|
7689
7711
|
addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
|
|
7690
7712
|
showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
|
|
7691
7713
|
updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
|
|
@@ -8502,6 +8524,36 @@ var Communities = /** @class */ (function () {
|
|
|
8502
8524
|
Communities.importGameInstalls = function (community_id, newsletter_id, data, params) {
|
|
8503
8525
|
return Requests.processRoute(CommunitiesRoute.routes.importGameInstalls, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
|
|
8504
8526
|
};
|
|
8527
|
+
/**
|
|
8528
|
+
* Retrieve the current user's pending community invitations across all communities.
|
|
8529
|
+
*
|
|
8530
|
+
* @returns promise
|
|
8531
|
+
*/
|
|
8532
|
+
Communities.myInvites = function (params) {
|
|
8533
|
+
return Requests.processRoute(CommunitiesRoute.routes.myInvites, {}, undefined, params);
|
|
8534
|
+
};
|
|
8535
|
+
/**
|
|
8536
|
+
* Resends an invitation to a user.
|
|
8537
|
+
*
|
|
8538
|
+
* @param community_id The id of the community.
|
|
8539
|
+
* @param invite_id The id of the invite to resend.
|
|
8540
|
+
*
|
|
8541
|
+
* @returns promise
|
|
8542
|
+
*/
|
|
8543
|
+
Communities.resendInvite = function (community_id, invite_id, params) {
|
|
8544
|
+
return Requests.processRoute(CommunitiesRoute.routes.resendInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
|
|
8545
|
+
};
|
|
8546
|
+
/**
|
|
8547
|
+
* Revokes/deletes a community invitation.
|
|
8548
|
+
*
|
|
8549
|
+
* @param community_id The id of the community.
|
|
8550
|
+
* @param invite_id The id of the invite to delete.
|
|
8551
|
+
*
|
|
8552
|
+
* @returns promise
|
|
8553
|
+
*/
|
|
8554
|
+
Communities.deleteInvite = function (community_id, invite_id, params) {
|
|
8555
|
+
return Requests.processRoute(CommunitiesRoute.routes.deleteInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
|
|
8556
|
+
};
|
|
8505
8557
|
return Communities;
|
|
8506
8558
|
}());
|
|
8507
8559
|
|