taboola-backstage-sdk 0.6.0 → 0.6.2
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.d.cts
CHANGED
|
@@ -2636,20 +2636,18 @@ declare class ItemsAPI {
|
|
|
2636
2636
|
*
|
|
2637
2637
|
* @param accountId - Account ID
|
|
2638
2638
|
* @param campaignId - Campaign ID
|
|
2639
|
-
* @param
|
|
2639
|
+
* @param items - Array of items to create
|
|
2640
2640
|
*
|
|
2641
2641
|
* @example
|
|
2642
2642
|
* ```typescript
|
|
2643
|
-
* const response = await client.items.bulkCreate('my-account', '12345',
|
|
2644
|
-
*
|
|
2645
|
-
*
|
|
2646
|
-
*
|
|
2647
|
-
* ],
|
|
2648
|
-
* });
|
|
2643
|
+
* const response = await client.items.bulkCreate('my-account', '12345', [
|
|
2644
|
+
* { url: 'https://example.com/page1', title: 'Title 1', thumbnail_url: '...' },
|
|
2645
|
+
* { url: 'https://example.com/page2', title: 'Title 2', thumbnail_url: '...' },
|
|
2646
|
+
* ]);
|
|
2649
2647
|
* console.log('Created', response.results.length, 'items');
|
|
2650
2648
|
* ```
|
|
2651
2649
|
*/
|
|
2652
|
-
bulkCreate(accountId: string, campaignId: string,
|
|
2650
|
+
bulkCreate(accountId: string, campaignId: string, items: BulkCreateItemData[]): Promise<BulkCreateItemsResponse>;
|
|
2653
2651
|
/**
|
|
2654
2652
|
* Bulk create items across multiple campaigns
|
|
2655
2653
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -2636,20 +2636,18 @@ declare class ItemsAPI {
|
|
|
2636
2636
|
*
|
|
2637
2637
|
* @param accountId - Account ID
|
|
2638
2638
|
* @param campaignId - Campaign ID
|
|
2639
|
-
* @param
|
|
2639
|
+
* @param items - Array of items to create
|
|
2640
2640
|
*
|
|
2641
2641
|
* @example
|
|
2642
2642
|
* ```typescript
|
|
2643
|
-
* const response = await client.items.bulkCreate('my-account', '12345',
|
|
2644
|
-
*
|
|
2645
|
-
*
|
|
2646
|
-
*
|
|
2647
|
-
* ],
|
|
2648
|
-
* });
|
|
2643
|
+
* const response = await client.items.bulkCreate('my-account', '12345', [
|
|
2644
|
+
* { url: 'https://example.com/page1', title: 'Title 1', thumbnail_url: '...' },
|
|
2645
|
+
* { url: 'https://example.com/page2', title: 'Title 2', thumbnail_url: '...' },
|
|
2646
|
+
* ]);
|
|
2649
2647
|
* console.log('Created', response.results.length, 'items');
|
|
2650
2648
|
* ```
|
|
2651
2649
|
*/
|
|
2652
|
-
bulkCreate(accountId: string, campaignId: string,
|
|
2650
|
+
bulkCreate(accountId: string, campaignId: string, items: BulkCreateItemData[]): Promise<BulkCreateItemsResponse>;
|
|
2653
2651
|
/**
|
|
2654
2652
|
* Bulk create items across multiple campaigns
|
|
2655
2653
|
*
|
package/dist/index.js
CHANGED
|
@@ -625,7 +625,7 @@ var ItemsAPI = class {
|
|
|
625
625
|
* ```
|
|
626
626
|
*/
|
|
627
627
|
async create(accountId, campaignId, item) {
|
|
628
|
-
return this.http.post(`${accountId}/campaigns/${campaignId}/items
|
|
628
|
+
return this.http.post(`${accountId}/campaigns/${campaignId}/items`, item);
|
|
629
629
|
}
|
|
630
630
|
/**
|
|
631
631
|
* Update an existing item (static or motion ad)
|
|
@@ -725,23 +725,21 @@ var ItemsAPI = class {
|
|
|
725
725
|
*
|
|
726
726
|
* @param accountId - Account ID
|
|
727
727
|
* @param campaignId - Campaign ID
|
|
728
|
-
* @param
|
|
728
|
+
* @param items - Array of items to create
|
|
729
729
|
*
|
|
730
730
|
* @example
|
|
731
731
|
* ```typescript
|
|
732
|
-
* const response = await client.items.bulkCreate('my-account', '12345',
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
* ],
|
|
737
|
-
* });
|
|
732
|
+
* const response = await client.items.bulkCreate('my-account', '12345', [
|
|
733
|
+
* { url: 'https://example.com/page1', title: 'Title 1', thumbnail_url: '...' },
|
|
734
|
+
* { url: 'https://example.com/page2', title: 'Title 2', thumbnail_url: '...' },
|
|
735
|
+
* ]);
|
|
738
736
|
* console.log('Created', response.results.length, 'items');
|
|
739
737
|
* ```
|
|
740
738
|
*/
|
|
741
|
-
async bulkCreate(accountId, campaignId,
|
|
739
|
+
async bulkCreate(accountId, campaignId, items) {
|
|
742
740
|
return this.http.post(
|
|
743
741
|
`${accountId}/campaigns/${campaignId}/items/mass`,
|
|
744
|
-
|
|
742
|
+
{ collection: items }
|
|
745
743
|
);
|
|
746
744
|
}
|
|
747
745
|
/**
|