@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/dist/index.js
CHANGED
|
@@ -135,6 +135,159 @@ 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
|
+
/** List pixels / conversion destinations `GET /ads/pixels` */
|
|
243
|
+
listPixels(query, options) {
|
|
244
|
+
return this._client.request("GET", "/ads/pixels", { query, options });
|
|
245
|
+
}
|
|
246
|
+
/** List lead forms `GET /ads/lead-forms` */
|
|
247
|
+
listLeadForms(query, options) {
|
|
248
|
+
return this._client.request("GET", "/ads/lead-forms", { query, options });
|
|
249
|
+
}
|
|
250
|
+
/** Create a lead form `POST /ads/lead-forms` */
|
|
251
|
+
createLeadForm(body, options) {
|
|
252
|
+
return this._client.request("POST", "/ads/lead-forms", { body, options });
|
|
253
|
+
}
|
|
254
|
+
/** List creatives `GET /ads/creatives` */
|
|
255
|
+
listCreatives(query, options) {
|
|
256
|
+
return this._client.request("GET", "/ads/creatives", { query, options });
|
|
257
|
+
}
|
|
258
|
+
/** Create a creative `POST /ads/creatives` */
|
|
259
|
+
createCreative(body, options) {
|
|
260
|
+
return this._client.request("POST", "/ads/creatives", { body, options });
|
|
261
|
+
}
|
|
262
|
+
/** Update a creative `PATCH /ads/creatives/{id}` */
|
|
263
|
+
updateCreative(id, body, options) {
|
|
264
|
+
return this._client.request("PATCH", `/ads/creatives/${encodeURIComponent(id)}`, { body, options });
|
|
265
|
+
}
|
|
266
|
+
/** Delete a creative `DELETE /ads/creatives/{id}` */
|
|
267
|
+
deleteCreative(id, options) {
|
|
268
|
+
return this._client.request("DELETE", `/ads/creatives/${encodeURIComponent(id)}`, { options });
|
|
269
|
+
}
|
|
270
|
+
/** List connected ad accounts `GET /ads/accounts` */
|
|
271
|
+
listAccounts(options) {
|
|
272
|
+
return this._client.request("GET", "/ads/accounts", { options });
|
|
273
|
+
}
|
|
274
|
+
/** Account health and rate-limit diagnostics `GET /ads/accounts/diagnostics` */
|
|
275
|
+
accountsDiagnostics(options) {
|
|
276
|
+
return this._client.request("GET", "/ads/accounts/diagnostics", { options });
|
|
277
|
+
}
|
|
278
|
+
/** List audit log entries `GET /ads/audit-log` */
|
|
279
|
+
listAuditLog(query, options) {
|
|
280
|
+
return this._client.request("GET", "/ads/audit-log", { query, options });
|
|
281
|
+
}
|
|
282
|
+
/** Audience-size estimate `POST /ads/estimate` */
|
|
283
|
+
audienceEstimate(body, options) {
|
|
284
|
+
return this._client.request("POST", "/ads/estimate", { body, options });
|
|
285
|
+
}
|
|
286
|
+
/** Trigger an account sync `POST /ads/sync` */
|
|
287
|
+
syncAccounts(options) {
|
|
288
|
+
return this._client.request("POST", "/ads/sync", { options });
|
|
289
|
+
}
|
|
290
|
+
};
|
|
138
291
|
var CaptainResource = class {
|
|
139
292
|
constructor(_client) {
|
|
140
293
|
this._client = _client;
|
|
@@ -643,6 +796,10 @@ var MediaResource = class {
|
|
|
643
796
|
getUploadUrl(body, options) {
|
|
644
797
|
return this._client.request("POST", "/media/upload-url", { body, options });
|
|
645
798
|
}
|
|
799
|
+
/** Confirm a presigned upload `POST /media/{media_id}/confirm` */
|
|
800
|
+
confirmUpload(mediaId, options) {
|
|
801
|
+
return this._client.request("POST", `/media/${encodeURIComponent(mediaId)}/confirm`, { options });
|
|
802
|
+
}
|
|
646
803
|
/** Upload a file directly `POST /media/upload-direct` */
|
|
647
804
|
uploadDirect(body, options) {
|
|
648
805
|
return this._client.request("POST", "/media/upload-direct", { body, options });
|
|
@@ -1526,6 +1683,7 @@ var WorkspacesResource = class {
|
|
|
1526
1683
|
function createResources(client) {
|
|
1527
1684
|
return {
|
|
1528
1685
|
account: new AccountResource(client),
|
|
1686
|
+
ads: new AdsResource(client),
|
|
1529
1687
|
captain: new CaptainResource(client),
|
|
1530
1688
|
analytics: new AnalyticsResource(client),
|
|
1531
1689
|
articles: new ArticlesResource(client),
|
|
@@ -1568,6 +1726,7 @@ var SmartlyQ = class {
|
|
|
1568
1726
|
var index_default = SmartlyQ;
|
|
1569
1727
|
export {
|
|
1570
1728
|
AccountResource,
|
|
1729
|
+
AdsResource,
|
|
1571
1730
|
AnalyticsResource,
|
|
1572
1731
|
ArticlesResource,
|
|
1573
1732
|
AudioResource,
|