glitch-javascript-sdk 1.8.9 → 1.9.1
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 +227 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +58 -0
- package/dist/esm/index.js +227 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +58 -0
- package/package.json +1 -1
- package/src/api/Ads.ts +163 -0
- package/src/routes/AdsRoute.ts +113 -0
package/dist/esm/api/Ads.d.ts
CHANGED
|
@@ -297,5 +297,63 @@ declare class Ads {
|
|
|
297
297
|
* @returns The synced Ad resource
|
|
298
298
|
*/
|
|
299
299
|
static syncAd<T>(ad_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
300
|
+
/**
|
|
301
|
+
* POST /ads/facebook/targeting/search
|
|
302
|
+
*/
|
|
303
|
+
static facebookTargetingSearch<T>(data: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
304
|
+
/**
|
|
305
|
+
* GET /ads/facebook/targeting/geo_search
|
|
306
|
+
*/
|
|
307
|
+
static facebookGeoSearch<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
308
|
+
/**
|
|
309
|
+
* GET /ads/facebook/targeting/option_status
|
|
310
|
+
*/
|
|
311
|
+
static facebookTargetingOptionStatus<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
312
|
+
/**
|
|
313
|
+
* POST /ads/facebook/targeting/suggestions
|
|
314
|
+
*/
|
|
315
|
+
static facebookTargetingSuggestions<T>(data: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
316
|
+
/**
|
|
317
|
+
* GET /ads/facebook/targeting/browse
|
|
318
|
+
*/
|
|
319
|
+
static facebookTargetingBrowse<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
320
|
+
/**
|
|
321
|
+
* POST /ads/facebook/targeting/validation
|
|
322
|
+
*/
|
|
323
|
+
static facebookTargetingValidation<T>(data: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
324
|
+
/**
|
|
325
|
+
* GET /ads/facebook/targeting/delivery_estimate
|
|
326
|
+
*/
|
|
327
|
+
static facebookDeliveryEstimate<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
328
|
+
static tiktokTargetingSearch<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
329
|
+
static tiktokContextualTags<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
330
|
+
static tiktokRecommendHashtags<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
331
|
+
static tiktokListCarriers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
332
|
+
static tiktokListInterestCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
333
|
+
static tiktokListActionCategories<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
334
|
+
static tiktokListContentExclusions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
335
|
+
static tiktokListRegions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
336
|
+
static tiktokGetTargetingInfo<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
337
|
+
static tiktokListLanguages<T>(advertiser_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
338
|
+
static tiktokRecommendInterestKeywords<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
339
|
+
/**
|
|
340
|
+
* GET /ads/tiktok/targeting/hashtag_info
|
|
341
|
+
*/
|
|
342
|
+
static tiktokHashtagInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
343
|
+
/**
|
|
344
|
+
* GET /ads/tiktok/targeting/contextual_tag_info
|
|
345
|
+
*/
|
|
346
|
+
static tiktokContextualTagInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
347
|
+
/**
|
|
348
|
+
* GET /ads/tiktok/targeting/content_exclusion_info
|
|
349
|
+
*/
|
|
350
|
+
static tiktokContentExclusionInfo<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
351
|
+
static listTwitterTargetingCriteria<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
352
|
+
static getTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
353
|
+
static createTwitterTargetingCriterion<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
354
|
+
static deleteTwitterTargetingCriterion<T>(criterion_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
355
|
+
static twitterBatchTargetingCriteria<T>(data: object[], params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
356
|
+
static lookupTwitterTargeting<T>(resource: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
357
|
+
static twitterTargetingSuggestions<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
300
358
|
}
|
|
301
359
|
export default Ads;
|
package/dist/esm/index.js
CHANGED
|
@@ -6806,6 +6806,118 @@ var AdsRoute = /** @class */ (function () {
|
|
|
6806
6806
|
url: "/ads/creatives/{ad_id}/sync",
|
|
6807
6807
|
method: HTTP_METHODS.POST,
|
|
6808
6808
|
},
|
|
6809
|
+
facebookTargetingSearch: {
|
|
6810
|
+
url: "/ads/facebook/targeting/search",
|
|
6811
|
+
method: HTTP_METHODS.POST,
|
|
6812
|
+
},
|
|
6813
|
+
facebookGeoSearch: {
|
|
6814
|
+
url: "/ads/facebook/targeting/geo_search",
|
|
6815
|
+
method: HTTP_METHODS.GET,
|
|
6816
|
+
},
|
|
6817
|
+
facebookTargetingOptionStatus: {
|
|
6818
|
+
url: "/ads/facebook/targeting/option_status",
|
|
6819
|
+
method: HTTP_METHODS.GET,
|
|
6820
|
+
},
|
|
6821
|
+
facebookTargetingSuggestions: {
|
|
6822
|
+
url: "/ads/facebook/targeting/suggestions",
|
|
6823
|
+
method: HTTP_METHODS.POST,
|
|
6824
|
+
},
|
|
6825
|
+
facebookTargetingBrowse: {
|
|
6826
|
+
url: "/ads/facebook/targeting/browse",
|
|
6827
|
+
method: HTTP_METHODS.GET,
|
|
6828
|
+
},
|
|
6829
|
+
facebookTargetingValidation: {
|
|
6830
|
+
url: "/ads/facebook/targeting/validation",
|
|
6831
|
+
method: HTTP_METHODS.POST,
|
|
6832
|
+
},
|
|
6833
|
+
facebookDeliveryEstimate: {
|
|
6834
|
+
url: "/ads/facebook/targeting/delivery_estimate",
|
|
6835
|
+
method: HTTP_METHODS.GET,
|
|
6836
|
+
},
|
|
6837
|
+
tiktokTargetingSearch: {
|
|
6838
|
+
url: "/ads/tiktok/targeting/search",
|
|
6839
|
+
method: HTTP_METHODS.POST,
|
|
6840
|
+
},
|
|
6841
|
+
tiktokContextualTags: {
|
|
6842
|
+
url: "/ads/tiktok/targeting/contextual_tags",
|
|
6843
|
+
method: HTTP_METHODS.GET,
|
|
6844
|
+
},
|
|
6845
|
+
tiktokRecommendHashtags: {
|
|
6846
|
+
url: "/ads/tiktok/targeting/hashtags",
|
|
6847
|
+
method: HTTP_METHODS.GET,
|
|
6848
|
+
},
|
|
6849
|
+
tiktokCarriers: {
|
|
6850
|
+
url: "/ads/tiktok/targeting/carriers",
|
|
6851
|
+
method: HTTP_METHODS.GET,
|
|
6852
|
+
},
|
|
6853
|
+
tiktokInterestCategories: {
|
|
6854
|
+
url: "/ads/tiktok/targeting/interest_categories",
|
|
6855
|
+
method: HTTP_METHODS.GET,
|
|
6856
|
+
},
|
|
6857
|
+
tiktokActionCategories: {
|
|
6858
|
+
url: "/ads/tiktok/targeting/action_categories",
|
|
6859
|
+
method: HTTP_METHODS.GET,
|
|
6860
|
+
},
|
|
6861
|
+
tiktokContentExclusions: {
|
|
6862
|
+
url: "/ads/tiktok/targeting/content_exclusions",
|
|
6863
|
+
method: HTTP_METHODS.GET,
|
|
6864
|
+
},
|
|
6865
|
+
tiktokRegions: {
|
|
6866
|
+
url: "/ads/tiktok/targeting/regions",
|
|
6867
|
+
method: HTTP_METHODS.GET,
|
|
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
|
+
},
|
|
6893
|
+
twitterListTargetingCriteria: {
|
|
6894
|
+
url: "/ads/twitter/targeting/criteria",
|
|
6895
|
+
method: HTTP_METHODS.GET,
|
|
6896
|
+
},
|
|
6897
|
+
twitterGetTargetingCriterion: {
|
|
6898
|
+
url: "/ads/twitter/targeting/criteria/{criterion_id}",
|
|
6899
|
+
method: HTTP_METHODS.GET,
|
|
6900
|
+
},
|
|
6901
|
+
twitterCreateTargetingCriterion: {
|
|
6902
|
+
url: "/ads/twitter/targeting/criteria",
|
|
6903
|
+
method: HTTP_METHODS.POST,
|
|
6904
|
+
},
|
|
6905
|
+
twitterDeleteTargetingCriterion: {
|
|
6906
|
+
url: "/ads/twitter/targeting/criteria/{criterion_id}",
|
|
6907
|
+
method: HTTP_METHODS.DELETE,
|
|
6908
|
+
},
|
|
6909
|
+
twitterBatchTargetingCriteria: {
|
|
6910
|
+
url: "/ads/twitter/targeting/batch_criteria",
|
|
6911
|
+
method: HTTP_METHODS.POST,
|
|
6912
|
+
},
|
|
6913
|
+
twitterTargetingDiscovery: {
|
|
6914
|
+
url: "/ads/twitter/targeting/{resource}",
|
|
6915
|
+
method: HTTP_METHODS.GET,
|
|
6916
|
+
},
|
|
6917
|
+
twitterTargetingSuggestions: {
|
|
6918
|
+
url: "/ads/twitter/targeting/suggestions",
|
|
6919
|
+
method: HTTP_METHODS.GET,
|
|
6920
|
+
},
|
|
6809
6921
|
};
|
|
6810
6922
|
return AdsRoute;
|
|
6811
6923
|
}());
|
|
@@ -7226,6 +7338,121 @@ var Ads = /** @class */ (function () {
|
|
|
7226
7338
|
Ads.syncAd = function (ad_id, params) {
|
|
7227
7339
|
return Requests.processRoute(AdsRoute.routes.syncAd, undefined, { ad_id: ad_id }, params);
|
|
7228
7340
|
};
|
|
7341
|
+
/**
|
|
7342
|
+
* POST /ads/facebook/targeting/search
|
|
7343
|
+
*/
|
|
7344
|
+
Ads.facebookTargetingSearch = function (data, params) {
|
|
7345
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingSearch, data, undefined, params);
|
|
7346
|
+
};
|
|
7347
|
+
/**
|
|
7348
|
+
* GET /ads/facebook/targeting/geo_search
|
|
7349
|
+
*/
|
|
7350
|
+
Ads.facebookGeoSearch = function (params) {
|
|
7351
|
+
return Requests.processRoute(AdsRoute.routes.facebookGeoSearch, undefined, undefined, params);
|
|
7352
|
+
};
|
|
7353
|
+
/**
|
|
7354
|
+
* GET /ads/facebook/targeting/option_status
|
|
7355
|
+
*/
|
|
7356
|
+
Ads.facebookTargetingOptionStatus = function (params) {
|
|
7357
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingOptionStatus, undefined, undefined, params);
|
|
7358
|
+
};
|
|
7359
|
+
/**
|
|
7360
|
+
* POST /ads/facebook/targeting/suggestions
|
|
7361
|
+
*/
|
|
7362
|
+
Ads.facebookTargetingSuggestions = function (data, params) {
|
|
7363
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingSuggestions, data, undefined, params);
|
|
7364
|
+
};
|
|
7365
|
+
/**
|
|
7366
|
+
* GET /ads/facebook/targeting/browse
|
|
7367
|
+
*/
|
|
7368
|
+
Ads.facebookTargetingBrowse = function (params) {
|
|
7369
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingBrowse, undefined, undefined, params);
|
|
7370
|
+
};
|
|
7371
|
+
/**
|
|
7372
|
+
* POST /ads/facebook/targeting/validation
|
|
7373
|
+
*/
|
|
7374
|
+
Ads.facebookTargetingValidation = function (data, params) {
|
|
7375
|
+
return Requests.processRoute(AdsRoute.routes.facebookTargetingValidation, data, undefined, params);
|
|
7376
|
+
};
|
|
7377
|
+
/**
|
|
7378
|
+
* GET /ads/facebook/targeting/delivery_estimate
|
|
7379
|
+
*/
|
|
7380
|
+
Ads.facebookDeliveryEstimate = function (params) {
|
|
7381
|
+
return Requests.processRoute(AdsRoute.routes.facebookDeliveryEstimate, undefined, undefined, params);
|
|
7382
|
+
};
|
|
7383
|
+
Ads.tiktokTargetingSearch = function (data, params) {
|
|
7384
|
+
return Requests.processRoute(AdsRoute.routes.tiktokTargetingSearch, data, {}, params);
|
|
7385
|
+
};
|
|
7386
|
+
Ads.tiktokContextualTags = function (params) {
|
|
7387
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContextualTags, undefined, undefined, params);
|
|
7388
|
+
};
|
|
7389
|
+
Ads.tiktokRecommendHashtags = function (params) {
|
|
7390
|
+
return Requests.processRoute(AdsRoute.routes.tiktokRecommendHashtags, undefined, undefined, params);
|
|
7391
|
+
};
|
|
7392
|
+
Ads.tiktokListCarriers = function (params) {
|
|
7393
|
+
return Requests.processRoute(AdsRoute.routes.tiktokCarriers, undefined, undefined, params);
|
|
7394
|
+
};
|
|
7395
|
+
Ads.tiktokListInterestCategories = function (params) {
|
|
7396
|
+
return Requests.processRoute(AdsRoute.routes.tiktokInterestCategories, undefined, undefined, params);
|
|
7397
|
+
};
|
|
7398
|
+
Ads.tiktokListActionCategories = function (params) {
|
|
7399
|
+
return Requests.processRoute(AdsRoute.routes.tiktokActionCategories, undefined, undefined, params);
|
|
7400
|
+
};
|
|
7401
|
+
Ads.tiktokListContentExclusions = function (params) {
|
|
7402
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContentExclusions, undefined, undefined, params);
|
|
7403
|
+
};
|
|
7404
|
+
Ads.tiktokListRegions = function (params) {
|
|
7405
|
+
return Requests.processRoute(AdsRoute.routes.tiktokRegions, undefined, undefined, params);
|
|
7406
|
+
};
|
|
7407
|
+
Ads.tiktokGetTargetingInfo = function (data, params) {
|
|
7408
|
+
return Requests.processRoute(AdsRoute.routes.tiktokTargetingInfo, data, {}, params);
|
|
7409
|
+
};
|
|
7410
|
+
Ads.tiktokListLanguages = function (advertiser_id, params) {
|
|
7411
|
+
var mergedParams = __assign(__assign({}, params), { advertiser_id: advertiser_id });
|
|
7412
|
+
return Requests.processRoute(AdsRoute.routes.tiktokLanguages, undefined, undefined, mergedParams);
|
|
7413
|
+
};
|
|
7414
|
+
Ads.tiktokRecommendInterestKeywords = function (params) {
|
|
7415
|
+
return Requests.processRoute(AdsRoute.routes.tiktokInterestKeywordRecommend, undefined, undefined, params);
|
|
7416
|
+
};
|
|
7417
|
+
/**
|
|
7418
|
+
* GET /ads/tiktok/targeting/hashtag_info
|
|
7419
|
+
*/
|
|
7420
|
+
Ads.tiktokHashtagInfo = function (params) {
|
|
7421
|
+
return Requests.processRoute(AdsRoute.routes.tiktokHashtagInfo, undefined, undefined, params);
|
|
7422
|
+
};
|
|
7423
|
+
/**
|
|
7424
|
+
* GET /ads/tiktok/targeting/contextual_tag_info
|
|
7425
|
+
*/
|
|
7426
|
+
Ads.tiktokContextualTagInfo = function (params) {
|
|
7427
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContextualTagInfo, undefined, undefined, params);
|
|
7428
|
+
};
|
|
7429
|
+
/**
|
|
7430
|
+
* GET /ads/tiktok/targeting/content_exclusion_info
|
|
7431
|
+
*/
|
|
7432
|
+
Ads.tiktokContentExclusionInfo = function (params) {
|
|
7433
|
+
return Requests.processRoute(AdsRoute.routes.tiktokContentExclusionInfo, undefined, undefined, params);
|
|
7434
|
+
};
|
|
7435
|
+
Ads.listTwitterTargetingCriteria = function (params) {
|
|
7436
|
+
return Requests.processRoute(AdsRoute.routes.twitterListTargetingCriteria, undefined, undefined, params);
|
|
7437
|
+
};
|
|
7438
|
+
Ads.getTwitterTargetingCriterion = function (criterion_id, params) {
|
|
7439
|
+
return Requests.processRoute(AdsRoute.routes.twitterGetTargetingCriterion, undefined, { criterion_id: criterion_id }, params);
|
|
7440
|
+
};
|
|
7441
|
+
Ads.createTwitterTargetingCriterion = function (data, params) {
|
|
7442
|
+
return Requests.processRoute(AdsRoute.routes.twitterCreateTargetingCriterion, data, {}, params);
|
|
7443
|
+
};
|
|
7444
|
+
Ads.deleteTwitterTargetingCriterion = function (criterion_id, params) {
|
|
7445
|
+
return Requests.processRoute(AdsRoute.routes.twitterDeleteTargetingCriterion, undefined, { criterion_id: criterion_id }, params);
|
|
7446
|
+
};
|
|
7447
|
+
Ads.twitterBatchTargetingCriteria = function (data, params) {
|
|
7448
|
+
return Requests.processRoute(AdsRoute.routes.twitterBatchTargetingCriteria, data, {}, params);
|
|
7449
|
+
};
|
|
7450
|
+
Ads.lookupTwitterTargeting = function (resource, params) {
|
|
7451
|
+
return Requests.processRoute(AdsRoute.routes.twitterTargetingDiscovery, undefined, { resource: resource }, params);
|
|
7452
|
+
};
|
|
7453
|
+
Ads.twitterTargetingSuggestions = function (params) {
|
|
7454
|
+
return Requests.processRoute(AdsRoute.routes.twitterTargetingSuggestions, undefined, undefined, params);
|
|
7455
|
+
};
|
|
7229
7456
|
return Ads;
|
|
7230
7457
|
}());
|
|
7231
7458
|
|