glitch-javascript-sdk 1.8.8 → 1.8.9

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
@@ -931,6 +931,14 @@ declare class Ads {
931
931
  static tiktokUploadVideo<T>(data: FormData, params?: Record<string, any>): AxiosPromise<Response<T>>;
932
932
  static tiktokUploadMusic<T>(data: FormData, params?: Record<string, any>): AxiosPromise<Response<T>>;
933
933
  static tiktokGetMediaInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
934
+ /**
935
+ * Sync an Ad with the remote platform.
936
+ *
937
+ * @param ad_id UUID of the ad to sync
938
+ * @param params Optional query parameters
939
+ * @returns The synced Ad resource
940
+ */
941
+ static syncAd<T>(ad_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
934
942
  }
935
943
 
936
944
  declare class Communities {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.8.8",
3
+ "version": "1.8.9",
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
@@ -787,6 +787,25 @@ class Ads {
787
787
  );
788
788
  }
789
789
 
790
+ /**
791
+ * Sync an Ad with the remote platform.
792
+ *
793
+ * @param ad_id UUID of the ad to sync
794
+ * @param params Optional query parameters
795
+ * @returns The synced Ad resource
796
+ */
797
+ public static syncAd<T>(
798
+ ad_id: string,
799
+ params?: Record<string, any>
800
+ ): AxiosPromise<Response<T>> {
801
+ return Requests.processRoute(
802
+ AdsRoute.routes.syncAd,
803
+ undefined,
804
+ { ad_id },
805
+ params
806
+ );
807
+ }
808
+
790
809
 
791
810
  }
792
811
 
@@ -249,6 +249,10 @@ class AdsRoute {
249
249
  url: "/ads/posts/tiktok/media/info",
250
250
  method: HTTP_METHODS.GET,
251
251
  },
252
+ syncAd: {
253
+ url: "/ads/creatives/{ad_id}/sync",
254
+ method: HTTP_METHODS.POST,
255
+ },
252
256
  };
253
257
  }
254
258