glitch-javascript-sdk 1.9.0 → 1.9.2
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 +69 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +22 -4
- package/dist/esm/index.js +69 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +21 -3
- package/package.json +1 -1
- package/src/api/Ads.ts +114 -49
- package/src/routes/AdsRoute.ts +24 -0
package/dist/esm/api/Ads.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Response from "../util/Response";
|
|
2
|
-
import { AxiosPromise } from "axios";
|
|
2
|
+
import { AxiosPromise, AxiosProgressEvent } from "axios";
|
|
3
3
|
declare class Ads {
|
|
4
4
|
/**
|
|
5
5
|
* List Ad Campaigns.
|
|
@@ -285,9 +285,12 @@ declare class Ads {
|
|
|
285
285
|
static viewFacebookAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
286
286
|
static updateFacebookAdPost<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
287
287
|
static deleteFacebookAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
288
|
-
static
|
|
289
|
-
static
|
|
290
|
-
static
|
|
288
|
+
static tiktokUploadImageFile<T>(file: File, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
289
|
+
static tiktokUploadVideoFile<T>(file: File, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
290
|
+
static tiktokUploadMusicFile<T>(file: File, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
291
|
+
static tiktokUploadImageBlob<T>(blob: Blob, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
292
|
+
static tiktokUploadVideoBlob<T>(blob: Blob, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
293
|
+
static tiktokUploadMusicBlob<T>(blob: Blob, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
291
294
|
static tiktokGetMediaInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
292
295
|
/**
|
|
293
296
|
* Sync an Ad with the remote platform.
|
|
@@ -333,6 +336,21 @@ declare class Ads {
|
|
|
333
336
|
static tiktokListActionCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
334
337
|
static tiktokListContentExclusions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
335
338
|
static tiktokListRegions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
339
|
+
static tiktokGetTargetingInfo<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
340
|
+
static tiktokListLanguages<T>(advertiser_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
341
|
+
static tiktokRecommendInterestKeywords<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
342
|
+
/**
|
|
343
|
+
* GET /ads/tiktok/targeting/hashtag_info
|
|
344
|
+
*/
|
|
345
|
+
static tiktokHashtagInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
346
|
+
/**
|
|
347
|
+
* GET /ads/tiktok/targeting/contextual_tag_info
|
|
348
|
+
*/
|
|
349
|
+
static tiktokContextualTagInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
350
|
+
/**
|
|
351
|
+
* GET /ads/tiktok/targeting/content_exclusion_info
|
|
352
|
+
*/
|
|
353
|
+
static tiktokContentExclusionInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
336
354
|
static listTwitterTargetingCriteria<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
337
355
|
static getTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
338
356
|
static createTwitterTargetingCriterion<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
package/dist/esm/index.js
CHANGED
|
@@ -6866,6 +6866,30 @@ var AdsRoute = /** @class */ (function () {
|
|
|
6866
6866
|
url: "/ads/tiktok/targeting/regions",
|
|
6867
6867
|
method: HTTP_METHODS.GET,
|
|
6868
6868
|
},
|
|
6869
|
+
tiktokTargetingInfo: {
|
|
6870
|
+
url: "/ads/tiktok/targeting/info",
|
|
6871
|
+
method: HTTP_METHODS.POST,
|
|
6872
|
+
},
|
|
6873
|
+
tiktokLanguages: {
|
|
6874
|
+
url: "/ads/tiktok/targeting/languages",
|
|
6875
|
+
method: HTTP_METHODS.GET,
|
|
6876
|
+
},
|
|
6877
|
+
tiktokHashtagInfo: {
|
|
6878
|
+
url: "/ads/tiktok/targeting/hashtag_info",
|
|
6879
|
+
method: HTTP_METHODS.GET,
|
|
6880
|
+
},
|
|
6881
|
+
tiktokContextualTagInfo: {
|
|
6882
|
+
url: "/ads/tiktok/targeting/contextual_tag_info",
|
|
6883
|
+
method: HTTP_METHODS.GET,
|
|
6884
|
+
},
|
|
6885
|
+
tiktokContentExclusionInfo: {
|
|
6886
|
+
url: "/ads/tiktok/targeting/content_exclusion_info",
|
|
6887
|
+
method: HTTP_METHODS.GET,
|
|
6888
|
+
},
|
|
6889
|
+
tiktokInterestKeywordRecommend: {
|
|
6890
|
+
url: "/ads/tiktok/targeting/interest_keywords",
|
|
6891
|
+
method: HTTP_METHODS.GET,
|
|
6892
|
+
},
|
|
6869
6893
|
twitterListTargetingCriteria: {
|
|
6870
6894
|
url: "/ads/twitter/targeting/criteria",
|
|
6871
6895
|
method: HTTP_METHODS.GET,
|
|
@@ -7292,14 +7316,25 @@ var Ads = /** @class */ (function () {
|
|
|
7292
7316
|
Ads.deleteFacebookAdPost = function (post_id, params) {
|
|
7293
7317
|
return Requests.processRoute(AdsRoute.routes.deleteFacebookAdPost, {}, { post_id: post_id }, params);
|
|
7294
7318
|
};
|
|
7295
|
-
|
|
7296
|
-
|
|
7319
|
+
// TikTok Uploads: FILE
|
|
7320
|
+
Ads.tiktokUploadImageFile = function (file, data, params, onUploadProgress) {
|
|
7321
|
+
return Requests.uploadFile(AdsRoute.routes.tiktokUploadImage.url, 'image_file', file, data, params, onUploadProgress);
|
|
7322
|
+
};
|
|
7323
|
+
Ads.tiktokUploadVideoFile = function (file, data, params, onUploadProgress) {
|
|
7324
|
+
return Requests.uploadFile(AdsRoute.routes.tiktokUploadVideo.url, 'video_file', file, data, params, onUploadProgress);
|
|
7325
|
+
};
|
|
7326
|
+
Ads.tiktokUploadMusicFile = function (file, data, params, onUploadProgress) {
|
|
7327
|
+
return Requests.uploadFile(AdsRoute.routes.tiktokUploadMusic.url, 'music_file', file, data, params, onUploadProgress);
|
|
7297
7328
|
};
|
|
7298
|
-
|
|
7299
|
-
|
|
7329
|
+
// TikTok Uploads: BLOB
|
|
7330
|
+
Ads.tiktokUploadImageBlob = function (blob, data, params, onUploadProgress) {
|
|
7331
|
+
return Requests.uploadBlob(AdsRoute.routes.tiktokUploadImage.url, 'image_file', blob, data, params, onUploadProgress);
|
|
7300
7332
|
};
|
|
7301
|
-
Ads.
|
|
7302
|
-
return Requests.
|
|
7333
|
+
Ads.tiktokUploadVideoBlob = function (blob, data, params, onUploadProgress) {
|
|
7334
|
+
return Requests.uploadBlob(AdsRoute.routes.tiktokUploadVideo.url, 'video_file', blob, data, params, onUploadProgress);
|
|
7335
|
+
};
|
|
7336
|
+
Ads.tiktokUploadMusicBlob = function (blob, data, params, onUploadProgress) {
|
|
7337
|
+
return Requests.uploadBlob(AdsRoute.routes.tiktokUploadMusic.url, 'music_file', blob, data, params, onUploadProgress);
|
|
7303
7338
|
};
|
|
7304
7339
|
Ads.tiktokGetMediaInfo = function (params) {
|
|
7305
7340
|
return Requests.processRoute(AdsRoute.routes.tiktokGetMediaInfo, undefined, undefined, params);
|
|
@@ -7380,6 +7415,34 @@ var Ads = /** @class */ (function () {
|
|
|
7380
7415
|
Ads.tiktokListRegions = function (params) {
|
|
7381
7416
|
return Requests.processRoute(AdsRoute.routes.tiktokRegions, undefined, undefined, params);
|
|
7382
7417
|
};
|
|
7418
|
+
Ads.tiktokGetTargetingInfo = function (data, params) {
|
|
7419
|
+
return Requests.processRoute(AdsRoute.routes.tiktokTargetingInfo, data, {}, params);
|
|
7420
|
+
};
|
|
7421
|
+
Ads.tiktokListLanguages = function (advertiser_id, params) {
|
|
7422
|
+
var mergedParams = __assign(__assign({}, params), { advertiser_id: advertiser_id });
|
|
7423
|
+
return Requests.processRoute(AdsRoute.routes.tiktokLanguages, undefined, undefined, mergedParams);
|
|
7424
|
+
};
|
|
7425
|
+
Ads.tiktokRecommendInterestKeywords = function (params) {
|
|
7426
|
+
return Requests.processRoute(AdsRoute.routes.tiktokInterestKeywordRecommend, undefined, undefined, params);
|
|
7427
|
+
};
|
|
7428
|
+
/**
|
|
7429
|
+
* GET /ads/tiktok/targeting/hashtag_info
|
|
7430
|
+
*/
|
|
7431
|
+
Ads.tiktokHashtagInfo = function (params) {
|
|
7432
|
+
return Requests.processRoute(AdsRoute.routes.tiktokHashtagInfo, undefined, undefined, params);
|
|
7433
|
+
};
|
|
7434
|
+
/**
|
|
7435
|
+
* GET /ads/tiktok/targeting/contextual_tag_info
|
|
7436
|
+
*/
|
|
7437
|
+
Ads.tiktokContextualTagInfo = function (params) {
|
|
7438
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContextualTagInfo, undefined, undefined, params);
|
|
7439
|
+
};
|
|
7440
|
+
/**
|
|
7441
|
+
* GET /ads/tiktok/targeting/content_exclusion_info
|
|
7442
|
+
*/
|
|
7443
|
+
Ads.tiktokContentExclusionInfo = function (params) {
|
|
7444
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContentExclusionInfo, undefined, undefined, params);
|
|
7445
|
+
};
|
|
7383
7446
|
Ads.listTwitterTargetingCriteria = function (params) {
|
|
7384
7447
|
return Requests.processRoute(AdsRoute.routes.twitterListTargetingCriteria, undefined, undefined, params);
|
|
7385
7448
|
};
|