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/index.d.ts CHANGED
@@ -1099,6 +1099,25 @@ declare class Ads {
1099
1099
  static pauseGoogleAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1100
1100
  /** POST /ads/posts/google/{post_id}/enable */
1101
1101
  static enableGoogleAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1102
+ /**
1103
+ * Creates a new Google Ads client account under a specified manager account.
1104
+ * Corresponds to POST /ads/google/accounts/create
1105
+ *
1106
+ * @param data The creation payload.
1107
+ * @param data.scheduler_id The UUID of the scheduler with auth tokens.
1108
+ * @param data.manager_customer_id The 10-digit MCC ID.
1109
+ * @param data.descriptive_name The name for the new account.
1110
+ * @param data.currency_code ISO 4217 currency code.
1111
+ * @param data.time_zone Time zone identifier (e.g., 'America/New_York').
1112
+ * @returns The newly created Google Ads account details.
1113
+ */
1114
+ static createGoogleAccount<T>(data: {
1115
+ scheduler_id: string;
1116
+ manager_customer_id: string;
1117
+ descriptive_name: string;
1118
+ currency_code: string;
1119
+ time_zone: string;
1120
+ }): AxiosPromise<Response<T>>;
1102
1121
  }
1103
1122
 
1104
1123
  declare class Communities {
@@ -1706,6 +1725,30 @@ declare class Communities {
1706
1725
  static importGameInstalls<T>(community_id: string, newsletter_id: string, data: {
1707
1726
  format: 'csv' | 'xlsx';
1708
1727
  }, params?: Record<string, any>): AxiosPromise<Response<T>>;
1728
+ /**
1729
+ * Retrieve the current user's pending community invitations across all communities.
1730
+ *
1731
+ * @returns promise
1732
+ */
1733
+ static myInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
1734
+ /**
1735
+ * Resends an invitation to a user.
1736
+ *
1737
+ * @param community_id The id of the community.
1738
+ * @param invite_id The id of the invite to resend.
1739
+ *
1740
+ * @returns promise
1741
+ */
1742
+ static resendInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1743
+ /**
1744
+ * Revokes/deletes a community invitation.
1745
+ *
1746
+ * @param community_id The id of the community.
1747
+ * @param invite_id The id of the invite to delete.
1748
+ *
1749
+ * @returns promise
1750
+ */
1751
+ static deleteInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1709
1752
  }
1710
1753
 
1711
1754
  declare class Users {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.9.8",
3
+ "version": "2.0.0",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Ads.ts CHANGED
@@ -1274,6 +1274,35 @@ class Ads {
1274
1274
  );
1275
1275
  }
1276
1276
 
1277
+ /**
1278
+ * Creates a new Google Ads client account under a specified manager account.
1279
+ * Corresponds to POST /ads/google/accounts/create
1280
+ *
1281
+ * @param data The creation payload.
1282
+ * @param data.scheduler_id The UUID of the scheduler with auth tokens.
1283
+ * @param data.manager_customer_id The 10-digit MCC ID.
1284
+ * @param data.descriptive_name The name for the new account.
1285
+ * @param data.currency_code ISO 4217 currency code.
1286
+ * @param data.time_zone Time zone identifier (e.g., 'America/New_York').
1287
+ * @returns The newly created Google Ads account details.
1288
+ */
1289
+ public static createGoogleAccount<T>(
1290
+ data: {
1291
+ scheduler_id: string;
1292
+ manager_customer_id: string;
1293
+ descriptive_name: string;
1294
+ currency_code: string;
1295
+ time_zone: string;
1296
+ }
1297
+ ): AxiosPromise<Response<T>> {
1298
+ return Requests.processRoute(
1299
+ AdsRoute.routes.createGoogleAccount,
1300
+ data,
1301
+ undefined,
1302
+ undefined
1303
+ );
1304
+ }
1305
+
1277
1306
 
1278
1307
  }
1279
1308
 
@@ -896,6 +896,39 @@ class Communities {
896
896
  );
897
897
  }
898
898
 
899
+ /**
900
+ * Retrieve the current user's pending community invitations across all communities.
901
+ *
902
+ * @returns promise
903
+ */
904
+ public static myInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
905
+ return Requests.processRoute(CommunitiesRoute.routes.myInvites, {}, undefined, params);
906
+ }
907
+
908
+ /**
909
+ * Resends an invitation to a user.
910
+ *
911
+ * @param community_id The id of the community.
912
+ * @param invite_id The id of the invite to resend.
913
+ *
914
+ * @returns promise
915
+ */
916
+ public static resendInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
917
+ return Requests.processRoute(CommunitiesRoute.routes.resendInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
918
+ }
919
+
920
+ /**
921
+ * Revokes/deletes a community invitation.
922
+ *
923
+ * @param community_id The id of the community.
924
+ * @param invite_id The id of the invite to delete.
925
+ *
926
+ * @returns promise
927
+ */
928
+ public static deleteInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
929
+ return Requests.processRoute(CommunitiesRoute.routes.deleteInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
930
+ }
931
+
899
932
 
900
933
  }
901
934
 
@@ -460,6 +460,10 @@ class AdsRoute {
460
460
  url: "/ads/posts/google/{post_id}/enable",
461
461
  method: HTTP_METHODS.POST,
462
462
  },
463
+ createGoogleAccount: {
464
+ url: "/ads/google/accounts/create",
465
+ method: HTTP_METHODS.POST,
466
+ },
463
467
 
464
468
  };
465
469
  }
@@ -17,6 +17,9 @@ class CommunitiesRoute {
17
17
  acceptInvite: { url: '/communities/{community_id}/acceptInvite', method: HTTP_METHODS.POST },
18
18
  retrieveInvite: { url: '/communities/{community_id}/invites/{token}', method: HTTP_METHODS.GET },
19
19
  listUsers: { url: '/communities/{community_id}/users', method: HTTP_METHODS.GET },
20
+ myInvites: { url: '/communities/invites/mine', method: HTTP_METHODS.GET },
21
+ resendInvite: { url: '/communities/{community_id}/invites/{invite_id}/resend', method: HTTP_METHODS.POST },
22
+ deleteInvite: { url: '/communities/{community_id}/invites/{invite_id}', method: HTTP_METHODS.DELETE },
20
23
  addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
21
24
  showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
22
25
  updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
@@ -59,13 +62,13 @@ class CommunitiesRoute {
59
62
  method: HTTP_METHODS.GET
60
63
  },
61
64
 
62
- exportNewsletterSubscribers: {
63
- url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
64
- method: HTTP_METHODS.POST
65
+ exportNewsletterSubscribers: {
66
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
67
+ method: HTTP_METHODS.POST
65
68
  },
66
- importGameInstalls: {
67
- url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
68
- method: HTTP_METHODS.POST
69
+ importGameInstalls: {
70
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
71
+ method: HTTP_METHODS.POST
69
72
  },
70
73
 
71
74
  // Campaigns
@@ -92,6 +95,8 @@ class CommunitiesRoute {
92
95
  registerNewsletterSubscriber: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers', method: HTTP_METHODS.POST },
93
96
  };
94
97
 
98
+
99
+
95
100
  }
96
101
 
97
102
  export default CommunitiesRoute;