taboola-backstage-sdk 0.6.0 → 0.6.1
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.cjs +8 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -631,7 +631,7 @@ var ItemsAPI = class {
|
|
|
631
631
|
* ```
|
|
632
632
|
*/
|
|
633
633
|
async create(accountId, campaignId, item) {
|
|
634
|
-
return this.http.post(`${accountId}/campaigns/${campaignId}/items
|
|
634
|
+
return this.http.post(`${accountId}/campaigns/${campaignId}/items`, item);
|
|
635
635
|
}
|
|
636
636
|
/**
|
|
637
637
|
* Update an existing item (static or motion ad)
|
|
@@ -731,23 +731,21 @@ var ItemsAPI = class {
|
|
|
731
731
|
*
|
|
732
732
|
* @param accountId - Account ID
|
|
733
733
|
* @param campaignId - Campaign ID
|
|
734
|
-
* @param
|
|
734
|
+
* @param items - Array of items to create
|
|
735
735
|
*
|
|
736
736
|
* @example
|
|
737
737
|
* ```typescript
|
|
738
|
-
* const response = await client.items.bulkCreate('my-account', '12345',
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
* ],
|
|
743
|
-
* });
|
|
738
|
+
* const response = await client.items.bulkCreate('my-account', '12345', [
|
|
739
|
+
* { url: 'https://example.com/page1', title: 'Title 1', thumbnail_url: '...' },
|
|
740
|
+
* { url: 'https://example.com/page2', title: 'Title 2', thumbnail_url: '...' },
|
|
741
|
+
* ]);
|
|
744
742
|
* console.log('Created', response.results.length, 'items');
|
|
745
743
|
* ```
|
|
746
744
|
*/
|
|
747
|
-
async bulkCreate(accountId, campaignId,
|
|
745
|
+
async bulkCreate(accountId, campaignId, items) {
|
|
748
746
|
return this.http.post(
|
|
749
747
|
`${accountId}/campaigns/${campaignId}/items/mass`,
|
|
750
|
-
|
|
748
|
+
items
|
|
751
749
|
);
|
|
752
750
|
}
|
|
753
751
|
/**
|