@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/README.md CHANGED
@@ -102,6 +102,52 @@ All methods below are available on the client. Full request/response documentati
102
102
  | `sq.account.getMeBalance()` | `GET /me/balance` | Get wallet balance |
103
103
  | `sq.account.getBilling()` | `GET /me/billing` | Billing overview |
104
104
 
105
+ ### Ads
106
+
107
+ | Method | Endpoint | Description |
108
+ | --- | --- | --- |
109
+ | `sq.ads.listCampaigns(query?)` | `GET /ads/campaigns` | List campaigns |
110
+ | `sq.ads.createCampaign(body)` | `POST /ads/campaigns` | Create a campaign |
111
+ | `sq.ads.getCampaign(id)` | `GET /ads/campaigns/{id}` | Get a campaign |
112
+ | `sq.ads.updateCampaign(id, body)` | `PATCH /ads/campaigns/{id}` | Update a campaign |
113
+ | `sq.ads.deleteCampaign(id)` | `DELETE /ads/campaigns/{id}` | Delete a campaign |
114
+ | `sq.ads.pauseCampaign(id)` | `POST /ads/campaigns/{id}/pause` | Pause a campaign |
115
+ | `sq.ads.resumeCampaign(id)` | `POST /ads/campaigns/{id}/resume` | Resume a campaign |
116
+ | `sq.ads.duplicateCampaign(id)` | `POST /ads/campaigns/{id}/duplicate` | Duplicate a campaign |
117
+ | `sq.ads.archiveCampaign(id)` | `POST /ads/campaigns/{id}/archive` | Archive a campaign |
118
+ | `sq.ads.bulkCampaignStatus(body)` | `POST /ads/campaigns/bulk-status` | Bulk pause/resume campaigns |
119
+ | `sq.ads.listSets(query?)` | `GET /ads/ad-sets` | List ad sets |
120
+ | `sq.ads.getSet(id)` | `GET /ads/ad-sets/{id}` | Get an ad set |
121
+ | `sq.ads.deleteSet(id)` | `DELETE /ads/ad-sets/{id}` | Delete an ad set |
122
+ | `sq.ads.pauseSet(id)` | `POST /ads/ad-sets/{id}/pause` | Pause an ad set |
123
+ | `sq.ads.resumeSet(id)` | `POST /ads/ad-sets/{id}/resume` | Resume an ad set |
124
+ | `sq.ads.duplicateSet(id)` | `POST /ads/ad-sets/{id}/duplicate` | Duplicate an ad set |
125
+ | `sq.ads.archiveSet(id)` | `POST /ads/ad-sets/{id}/archive` | Archive an ad set |
126
+ | `sq.ads.list(query?)` | `GET /ads/ads` | List ads |
127
+ | `sq.ads.get(id)` | `GET /ads/ads/{id}` | Get an ad |
128
+ | `sq.ads.delete(id)` | `DELETE /ads/ads/{id}` | Delete an ad |
129
+ | `sq.ads.pause(id)` | `POST /ads/ads/{id}/pause` | Pause an ad |
130
+ | `sq.ads.resume(id)` | `POST /ads/ads/{id}/resume` | Resume an ad |
131
+ | `sq.ads.duplicate(id)` | `POST /ads/ads/{id}/duplicate` | Duplicate an ad |
132
+ | `sq.ads.archive(id)` | `POST /ads/ads/{id}/archive` | Archive an ad |
133
+ | `sq.ads.listAudiences(query?)` | `GET /ads/audiences` | List audiences |
134
+ | `sq.ads.createAudience(body)` | `POST /ads/audiences` | Create an audience |
135
+ | `sq.ads.listPixels(query?)` | `GET /ads/pixels` | List pixels / conversion destinations |
136
+ | `sq.ads.listLeadForms(query?)` | `GET /ads/lead-forms` | List lead forms |
137
+ | `sq.ads.createLeadForm(body)` | `POST /ads/lead-forms` | Create a lead form |
138
+ | `sq.ads.listCreatives(query?)` | `GET /ads/creatives` | List creatives |
139
+ | `sq.ads.createCreative(body)` | `POST /ads/creatives` | Create a creative |
140
+ | `sq.ads.updateCreative(id, body)` | `PATCH /ads/creatives/{id}` | Update a creative |
141
+ | `sq.ads.deleteCreative(id)` | `DELETE /ads/creatives/{id}` | Delete a creative |
142
+ | `sq.ads.listAccounts()` | `GET /ads/accounts` | List connected ad accounts |
143
+ | `sq.ads.accountsDiagnostics()` | `GET /ads/accounts/diagnostics` | Account health and rate-limit diagnostics |
144
+ | `sq.ads.listAuditLog(query?)` | `GET /ads/audit-log` | List audit log entries |
145
+ | `sq.ads.audienceEstimate(body)` | `POST /ads/estimate` | Audience-size estimate |
146
+ | `sq.ads.syncAccounts()` | `POST /ads/sync` | Trigger an account sync |
147
+ | `sq.ads.analytics(query?)` | `GET /ads/analytics` | Ads performance analytics |
148
+ | `sq.ads.targetingSearch(query?)` | `GET /ads/targeting-search` | Search Meta interest targeting |
149
+ | `sq.ads.listPagePosts(pageId, query?)` | `GET /ads/pages/{page_id}/posts` | List a Page's organic posts |
150
+
105
151
  ### AI Captain
106
152
 
107
153
  | Method | Endpoint | Description |
package/dist/index.cjs CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  AccountResource: () => AccountResource,
24
+ AdsResource: () => AdsResource,
24
25
  AnalyticsResource: () => AnalyticsResource,
25
26
  ArticlesResource: () => ArticlesResource,
26
27
  AudioResource: () => AudioResource,
@@ -195,6 +196,175 @@ var AccountResource = class {
195
196
  return this._client.request("GET", "/me/billing", { options });
196
197
  }
197
198
  };
199
+ var AdsResource = class {
200
+ constructor(_client) {
201
+ this._client = _client;
202
+ }
203
+ /** List campaigns `GET /ads/campaigns` */
204
+ listCampaigns(query, options) {
205
+ return this._client.request("GET", "/ads/campaigns", { query, options });
206
+ }
207
+ /** Create a campaign `POST /ads/campaigns` */
208
+ createCampaign(body, options) {
209
+ return this._client.request("POST", "/ads/campaigns", { body, options });
210
+ }
211
+ /** Get a campaign `GET /ads/campaigns/{id}` */
212
+ getCampaign(id, options) {
213
+ return this._client.request("GET", `/ads/campaigns/${encodeURIComponent(id)}`, { options });
214
+ }
215
+ /** Update a campaign `PATCH /ads/campaigns/{id}` */
216
+ updateCampaign(id, body, options) {
217
+ return this._client.request("PATCH", `/ads/campaigns/${encodeURIComponent(id)}`, { body, options });
218
+ }
219
+ /** Delete a campaign `DELETE /ads/campaigns/{id}` */
220
+ deleteCampaign(id, options) {
221
+ return this._client.request("DELETE", `/ads/campaigns/${encodeURIComponent(id)}`, { options });
222
+ }
223
+ /** Pause a campaign `POST /ads/campaigns/{id}/pause` */
224
+ pauseCampaign(id, options) {
225
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/pause`, { options });
226
+ }
227
+ /** Resume a campaign `POST /ads/campaigns/{id}/resume` */
228
+ resumeCampaign(id, options) {
229
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/resume`, { options });
230
+ }
231
+ /** Duplicate a campaign `POST /ads/campaigns/{id}/duplicate` */
232
+ duplicateCampaign(id, options) {
233
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/duplicate`, { options });
234
+ }
235
+ /** Archive a campaign `POST /ads/campaigns/{id}/archive` */
236
+ archiveCampaign(id, options) {
237
+ return this._client.request("POST", `/ads/campaigns/${encodeURIComponent(id)}/archive`, { options });
238
+ }
239
+ /** Bulk pause/resume campaigns `POST /ads/campaigns/bulk-status` */
240
+ bulkCampaignStatus(body, options) {
241
+ return this._client.request("POST", "/ads/campaigns/bulk-status", { body, options });
242
+ }
243
+ /** List ad sets `GET /ads/ad-sets` */
244
+ listSets(query, options) {
245
+ return this._client.request("GET", "/ads/ad-sets", { query, options });
246
+ }
247
+ /** Get an ad set `GET /ads/ad-sets/{id}` */
248
+ getSet(id, options) {
249
+ return this._client.request("GET", `/ads/ad-sets/${encodeURIComponent(id)}`, { options });
250
+ }
251
+ /** Delete an ad set `DELETE /ads/ad-sets/{id}` */
252
+ deleteSet(id, options) {
253
+ return this._client.request("DELETE", `/ads/ad-sets/${encodeURIComponent(id)}`, { options });
254
+ }
255
+ /** Pause an ad set `POST /ads/ad-sets/{id}/pause` */
256
+ pauseSet(id, options) {
257
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/pause`, { options });
258
+ }
259
+ /** Resume an ad set `POST /ads/ad-sets/{id}/resume` */
260
+ resumeSet(id, options) {
261
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/resume`, { options });
262
+ }
263
+ /** Duplicate an ad set `POST /ads/ad-sets/{id}/duplicate` */
264
+ duplicateSet(id, options) {
265
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/duplicate`, { options });
266
+ }
267
+ /** Archive an ad set `POST /ads/ad-sets/{id}/archive` */
268
+ archiveSet(id, options) {
269
+ return this._client.request("POST", `/ads/ad-sets/${encodeURIComponent(id)}/archive`, { options });
270
+ }
271
+ /** List ads `GET /ads/ads` */
272
+ list(query, options) {
273
+ return this._client.request("GET", "/ads/ads", { query, options });
274
+ }
275
+ /** Get an ad `GET /ads/ads/{id}` */
276
+ get(id, options) {
277
+ return this._client.request("GET", `/ads/ads/${encodeURIComponent(id)}`, { options });
278
+ }
279
+ /** Delete an ad `DELETE /ads/ads/{id}` */
280
+ delete(id, options) {
281
+ return this._client.request("DELETE", `/ads/ads/${encodeURIComponent(id)}`, { options });
282
+ }
283
+ /** Pause an ad `POST /ads/ads/{id}/pause` */
284
+ pause(id, options) {
285
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/pause`, { options });
286
+ }
287
+ /** Resume an ad `POST /ads/ads/{id}/resume` */
288
+ resume(id, options) {
289
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/resume`, { options });
290
+ }
291
+ /** Duplicate an ad `POST /ads/ads/{id}/duplicate` */
292
+ duplicate(id, options) {
293
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/duplicate`, { options });
294
+ }
295
+ /** Archive an ad `POST /ads/ads/{id}/archive` */
296
+ archive(id, options) {
297
+ return this._client.request("POST", `/ads/ads/${encodeURIComponent(id)}/archive`, { options });
298
+ }
299
+ /** List audiences `GET /ads/audiences` */
300
+ listAudiences(query, options) {
301
+ return this._client.request("GET", "/ads/audiences", { query, options });
302
+ }
303
+ /** Create an audience `POST /ads/audiences` */
304
+ createAudience(body, options) {
305
+ return this._client.request("POST", "/ads/audiences", { body, options });
306
+ }
307
+ /** List pixels / conversion destinations `GET /ads/pixels` */
308
+ listPixels(query, options) {
309
+ return this._client.request("GET", "/ads/pixels", { query, options });
310
+ }
311
+ /** List lead forms `GET /ads/lead-forms` */
312
+ listLeadForms(query, options) {
313
+ return this._client.request("GET", "/ads/lead-forms", { query, options });
314
+ }
315
+ /** Create a lead form `POST /ads/lead-forms` */
316
+ createLeadForm(body, options) {
317
+ return this._client.request("POST", "/ads/lead-forms", { body, options });
318
+ }
319
+ /** List creatives `GET /ads/creatives` */
320
+ listCreatives(query, options) {
321
+ return this._client.request("GET", "/ads/creatives", { query, options });
322
+ }
323
+ /** Create a creative `POST /ads/creatives` */
324
+ createCreative(body, options) {
325
+ return this._client.request("POST", "/ads/creatives", { body, options });
326
+ }
327
+ /** Update a creative `PATCH /ads/creatives/{id}` */
328
+ updateCreative(id, body, options) {
329
+ return this._client.request("PATCH", `/ads/creatives/${encodeURIComponent(id)}`, { body, options });
330
+ }
331
+ /** Delete a creative `DELETE /ads/creatives/{id}` */
332
+ deleteCreative(id, options) {
333
+ return this._client.request("DELETE", `/ads/creatives/${encodeURIComponent(id)}`, { options });
334
+ }
335
+ /** List connected ad accounts `GET /ads/accounts` */
336
+ listAccounts(options) {
337
+ return this._client.request("GET", "/ads/accounts", { options });
338
+ }
339
+ /** Account health and rate-limit diagnostics `GET /ads/accounts/diagnostics` */
340
+ accountsDiagnostics(options) {
341
+ return this._client.request("GET", "/ads/accounts/diagnostics", { options });
342
+ }
343
+ /** List audit log entries `GET /ads/audit-log` */
344
+ listAuditLog(query, options) {
345
+ return this._client.request("GET", "/ads/audit-log", { query, options });
346
+ }
347
+ /** Audience-size estimate `POST /ads/estimate` */
348
+ audienceEstimate(body, options) {
349
+ return this._client.request("POST", "/ads/estimate", { body, options });
350
+ }
351
+ /** Trigger an account sync `POST /ads/sync` */
352
+ syncAccounts(options) {
353
+ return this._client.request("POST", "/ads/sync", { options });
354
+ }
355
+ /** Ads performance analytics `GET /ads/analytics` */
356
+ analytics(query, options) {
357
+ return this._client.request("GET", "/ads/analytics", { query, options });
358
+ }
359
+ /** Search Meta interest targeting `GET /ads/targeting-search` */
360
+ targetingSearch(query, options) {
361
+ return this._client.request("GET", "/ads/targeting-search", { query, options });
362
+ }
363
+ /** List a Page's organic posts `GET /ads/pages/{page_id}/posts` */
364
+ listPagePosts(pageId, query, options) {
365
+ return this._client.request("GET", `/ads/pages/${encodeURIComponent(pageId)}/posts`, { query, options });
366
+ }
367
+ };
198
368
  var CaptainResource = class {
199
369
  constructor(_client) {
200
370
  this._client = _client;
@@ -1590,6 +1760,7 @@ var WorkspacesResource = class {
1590
1760
  function createResources(client) {
1591
1761
  return {
1592
1762
  account: new AccountResource(client),
1763
+ ads: new AdsResource(client),
1593
1764
  captain: new CaptainResource(client),
1594
1765
  analytics: new AnalyticsResource(client),
1595
1766
  articles: new ArticlesResource(client),
@@ -1633,6 +1804,7 @@ var index_default = SmartlyQ;
1633
1804
  // Annotate the CommonJS export names for ESM import in node:
1634
1805
  0 && (module.exports = {
1635
1806
  AccountResource,
1807
+ AdsResource,
1636
1808
  AnalyticsResource,
1637
1809
  ArticlesResource,
1638
1810
  AudioResource,