@smartlyqofficial/node 0.1.23 → 0.1.25
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 +43 -0
- package/dist/index.cjs +160 -0
- package/dist/index.d.cts +1519 -14
- package/dist/index.d.ts +1519 -14
- package/dist/index.js +159 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,6 +102,48 @@ 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.listPixels(query?)` | `GET /ads/pixels` | List pixels / conversion destinations |
|
|
135
|
+
| `sq.ads.listLeadForms(query?)` | `GET /ads/lead-forms` | List lead forms |
|
|
136
|
+
| `sq.ads.createLeadForm(body)` | `POST /ads/lead-forms` | Create a lead form |
|
|
137
|
+
| `sq.ads.listCreatives(query?)` | `GET /ads/creatives` | List creatives |
|
|
138
|
+
| `sq.ads.createCreative(body)` | `POST /ads/creatives` | Create a creative |
|
|
139
|
+
| `sq.ads.updateCreative(id, body)` | `PATCH /ads/creatives/{id}` | Update a creative |
|
|
140
|
+
| `sq.ads.deleteCreative(id)` | `DELETE /ads/creatives/{id}` | Delete a creative |
|
|
141
|
+
| `sq.ads.listAccounts()` | `GET /ads/accounts` | List connected ad accounts |
|
|
142
|
+
| `sq.ads.accountsDiagnostics()` | `GET /ads/accounts/diagnostics` | Account health and rate-limit diagnostics |
|
|
143
|
+
| `sq.ads.listAuditLog(query?)` | `GET /ads/audit-log` | List audit log entries |
|
|
144
|
+
| `sq.ads.audienceEstimate(body)` | `POST /ads/estimate` | Audience-size estimate |
|
|
145
|
+
| `sq.ads.syncAccounts()` | `POST /ads/sync` | Trigger an account sync |
|
|
146
|
+
|
|
105
147
|
### AI Captain
|
|
106
148
|
|
|
107
149
|
| Method | Endpoint | Description |
|
|
@@ -292,6 +334,7 @@ All methods below are available on the client. Full request/response documentati
|
|
|
292
334
|
| `sq.media.get(mediaId)` | `GET /media/{media_id}` | Get media |
|
|
293
335
|
| `sq.media.delete(mediaId)` | `DELETE /media/{media_id}` | Delete media |
|
|
294
336
|
| `sq.media.getUploadUrl(body)` | `POST /media/upload-url` | Get presigned upload URL |
|
|
337
|
+
| `sq.media.confirmUpload(mediaId)` | `POST /media/{media_id}/confirm` | Confirm a presigned upload |
|
|
295
338
|
| `sq.media.uploadDirect(body)` | `POST /media/upload-direct` | Upload a file directly |
|
|
296
339
|
|
|
297
340
|
### Presentations
|
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,159 @@ 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
|
+
/** List pixels / conversion destinations `GET /ads/pixels` */
|
|
304
|
+
listPixels(query, options) {
|
|
305
|
+
return this._client.request("GET", "/ads/pixels", { query, options });
|
|
306
|
+
}
|
|
307
|
+
/** List lead forms `GET /ads/lead-forms` */
|
|
308
|
+
listLeadForms(query, options) {
|
|
309
|
+
return this._client.request("GET", "/ads/lead-forms", { query, options });
|
|
310
|
+
}
|
|
311
|
+
/** Create a lead form `POST /ads/lead-forms` */
|
|
312
|
+
createLeadForm(body, options) {
|
|
313
|
+
return this._client.request("POST", "/ads/lead-forms", { body, options });
|
|
314
|
+
}
|
|
315
|
+
/** List creatives `GET /ads/creatives` */
|
|
316
|
+
listCreatives(query, options) {
|
|
317
|
+
return this._client.request("GET", "/ads/creatives", { query, options });
|
|
318
|
+
}
|
|
319
|
+
/** Create a creative `POST /ads/creatives` */
|
|
320
|
+
createCreative(body, options) {
|
|
321
|
+
return this._client.request("POST", "/ads/creatives", { body, options });
|
|
322
|
+
}
|
|
323
|
+
/** Update a creative `PATCH /ads/creatives/{id}` */
|
|
324
|
+
updateCreative(id, body, options) {
|
|
325
|
+
return this._client.request("PATCH", `/ads/creatives/${encodeURIComponent(id)}`, { body, options });
|
|
326
|
+
}
|
|
327
|
+
/** Delete a creative `DELETE /ads/creatives/{id}` */
|
|
328
|
+
deleteCreative(id, options) {
|
|
329
|
+
return this._client.request("DELETE", `/ads/creatives/${encodeURIComponent(id)}`, { options });
|
|
330
|
+
}
|
|
331
|
+
/** List connected ad accounts `GET /ads/accounts` */
|
|
332
|
+
listAccounts(options) {
|
|
333
|
+
return this._client.request("GET", "/ads/accounts", { options });
|
|
334
|
+
}
|
|
335
|
+
/** Account health and rate-limit diagnostics `GET /ads/accounts/diagnostics` */
|
|
336
|
+
accountsDiagnostics(options) {
|
|
337
|
+
return this._client.request("GET", "/ads/accounts/diagnostics", { options });
|
|
338
|
+
}
|
|
339
|
+
/** List audit log entries `GET /ads/audit-log` */
|
|
340
|
+
listAuditLog(query, options) {
|
|
341
|
+
return this._client.request("GET", "/ads/audit-log", { query, options });
|
|
342
|
+
}
|
|
343
|
+
/** Audience-size estimate `POST /ads/estimate` */
|
|
344
|
+
audienceEstimate(body, options) {
|
|
345
|
+
return this._client.request("POST", "/ads/estimate", { body, options });
|
|
346
|
+
}
|
|
347
|
+
/** Trigger an account sync `POST /ads/sync` */
|
|
348
|
+
syncAccounts(options) {
|
|
349
|
+
return this._client.request("POST", "/ads/sync", { options });
|
|
350
|
+
}
|
|
351
|
+
};
|
|
198
352
|
var CaptainResource = class {
|
|
199
353
|
constructor(_client) {
|
|
200
354
|
this._client = _client;
|
|
@@ -703,6 +857,10 @@ var MediaResource = class {
|
|
|
703
857
|
getUploadUrl(body, options) {
|
|
704
858
|
return this._client.request("POST", "/media/upload-url", { body, options });
|
|
705
859
|
}
|
|
860
|
+
/** Confirm a presigned upload `POST /media/{media_id}/confirm` */
|
|
861
|
+
confirmUpload(mediaId, options) {
|
|
862
|
+
return this._client.request("POST", `/media/${encodeURIComponent(mediaId)}/confirm`, { options });
|
|
863
|
+
}
|
|
706
864
|
/** Upload a file directly `POST /media/upload-direct` */
|
|
707
865
|
uploadDirect(body, options) {
|
|
708
866
|
return this._client.request("POST", "/media/upload-direct", { body, options });
|
|
@@ -1586,6 +1744,7 @@ var WorkspacesResource = class {
|
|
|
1586
1744
|
function createResources(client) {
|
|
1587
1745
|
return {
|
|
1588
1746
|
account: new AccountResource(client),
|
|
1747
|
+
ads: new AdsResource(client),
|
|
1589
1748
|
captain: new CaptainResource(client),
|
|
1590
1749
|
analytics: new AnalyticsResource(client),
|
|
1591
1750
|
articles: new ArticlesResource(client),
|
|
@@ -1629,6 +1788,7 @@ var index_default = SmartlyQ;
|
|
|
1629
1788
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1630
1789
|
0 && (module.exports = {
|
|
1631
1790
|
AccountResource,
|
|
1791
|
+
AdsResource,
|
|
1632
1792
|
AnalyticsResource,
|
|
1633
1793
|
ArticlesResource,
|
|
1634
1794
|
AudioResource,
|