glitch-javascript-sdk 1.8.9 → 1.9.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 +175 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +43 -0
- package/dist/esm/index.js +175 -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 +119 -0
- package/src/routes/AdsRoute.ts +89 -0
package/dist/index.d.ts
CHANGED
|
@@ -939,6 +939,49 @@ declare class Ads {
|
|
|
939
939
|
* @returns The synced Ad resource
|
|
940
940
|
*/
|
|
941
941
|
static syncAd<T>(ad_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
942
|
+
/**
|
|
943
|
+
* POST /ads/facebook/targeting/search
|
|
944
|
+
*/
|
|
945
|
+
static facebookTargetingSearch<T>(data: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
946
|
+
/**
|
|
947
|
+
* GET /ads/facebook/targeting/geo_search
|
|
948
|
+
*/
|
|
949
|
+
static facebookGeoSearch<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
950
|
+
/**
|
|
951
|
+
* GET /ads/facebook/targeting/option_status
|
|
952
|
+
*/
|
|
953
|
+
static facebookTargetingOptionStatus<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
954
|
+
/**
|
|
955
|
+
* POST /ads/facebook/targeting/suggestions
|
|
956
|
+
*/
|
|
957
|
+
static facebookTargetingSuggestions<T>(data: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
958
|
+
/**
|
|
959
|
+
* GET /ads/facebook/targeting/browse
|
|
960
|
+
*/
|
|
961
|
+
static facebookTargetingBrowse<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
962
|
+
/**
|
|
963
|
+
* POST /ads/facebook/targeting/validation
|
|
964
|
+
*/
|
|
965
|
+
static facebookTargetingValidation<T>(data: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
966
|
+
/**
|
|
967
|
+
* GET /ads/facebook/targeting/delivery_estimate
|
|
968
|
+
*/
|
|
969
|
+
static facebookDeliveryEstimate<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
970
|
+
static tiktokTargetingSearch<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
971
|
+
static tiktokContextualTags<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
972
|
+
static tiktokRecommendHashtags<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
973
|
+
static tiktokListCarriers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
974
|
+
static tiktokListInterestCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
975
|
+
static tiktokListActionCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
976
|
+
static tiktokListContentExclusions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
977
|
+
static tiktokListRegions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
978
|
+
static listTwitterTargetingCriteria<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
979
|
+
static getTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
980
|
+
static createTwitterTargetingCriterion<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
981
|
+
static deleteTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
982
|
+
static twitterBatchTargetingCriteria<T>(data: object[], params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
983
|
+
static lookupTwitterTargeting<T>(resource: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
984
|
+
static twitterTargetingSuggestions<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
942
985
|
}
|
|
943
986
|
|
|
944
987
|
declare class Communities {
|
package/package.json
CHANGED
package/src/api/Ads.ts
CHANGED
|
@@ -806,6 +806,125 @@ class Ads {
|
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
+
/**
|
|
810
|
+
* POST /ads/facebook/targeting/search
|
|
811
|
+
*/
|
|
812
|
+
public static facebookTargetingSearch<T>(
|
|
813
|
+
data: Record<string, any>,
|
|
814
|
+
params?: Record<string, any>
|
|
815
|
+
): AxiosPromise<Response<T>> {
|
|
816
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingSearch, data, undefined, params);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* GET /ads/facebook/targeting/geo_search
|
|
821
|
+
*/
|
|
822
|
+
public static facebookGeoSearch<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
823
|
+
return Requests.processRoute(AdsRoute.routes.facebookGeoSearch, undefined, undefined, params);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* GET /ads/facebook/targeting/option_status
|
|
828
|
+
*/
|
|
829
|
+
public static facebookTargetingOptionStatus<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
830
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingOptionStatus, undefined, undefined, params);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* POST /ads/facebook/targeting/suggestions
|
|
835
|
+
*/
|
|
836
|
+
public static facebookTargetingSuggestions<T>(
|
|
837
|
+
data: Record<string, any>,
|
|
838
|
+
params?: Record<string, any>
|
|
839
|
+
): AxiosPromise<Response<T>> {
|
|
840
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingSuggestions, data, undefined, params);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* GET /ads/facebook/targeting/browse
|
|
845
|
+
*/
|
|
846
|
+
public static facebookTargetingBrowse<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
847
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingBrowse, undefined, undefined, params);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* POST /ads/facebook/targeting/validation
|
|
852
|
+
*/
|
|
853
|
+
public static facebookTargetingValidation<T>(
|
|
854
|
+
data: Record<string, any>,
|
|
855
|
+
params?: Record<string, any>
|
|
856
|
+
): AxiosPromise<Response<T>> {
|
|
857
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingValidation, data, undefined, params);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* GET /ads/facebook/targeting/delivery_estimate
|
|
862
|
+
*/
|
|
863
|
+
public static facebookDeliveryEstimate<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
864
|
+
return Requests.processRoute(AdsRoute.routes.facebookDeliveryEstimate, undefined, undefined, params);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
public static tiktokTargetingSearch<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
868
|
+
return Requests.processRoute(AdsRoute.routes.tiktokTargetingSearch, data, {}, params);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
public static tiktokContextualTags<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
872
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContextualTags, undefined, undefined, params);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
public static tiktokRecommendHashtags<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
876
|
+
return Requests.processRoute(AdsRoute.routes.tiktokRecommendHashtags, undefined, undefined, params);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
public static tiktokListCarriers<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
880
|
+
return Requests.processRoute(AdsRoute.routes.tiktokCarriers, undefined, undefined, params);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
public static tiktokListInterestCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
884
|
+
return Requests.processRoute(AdsRoute.routes.tiktokInterestCategories, undefined, undefined, params);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
public static tiktokListActionCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
888
|
+
return Requests.processRoute(AdsRoute.routes.tiktokActionCategories, undefined, undefined, params);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
public static tiktokListContentExclusions<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
892
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContentExclusions, undefined, undefined, params);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
public static tiktokListRegions<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
896
|
+
return Requests.processRoute(AdsRoute.routes.tiktokRegions, undefined, undefined, params);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
public static listTwitterTargetingCriteria<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
900
|
+
return Requests.processRoute(AdsRoute.routes.twitterListTargetingCriteria, undefined, undefined, params);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
public static getTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
904
|
+
return Requests.processRoute(AdsRoute.routes.twitterGetTargetingCriterion, undefined, { criterion_id }, params);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
public static createTwitterTargetingCriterion<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
908
|
+
return Requests.processRoute(AdsRoute.routes.twitterCreateTargetingCriterion, data, {}, params);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
public static deleteTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
912
|
+
return Requests.processRoute(AdsRoute.routes.twitterDeleteTargetingCriterion, undefined, { criterion_id }, params);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
public static twitterBatchTargetingCriteria<T>(data: object[], params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
916
|
+
return Requests.processRoute(AdsRoute.routes.twitterBatchTargetingCriteria, data, {}, params);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
public static lookupTwitterTargeting<T>(resource: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
920
|
+
return Requests.processRoute(AdsRoute.routes.twitterTargetingDiscovery, undefined, { resource }, params);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
public static twitterTargetingSuggestions<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
924
|
+
return Requests.processRoute(AdsRoute.routes.twitterTargetingSuggestions, undefined, undefined, params);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
|
|
809
928
|
|
|
810
929
|
}
|
|
811
930
|
|
package/src/routes/AdsRoute.ts
CHANGED
|
@@ -253,6 +253,95 @@ class AdsRoute {
|
|
|
253
253
|
url: "/ads/creatives/{ad_id}/sync",
|
|
254
254
|
method: HTTP_METHODS.POST,
|
|
255
255
|
},
|
|
256
|
+
facebookTargetingSearch: {
|
|
257
|
+
url: "/ads/facebook/targeting/search",
|
|
258
|
+
method: HTTP_METHODS.POST,
|
|
259
|
+
},
|
|
260
|
+
facebookGeoSearch: {
|
|
261
|
+
url: "/ads/facebook/targeting/geo_search",
|
|
262
|
+
method: HTTP_METHODS.GET,
|
|
263
|
+
},
|
|
264
|
+
facebookTargetingOptionStatus: {
|
|
265
|
+
url: "/ads/facebook/targeting/option_status",
|
|
266
|
+
method: HTTP_METHODS.GET,
|
|
267
|
+
},
|
|
268
|
+
facebookTargetingSuggestions: {
|
|
269
|
+
url: "/ads/facebook/targeting/suggestions",
|
|
270
|
+
method: HTTP_METHODS.POST,
|
|
271
|
+
},
|
|
272
|
+
facebookTargetingBrowse: {
|
|
273
|
+
url: "/ads/facebook/targeting/browse",
|
|
274
|
+
method: HTTP_METHODS.GET,
|
|
275
|
+
},
|
|
276
|
+
facebookTargetingValidation: {
|
|
277
|
+
url: "/ads/facebook/targeting/validation",
|
|
278
|
+
method: HTTP_METHODS.POST,
|
|
279
|
+
},
|
|
280
|
+
facebookDeliveryEstimate: {
|
|
281
|
+
url: "/ads/facebook/targeting/delivery_estimate",
|
|
282
|
+
method: HTTP_METHODS.GET,
|
|
283
|
+
},
|
|
284
|
+
tiktokTargetingSearch: {
|
|
285
|
+
url: "/ads/tiktok/targeting/search",
|
|
286
|
+
method: HTTP_METHODS.POST,
|
|
287
|
+
},
|
|
288
|
+
tiktokContextualTags: {
|
|
289
|
+
url: "/ads/tiktok/targeting/contextual_tags",
|
|
290
|
+
method: HTTP_METHODS.GET,
|
|
291
|
+
},
|
|
292
|
+
tiktokRecommendHashtags: {
|
|
293
|
+
url: "/ads/tiktok/targeting/hashtags",
|
|
294
|
+
method: HTTP_METHODS.GET,
|
|
295
|
+
},
|
|
296
|
+
tiktokCarriers: {
|
|
297
|
+
url: "/ads/tiktok/targeting/carriers",
|
|
298
|
+
method: HTTP_METHODS.GET,
|
|
299
|
+
},
|
|
300
|
+
tiktokInterestCategories: {
|
|
301
|
+
url: "/ads/tiktok/targeting/interest_categories",
|
|
302
|
+
method: HTTP_METHODS.GET,
|
|
303
|
+
},
|
|
304
|
+
tiktokActionCategories: {
|
|
305
|
+
url: "/ads/tiktok/targeting/action_categories",
|
|
306
|
+
method: HTTP_METHODS.GET,
|
|
307
|
+
},
|
|
308
|
+
tiktokContentExclusions: {
|
|
309
|
+
url: "/ads/tiktok/targeting/content_exclusions",
|
|
310
|
+
method: HTTP_METHODS.GET,
|
|
311
|
+
},
|
|
312
|
+
tiktokRegions: {
|
|
313
|
+
url: "/ads/tiktok/targeting/regions",
|
|
314
|
+
method: HTTP_METHODS.GET,
|
|
315
|
+
},
|
|
316
|
+
twitterListTargetingCriteria: {
|
|
317
|
+
url: "/ads/twitter/targeting/criteria",
|
|
318
|
+
method: HTTP_METHODS.GET,
|
|
319
|
+
},
|
|
320
|
+
twitterGetTargetingCriterion: {
|
|
321
|
+
url: "/ads/twitter/targeting/criteria/{criterion_id}",
|
|
322
|
+
method: HTTP_METHODS.GET,
|
|
323
|
+
},
|
|
324
|
+
twitterCreateTargetingCriterion: {
|
|
325
|
+
url: "/ads/twitter/targeting/criteria",
|
|
326
|
+
method: HTTP_METHODS.POST,
|
|
327
|
+
},
|
|
328
|
+
twitterDeleteTargetingCriterion: {
|
|
329
|
+
url: "/ads/twitter/targeting/criteria/{criterion_id}",
|
|
330
|
+
method: HTTP_METHODS.DELETE,
|
|
331
|
+
},
|
|
332
|
+
twitterBatchTargetingCriteria: {
|
|
333
|
+
url: "/ads/twitter/targeting/batch_criteria",
|
|
334
|
+
method: HTTP_METHODS.POST,
|
|
335
|
+
},
|
|
336
|
+
twitterTargetingDiscovery: {
|
|
337
|
+
url: "/ads/twitter/targeting/{resource}",
|
|
338
|
+
method: HTTP_METHODS.GET,
|
|
339
|
+
},
|
|
340
|
+
twitterTargetingSuggestions: {
|
|
341
|
+
url: "/ads/twitter/targeting/suggestions",
|
|
342
|
+
method: HTTP_METHODS.GET,
|
|
343
|
+
},
|
|
344
|
+
|
|
256
345
|
};
|
|
257
346
|
}
|
|
258
347
|
|