@smartlyqofficial/node 0.1.24 → 0.1.26

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.js CHANGED
@@ -135,6 +135,175 @@ var AccountResource = class {
135
135
  return this._client.request("GET", "/me/billing", { options });
136
136
  }
137
137
  };
138
+ var AdsResource = class {
139
+ constructor(_client) {
140
+ this._client = _client;
141
+ }
142
+ /** List campaigns `GET /ads/campaigns` */
143
+ listCampaigns(query, options) {
144
+ return this._client.request("GET", "/ads/campaigns", { query, options });
145
+ }
146
+ /** Create a campaign `POST /ads/campaigns` */
147
+ createCampaign(body, options) {
148
+ return this._client.request("POST", "/ads/campaigns", { body, options });
149
+ }
150
+ /** Get a campaign `GET /ads/campaigns/{id}` */
151
+ getCampaign(id, options) {
152
+ return this._client.request("GET", `/ads/campaigns/${encodeURIComponent(id)}`, { options });
153
+ }
154
+ /** Update a campaign `PATCH /ads/campaigns/{id}` */
155
+ updateCampaign(id, body, options) {
156
+ return this._client.request("PATCH", `/ads/campaigns/${encodeURIComponent(id)}`, { body, options });
157
+ }
158
+ /** Delete a campaign `DELETE /ads/campaigns/{id}` */
159
+ deleteCampaign(id, options) {
160
+ return this._client.request("DELETE", `/ads/campaigns/${encodeURIComponent(id)}`, { options });
161
+ }
162
+ /** Pause a campaign `POST /ads/campaigns/{id}/pause` */
163
+ pauseCampaign(id, options) {
164
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/pause`, { options });
165
+ }
166
+ /** Resume a campaign `POST /ads/campaigns/{id}/resume` */
167
+ resumeCampaign(id, options) {
168
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/resume`, { options });
169
+ }
170
+ /** Duplicate a campaign `POST /ads/campaigns/{id}/duplicate` */
171
+ duplicateCampaign(id, options) {
172
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/duplicate`, { options });
173
+ }
174
+ /** Archive a campaign `POST /ads/campaigns/{id}/archive` */
175
+ archiveCampaign(id, options) {
176
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/archive`, { options });
177
+ }
178
+ /** Bulk pause/resume campaigns `POST /ads/campaigns/bulk-status` */
179
+ bulkCampaignStatus(body, options) {
180
+ return this._client.request("POST", "/ads/campaigns/bulk-status", { body, options });
181
+ }
182
+ /** List ad sets `GET /ads/ad-sets` */
183
+ listSets(query, options) {
184
+ return this._client.request("GET", "/ads/ad-sets", { query, options });
185
+ }
186
+ /** Get an ad set `GET /ads/ad-sets/{id}` */
187
+ getSet(id, options) {
188
+ return this._client.request("GET", `/ads/ad-sets/${encodeURIComponent(id)}`, { options });
189
+ }
190
+ /** Delete an ad set `DELETE /ads/ad-sets/{id}` */
191
+ deleteSet(id, options) {
192
+ return this._client.request("DELETE", `/ads/ad-sets/${encodeURIComponent(id)}`, { options });
193
+ }
194
+ /** Pause an ad set `POST /ads/ad-sets/{id}/pause` */
195
+ pauseSet(id, options) {
196
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/pause`, { options });
197
+ }
198
+ /** Resume an ad set `POST /ads/ad-sets/{id}/resume` */
199
+ resumeSet(id, options) {
200
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/resume`, { options });
201
+ }
202
+ /** Duplicate an ad set `POST /ads/ad-sets/{id}/duplicate` */
203
+ duplicateSet(id, options) {
204
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/duplicate`, { options });
205
+ }
206
+ /** Archive an ad set `POST /ads/ad-sets/{id}/archive` */
207
+ archiveSet(id, options) {
208
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/archive`, { options });
209
+ }
210
+ /** List ads `GET /ads/ads` */
211
+ list(query, options) {
212
+ return this._client.request("GET", "/ads/ads", { query, options });
213
+ }
214
+ /** Get an ad `GET /ads/ads/{id}` */
215
+ get(id, options) {
216
+ return this._client.request("GET", `/ads/ads/${encodeURIComponent(id)}`, { options });
217
+ }
218
+ /** Delete an ad `DELETE /ads/ads/{id}` */
219
+ delete(id, options) {
220
+ return this._client.request("DELETE", `/ads/ads/${encodeURIComponent(id)}`, { options });
221
+ }
222
+ /** Pause an ad `POST /ads/ads/{id}/pause` */
223
+ pause(id, options) {
224
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/pause`, { options });
225
+ }
226
+ /** Resume an ad `POST /ads/ads/{id}/resume` */
227
+ resume(id, options) {
228
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/resume`, { options });
229
+ }
230
+ /** Duplicate an ad `POST /ads/ads/{id}/duplicate` */
231
+ duplicate(id, options) {
232
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/duplicate`, { options });
233
+ }
234
+ /** Archive an ad `POST /ads/ads/{id}/archive` */
235
+ archive(id, options) {
236
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/archive`, { options });
237
+ }
238
+ /** List audiences `GET /ads/audiences` */
239
+ listAudiences(query, options) {
240
+ return this._client.request("GET", "/ads/audiences", { query, options });
241
+ }
242
+ /** Create an audience `POST /ads/audiences` */
243
+ createAudience(body, options) {
244
+ return this._client.request("POST", "/ads/audiences", { body, options });
245
+ }
246
+ /** List pixels / conversion destinations `GET /ads/pixels` */
247
+ listPixels(query, options) {
248
+ return this._client.request("GET", "/ads/pixels", { query, options });
249
+ }
250
+ /** List lead forms `GET /ads/lead-forms` */
251
+ listLeadForms(query, options) {
252
+ return this._client.request("GET", "/ads/lead-forms", { query, options });
253
+ }
254
+ /** Create a lead form `POST /ads/lead-forms` */
255
+ createLeadForm(body, options) {
256
+ return this._client.request("POST", "/ads/lead-forms", { body, options });
257
+ }
258
+ /** List creatives `GET /ads/creatives` */
259
+ listCreatives(query, options) {
260
+ return this._client.request("GET", "/ads/creatives", { query, options });
261
+ }
262
+ /** Create a creative `POST /ads/creatives` */
263
+ createCreative(body, options) {
264
+ return this._client.request("POST", "/ads/creatives", { body, options });
265
+ }
266
+ /** Update a creative `PATCH /ads/creatives/{id}` */
267
+ updateCreative(id, body, options) {
268
+ return this._client.request("PATCH", `/ads/creatives/${encodeURIComponent(id)}`, { body, options });
269
+ }
270
+ /** Delete a creative `DELETE /ads/creatives/{id}` */
271
+ deleteCreative(id, options) {
272
+ return this._client.request("DELETE", `/ads/creatives/${encodeURIComponent(id)}`, { options });
273
+ }
274
+ /** List connected ad accounts `GET /ads/accounts` */
275
+ listAccounts(options) {
276
+ return this._client.request("GET", "/ads/accounts", { options });
277
+ }
278
+ /** Account health and rate-limit diagnostics `GET /ads/accounts/diagnostics` */
279
+ accountsDiagnostics(options) {
280
+ return this._client.request("GET", "/ads/accounts/diagnostics", { options });
281
+ }
282
+ /** List audit log entries `GET /ads/audit-log` */
283
+ listAuditLog(query, options) {
284
+ return this._client.request("GET", "/ads/audit-log", { query, options });
285
+ }
286
+ /** Audience-size estimate `POST /ads/estimate` */
287
+ audienceEstimate(body, options) {
288
+ return this._client.request("POST", "/ads/estimate", { body, options });
289
+ }
290
+ /** Trigger an account sync `POST /ads/sync` */
291
+ syncAccounts(options) {
292
+ return this._client.request("POST", "/ads/sync", { options });
293
+ }
294
+ /** Ads performance analytics `GET /ads/analytics` */
295
+ analytics(query, options) {
296
+ return this._client.request("GET", "/ads/analytics", { query, options });
297
+ }
298
+ /** Search Meta interest targeting `GET /ads/targeting-search` */
299
+ targetingSearch(query, options) {
300
+ return this._client.request("GET", "/ads/targeting-search", { query, options });
301
+ }
302
+ /** List a Page's organic posts `GET /ads/pages/{page_id}/posts` */
303
+ listPagePosts(pageId, query, options) {
304
+ return this._client.request("GET", `/ads/pages/${encodeURIComponent(pageId)}/posts`, { query, options });
305
+ }
306
+ };
138
307
  var CaptainResource = class {
139
308
  constructor(_client) {
140
309
  this._client = _client;
@@ -1530,6 +1699,7 @@ var WorkspacesResource = class {
1530
1699
  function createResources(client) {
1531
1700
  return {
1532
1701
  account: new AccountResource(client),
1702
+ ads: new AdsResource(client),
1533
1703
  captain: new CaptainResource(client),
1534
1704
  analytics: new AnalyticsResource(client),
1535
1705
  articles: new ArticlesResource(client),
@@ -1572,6 +1742,7 @@ var SmartlyQ = class {
1572
1742
  var index_default = SmartlyQ;
1573
1743
  export {
1574
1744
  AccountResource,
1745
+ AdsResource,
1575
1746
  AnalyticsResource,
1576
1747
  ArticlesResource,
1577
1748
  AudioResource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartlyqofficial/node",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Official Node.js SDK for the SmartlyQ API - social posting, AI content generation, SEO, CRM, and more.",
5
5
  "keywords": [
6
6
  "smartlyq",