glitch-javascript-sdk 1.7.9 → 1.8.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 +69 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +36 -0
- package/dist/esm/index.js +69 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/package.json +1 -1
- package/src/api/Scheduler.ts +69 -0
- package/src/routes/AdsRoute.ts +15 -15
- package/src/routes/SchedulerRoute.ts +16 -0
package/dist/cjs/index.js
CHANGED
|
@@ -19796,6 +19796,18 @@ var AdsRoute = /** @class */ (function () {
|
|
|
19796
19796
|
url: "/ads/campaigns/{campaign_id}",
|
|
19797
19797
|
method: HTTP_METHODS.DELETE,
|
|
19798
19798
|
},
|
|
19799
|
+
getCampaignBusinesses: {
|
|
19800
|
+
url: "/ads/campaigns/{campaign_id}/businesses",
|
|
19801
|
+
method: HTTP_METHODS.GET,
|
|
19802
|
+
},
|
|
19803
|
+
getCampaignAdAccounts: {
|
|
19804
|
+
url: "/ads/campaigns/{campaign_id}/ad_accounts",
|
|
19805
|
+
method: HTTP_METHODS.GET,
|
|
19806
|
+
},
|
|
19807
|
+
getCampaignFundingInstruments: {
|
|
19808
|
+
url: "/ads/campaigns/{campaign_id}/funding_instruments",
|
|
19809
|
+
method: HTTP_METHODS.GET,
|
|
19810
|
+
},
|
|
19799
19811
|
// ----------------------------------------------------------------
|
|
19800
19812
|
// AD GROUPS (AKA AD SETS)
|
|
19801
19813
|
// ----------------------------------------------------------------
|
|
@@ -19819,18 +19831,6 @@ var AdsRoute = /** @class */ (function () {
|
|
|
19819
19831
|
url: "/ads/campaigns/{campaign_id}/groups/{group_id}",
|
|
19820
19832
|
method: HTTP_METHODS.DELETE,
|
|
19821
19833
|
},
|
|
19822
|
-
getCampaignBusinesses: {
|
|
19823
|
-
url: "/ads/campaigns/{campaign_id}/businesses",
|
|
19824
|
-
method: HTTP_METHODS.GET,
|
|
19825
|
-
},
|
|
19826
|
-
getCampaignAdAccounts: {
|
|
19827
|
-
url: "/ads/campaigns/{campaign_id}/ad_accounts",
|
|
19828
|
-
method: HTTP_METHODS.GET,
|
|
19829
|
-
},
|
|
19830
|
-
getCampaignFundingInstruments: {
|
|
19831
|
-
url: "/ads/campaigns/{campaign_id}/funding_instruments",
|
|
19832
|
-
method: HTTP_METHODS.GET,
|
|
19833
|
-
},
|
|
19834
19834
|
// ----------------------------------------------------------------
|
|
19835
19835
|
// ADS (CREATIVES)
|
|
19836
19836
|
// ----------------------------------------------------------------
|
|
@@ -25347,6 +25347,18 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
25347
25347
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
25348
25348
|
method: HTTP_METHODS.GET
|
|
25349
25349
|
},
|
|
25350
|
+
getCampaignBusinesses: {
|
|
25351
|
+
url: "/schedulers/{scheduler_id}/businesses",
|
|
25352
|
+
method: HTTP_METHODS.GET,
|
|
25353
|
+
},
|
|
25354
|
+
getCampaignAdAccounts: {
|
|
25355
|
+
url: "/schedulers/{scheduler_id}/ad_accounts",
|
|
25356
|
+
method: HTTP_METHODS.GET,
|
|
25357
|
+
},
|
|
25358
|
+
getCampaignFundingInstruments: {
|
|
25359
|
+
url: "/schedulers/{scheduler_id}/funding_instruments",
|
|
25360
|
+
method: HTTP_METHODS.GET,
|
|
25361
|
+
},
|
|
25350
25362
|
};
|
|
25351
25363
|
return SchedulerRoute;
|
|
25352
25364
|
}());
|
|
@@ -25783,6 +25795,51 @@ var Scheduler = /** @class */ (function () {
|
|
|
25783
25795
|
Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
|
|
25784
25796
|
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
25785
25797
|
};
|
|
25798
|
+
/**
|
|
25799
|
+
* List platform-level businesses for the given campaign ID,
|
|
25800
|
+
* as defined by /schedulers/{scheduler_id}/businesses on the backend.
|
|
25801
|
+
*
|
|
25802
|
+
* Typically relevant for Reddit (list businesses), or might return a
|
|
25803
|
+
* "not supported" message for Meta/TikTok.
|
|
25804
|
+
*
|
|
25805
|
+
* @param scheduler_id The UUID of the Ad Campaign
|
|
25806
|
+
* @param params Optional query parameters, e.g. page.size, etc.
|
|
25807
|
+
* @returns A response object with data (business list or messages)
|
|
25808
|
+
*/
|
|
25809
|
+
Scheduler.listCampaignBusinesses = function (scheduler_id, params) {
|
|
25810
|
+
return Requests.processRoute(SchedulerRoute.routes.getCampaignBusinesses, undefined, // no request body
|
|
25811
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
25812
|
+
params // query params
|
|
25813
|
+
);
|
|
25814
|
+
};
|
|
25815
|
+
/**
|
|
25816
|
+
* List Ad Accounts for the given campaign ID,
|
|
25817
|
+
* as defined by /schedulers/{scheduler_id}/ad_accounts on the backend.
|
|
25818
|
+
*
|
|
25819
|
+
* E.g. for Reddit, you can pass ?business_id= to get business-level ad accounts,
|
|
25820
|
+
* or for Twitter, it might just return a user’s ad accounts, etc.
|
|
25821
|
+
*
|
|
25822
|
+
* @param scheduler_id The UUID of the Ad Campaign
|
|
25823
|
+
* @param params Optional query parameters, e.g. business_id, page.size, etc.
|
|
25824
|
+
* @returns A response object with data (ad account list)
|
|
25825
|
+
*/
|
|
25826
|
+
Scheduler.listCampaignAdAccounts = function (scheduler_id, params) {
|
|
25827
|
+
return Requests.processRoute(SchedulerRoute.routes.getCampaignAdAccounts, undefined, { scheduler_id: scheduler_id }, params);
|
|
25828
|
+
};
|
|
25829
|
+
/**
|
|
25830
|
+
* List funding instruments for the given campaign ID,
|
|
25831
|
+
* as defined by /schedulers/{scheduler_id}/funding_instruments on the backend.
|
|
25832
|
+
*
|
|
25833
|
+
* For Twitter, pass ?account_id=...
|
|
25834
|
+
* For Reddit, pass ?ad_account_id=... or ?business_id=...
|
|
25835
|
+
*
|
|
25836
|
+
* @param scheduler_id The UUID of the Ad Campaign
|
|
25837
|
+
* @param params Optional query parameters
|
|
25838
|
+
* @returns A response object with data (funding instruments)
|
|
25839
|
+
*/
|
|
25840
|
+
Scheduler.listCampaignFundingInstruments = function (scheduler_id, params) {
|
|
25841
|
+
return Requests.processRoute(SchedulerRoute.routes.getCampaignFundingInstruments, undefined, { scheduler_id: scheduler_id }, params);
|
|
25842
|
+
};
|
|
25786
25843
|
return Scheduler;
|
|
25787
25844
|
}());
|
|
25788
25845
|
|