@zernio/node 0.2.32 → 0.2.34
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 +29 -0
- package/dist/index.d.mts +610 -16
- package/dist/index.d.ts +610 -16
- package/dist/index.js +134 -0
- package/dist/index.mjs +134 -0
- package/package.json +1 -1
- package/src/client.ts +52 -0
- package/src/generated/sdk.gen.ts +194 -1
- package/src/generated/types.gen.ts +635 -15
package/dist/index.js
CHANGED
|
@@ -1753,6 +1753,108 @@ var listCommentAutomationLogs = (options) => {
|
|
|
1753
1753
|
url: "/v1/comment-automations/{automationId}/logs"
|
|
1754
1754
|
});
|
|
1755
1755
|
};
|
|
1756
|
+
var listAds = (options) => {
|
|
1757
|
+
return (options?.client ?? client).get({
|
|
1758
|
+
...options,
|
|
1759
|
+
url: "/v1/ads"
|
|
1760
|
+
});
|
|
1761
|
+
};
|
|
1762
|
+
var listAdCampaigns = (options) => {
|
|
1763
|
+
return (options?.client ?? client).get({
|
|
1764
|
+
...options,
|
|
1765
|
+
url: "/v1/ads/campaigns"
|
|
1766
|
+
});
|
|
1767
|
+
};
|
|
1768
|
+
var updateAdCampaignStatus = (options) => {
|
|
1769
|
+
return (options?.client ?? client).put({
|
|
1770
|
+
...options,
|
|
1771
|
+
url: "/v1/ads/campaigns/{campaignId}/status"
|
|
1772
|
+
});
|
|
1773
|
+
};
|
|
1774
|
+
var getAd = (options) => {
|
|
1775
|
+
return (options?.client ?? client).get({
|
|
1776
|
+
...options,
|
|
1777
|
+
url: "/v1/ads/{adId}"
|
|
1778
|
+
});
|
|
1779
|
+
};
|
|
1780
|
+
var updateAd = (options) => {
|
|
1781
|
+
return (options?.client ?? client).put({
|
|
1782
|
+
...options,
|
|
1783
|
+
url: "/v1/ads/{adId}"
|
|
1784
|
+
});
|
|
1785
|
+
};
|
|
1786
|
+
var deleteAd = (options) => {
|
|
1787
|
+
return (options?.client ?? client).delete({
|
|
1788
|
+
...options,
|
|
1789
|
+
url: "/v1/ads/{adId}"
|
|
1790
|
+
});
|
|
1791
|
+
};
|
|
1792
|
+
var getAdAnalytics = (options) => {
|
|
1793
|
+
return (options?.client ?? client).get({
|
|
1794
|
+
...options,
|
|
1795
|
+
url: "/v1/ads/{adId}/analytics"
|
|
1796
|
+
});
|
|
1797
|
+
};
|
|
1798
|
+
var listAdAccounts = (options) => {
|
|
1799
|
+
return (options?.client ?? client).get({
|
|
1800
|
+
...options,
|
|
1801
|
+
url: "/v1/ads/accounts"
|
|
1802
|
+
});
|
|
1803
|
+
};
|
|
1804
|
+
var boostPost = (options) => {
|
|
1805
|
+
return (options?.client ?? client).post({
|
|
1806
|
+
...options,
|
|
1807
|
+
url: "/v1/ads/boost"
|
|
1808
|
+
});
|
|
1809
|
+
};
|
|
1810
|
+
var createStandaloneAd = (options) => {
|
|
1811
|
+
return (options?.client ?? client).post({
|
|
1812
|
+
...options,
|
|
1813
|
+
url: "/v1/ads/create"
|
|
1814
|
+
});
|
|
1815
|
+
};
|
|
1816
|
+
var syncExternalAds = (options) => {
|
|
1817
|
+
return (options?.client ?? client).post({
|
|
1818
|
+
...options,
|
|
1819
|
+
url: "/v1/ads/sync"
|
|
1820
|
+
});
|
|
1821
|
+
};
|
|
1822
|
+
var searchAdInterests = (options) => {
|
|
1823
|
+
return (options?.client ?? client).get({
|
|
1824
|
+
...options,
|
|
1825
|
+
url: "/v1/ads/interests"
|
|
1826
|
+
});
|
|
1827
|
+
};
|
|
1828
|
+
var listAdAudiences = (options) => {
|
|
1829
|
+
return (options?.client ?? client).get({
|
|
1830
|
+
...options,
|
|
1831
|
+
url: "/v1/ads/audiences"
|
|
1832
|
+
});
|
|
1833
|
+
};
|
|
1834
|
+
var createAdAudience = (options) => {
|
|
1835
|
+
return (options?.client ?? client).post({
|
|
1836
|
+
...options,
|
|
1837
|
+
url: "/v1/ads/audiences"
|
|
1838
|
+
});
|
|
1839
|
+
};
|
|
1840
|
+
var getAdAudience = (options) => {
|
|
1841
|
+
return (options?.client ?? client).get({
|
|
1842
|
+
...options,
|
|
1843
|
+
url: "/v1/ads/audiences/{audienceId}"
|
|
1844
|
+
});
|
|
1845
|
+
};
|
|
1846
|
+
var deleteAdAudience = (options) => {
|
|
1847
|
+
return (options?.client ?? client).delete({
|
|
1848
|
+
...options,
|
|
1849
|
+
url: "/v1/ads/audiences/{audienceId}"
|
|
1850
|
+
});
|
|
1851
|
+
};
|
|
1852
|
+
var addUsersToAdAudience = (options) => {
|
|
1853
|
+
return (options?.client ?? client).post({
|
|
1854
|
+
...options,
|
|
1855
|
+
url: "/v1/ads/audiences/{audienceId}/users"
|
|
1856
|
+
});
|
|
1857
|
+
};
|
|
1756
1858
|
|
|
1757
1859
|
// src/errors.ts
|
|
1758
1860
|
var ZernioApiError = class _ZernioApiError extends Error {
|
|
@@ -2284,6 +2386,38 @@ var Zernio = class {
|
|
|
2284
2386
|
deleteCommentAutomation,
|
|
2285
2387
|
listCommentAutomationLogs
|
|
2286
2388
|
};
|
|
2389
|
+
/**
|
|
2390
|
+
* ads API
|
|
2391
|
+
*/
|
|
2392
|
+
this.ads = {
|
|
2393
|
+
listAds,
|
|
2394
|
+
getAd,
|
|
2395
|
+
updateAd,
|
|
2396
|
+
deleteAd,
|
|
2397
|
+
getAdAnalytics,
|
|
2398
|
+
listAdAccounts,
|
|
2399
|
+
boostPost,
|
|
2400
|
+
createStandaloneAd,
|
|
2401
|
+
syncExternalAds,
|
|
2402
|
+
searchAdInterests
|
|
2403
|
+
};
|
|
2404
|
+
/**
|
|
2405
|
+
* adcampaigns API
|
|
2406
|
+
*/
|
|
2407
|
+
this.adcampaigns = {
|
|
2408
|
+
listAdCampaigns,
|
|
2409
|
+
updateAdCampaignStatus
|
|
2410
|
+
};
|
|
2411
|
+
/**
|
|
2412
|
+
* adaudiences API
|
|
2413
|
+
*/
|
|
2414
|
+
this.adaudiences = {
|
|
2415
|
+
listAdAudiences,
|
|
2416
|
+
createAdAudience,
|
|
2417
|
+
getAdAudience,
|
|
2418
|
+
deleteAdAudience,
|
|
2419
|
+
addUsersToAdAudience
|
|
2420
|
+
};
|
|
2287
2421
|
const apiKey = options.apiKey ?? process.env["ZERNIO_API_KEY"] ?? process.env["LATE_API_KEY"];
|
|
2288
2422
|
if (!apiKey) {
|
|
2289
2423
|
throw new ZernioApiError(
|
package/dist/index.mjs
CHANGED
|
@@ -1722,6 +1722,108 @@ var listCommentAutomationLogs = (options) => {
|
|
|
1722
1722
|
url: "/v1/comment-automations/{automationId}/logs"
|
|
1723
1723
|
});
|
|
1724
1724
|
};
|
|
1725
|
+
var listAds = (options) => {
|
|
1726
|
+
return (options?.client ?? client).get({
|
|
1727
|
+
...options,
|
|
1728
|
+
url: "/v1/ads"
|
|
1729
|
+
});
|
|
1730
|
+
};
|
|
1731
|
+
var listAdCampaigns = (options) => {
|
|
1732
|
+
return (options?.client ?? client).get({
|
|
1733
|
+
...options,
|
|
1734
|
+
url: "/v1/ads/campaigns"
|
|
1735
|
+
});
|
|
1736
|
+
};
|
|
1737
|
+
var updateAdCampaignStatus = (options) => {
|
|
1738
|
+
return (options?.client ?? client).put({
|
|
1739
|
+
...options,
|
|
1740
|
+
url: "/v1/ads/campaigns/{campaignId}/status"
|
|
1741
|
+
});
|
|
1742
|
+
};
|
|
1743
|
+
var getAd = (options) => {
|
|
1744
|
+
return (options?.client ?? client).get({
|
|
1745
|
+
...options,
|
|
1746
|
+
url: "/v1/ads/{adId}"
|
|
1747
|
+
});
|
|
1748
|
+
};
|
|
1749
|
+
var updateAd = (options) => {
|
|
1750
|
+
return (options?.client ?? client).put({
|
|
1751
|
+
...options,
|
|
1752
|
+
url: "/v1/ads/{adId}"
|
|
1753
|
+
});
|
|
1754
|
+
};
|
|
1755
|
+
var deleteAd = (options) => {
|
|
1756
|
+
return (options?.client ?? client).delete({
|
|
1757
|
+
...options,
|
|
1758
|
+
url: "/v1/ads/{adId}"
|
|
1759
|
+
});
|
|
1760
|
+
};
|
|
1761
|
+
var getAdAnalytics = (options) => {
|
|
1762
|
+
return (options?.client ?? client).get({
|
|
1763
|
+
...options,
|
|
1764
|
+
url: "/v1/ads/{adId}/analytics"
|
|
1765
|
+
});
|
|
1766
|
+
};
|
|
1767
|
+
var listAdAccounts = (options) => {
|
|
1768
|
+
return (options?.client ?? client).get({
|
|
1769
|
+
...options,
|
|
1770
|
+
url: "/v1/ads/accounts"
|
|
1771
|
+
});
|
|
1772
|
+
};
|
|
1773
|
+
var boostPost = (options) => {
|
|
1774
|
+
return (options?.client ?? client).post({
|
|
1775
|
+
...options,
|
|
1776
|
+
url: "/v1/ads/boost"
|
|
1777
|
+
});
|
|
1778
|
+
};
|
|
1779
|
+
var createStandaloneAd = (options) => {
|
|
1780
|
+
return (options?.client ?? client).post({
|
|
1781
|
+
...options,
|
|
1782
|
+
url: "/v1/ads/create"
|
|
1783
|
+
});
|
|
1784
|
+
};
|
|
1785
|
+
var syncExternalAds = (options) => {
|
|
1786
|
+
return (options?.client ?? client).post({
|
|
1787
|
+
...options,
|
|
1788
|
+
url: "/v1/ads/sync"
|
|
1789
|
+
});
|
|
1790
|
+
};
|
|
1791
|
+
var searchAdInterests = (options) => {
|
|
1792
|
+
return (options?.client ?? client).get({
|
|
1793
|
+
...options,
|
|
1794
|
+
url: "/v1/ads/interests"
|
|
1795
|
+
});
|
|
1796
|
+
};
|
|
1797
|
+
var listAdAudiences = (options) => {
|
|
1798
|
+
return (options?.client ?? client).get({
|
|
1799
|
+
...options,
|
|
1800
|
+
url: "/v1/ads/audiences"
|
|
1801
|
+
});
|
|
1802
|
+
};
|
|
1803
|
+
var createAdAudience = (options) => {
|
|
1804
|
+
return (options?.client ?? client).post({
|
|
1805
|
+
...options,
|
|
1806
|
+
url: "/v1/ads/audiences"
|
|
1807
|
+
});
|
|
1808
|
+
};
|
|
1809
|
+
var getAdAudience = (options) => {
|
|
1810
|
+
return (options?.client ?? client).get({
|
|
1811
|
+
...options,
|
|
1812
|
+
url: "/v1/ads/audiences/{audienceId}"
|
|
1813
|
+
});
|
|
1814
|
+
};
|
|
1815
|
+
var deleteAdAudience = (options) => {
|
|
1816
|
+
return (options?.client ?? client).delete({
|
|
1817
|
+
...options,
|
|
1818
|
+
url: "/v1/ads/audiences/{audienceId}"
|
|
1819
|
+
});
|
|
1820
|
+
};
|
|
1821
|
+
var addUsersToAdAudience = (options) => {
|
|
1822
|
+
return (options?.client ?? client).post({
|
|
1823
|
+
...options,
|
|
1824
|
+
url: "/v1/ads/audiences/{audienceId}/users"
|
|
1825
|
+
});
|
|
1826
|
+
};
|
|
1725
1827
|
|
|
1726
1828
|
// src/errors.ts
|
|
1727
1829
|
var ZernioApiError = class _ZernioApiError extends Error {
|
|
@@ -2253,6 +2355,38 @@ var Zernio = class {
|
|
|
2253
2355
|
deleteCommentAutomation,
|
|
2254
2356
|
listCommentAutomationLogs
|
|
2255
2357
|
};
|
|
2358
|
+
/**
|
|
2359
|
+
* ads API
|
|
2360
|
+
*/
|
|
2361
|
+
this.ads = {
|
|
2362
|
+
listAds,
|
|
2363
|
+
getAd,
|
|
2364
|
+
updateAd,
|
|
2365
|
+
deleteAd,
|
|
2366
|
+
getAdAnalytics,
|
|
2367
|
+
listAdAccounts,
|
|
2368
|
+
boostPost,
|
|
2369
|
+
createStandaloneAd,
|
|
2370
|
+
syncExternalAds,
|
|
2371
|
+
searchAdInterests
|
|
2372
|
+
};
|
|
2373
|
+
/**
|
|
2374
|
+
* adcampaigns API
|
|
2375
|
+
*/
|
|
2376
|
+
this.adcampaigns = {
|
|
2377
|
+
listAdCampaigns,
|
|
2378
|
+
updateAdCampaignStatus
|
|
2379
|
+
};
|
|
2380
|
+
/**
|
|
2381
|
+
* adaudiences API
|
|
2382
|
+
*/
|
|
2383
|
+
this.adaudiences = {
|
|
2384
|
+
listAdAudiences,
|
|
2385
|
+
createAdAudience,
|
|
2386
|
+
getAdAudience,
|
|
2387
|
+
deleteAdAudience,
|
|
2388
|
+
addUsersToAdAudience
|
|
2389
|
+
};
|
|
2256
2390
|
const apiKey = options.apiKey ?? process.env["ZERNIO_API_KEY"] ?? process.env["LATE_API_KEY"];
|
|
2257
2391
|
if (!apiKey) {
|
|
2258
2392
|
throw new ZernioApiError(
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -3,10 +3,12 @@ import {
|
|
|
3
3
|
activateSequence,
|
|
4
4
|
addBroadcastRecipients,
|
|
5
5
|
addMessageReaction,
|
|
6
|
+
addUsersToAdAudience,
|
|
6
7
|
addWhatsAppBroadcastRecipients,
|
|
7
8
|
addWhatsAppGroupParticipants,
|
|
8
9
|
approveWhatsAppGroupJoinRequests,
|
|
9
10
|
bookmarkPost,
|
|
11
|
+
boostPost,
|
|
10
12
|
bulkCreateContacts,
|
|
11
13
|
bulkDeleteWhatsAppContacts,
|
|
12
14
|
bulkUpdateWhatsAppContacts,
|
|
@@ -19,6 +21,7 @@ import {
|
|
|
19
21
|
connectBlueskyCredentials,
|
|
20
22
|
connectWhatsAppCredentials,
|
|
21
23
|
createAccountGroup,
|
|
24
|
+
createAdAudience,
|
|
22
25
|
createApiKey,
|
|
23
26
|
createBroadcast,
|
|
24
27
|
createCommentAutomation,
|
|
@@ -31,6 +34,7 @@ import {
|
|
|
31
34
|
createProfile,
|
|
32
35
|
createQueueSlot,
|
|
33
36
|
createSequence,
|
|
37
|
+
createStandaloneAd,
|
|
34
38
|
createWebhookSettings,
|
|
35
39
|
createWhatsAppBroadcast,
|
|
36
40
|
createWhatsAppContact,
|
|
@@ -39,6 +43,8 @@ import {
|
|
|
39
43
|
createWhatsAppTemplate,
|
|
40
44
|
deleteAccount,
|
|
41
45
|
deleteAccountGroup,
|
|
46
|
+
deleteAd,
|
|
47
|
+
deleteAdAudience,
|
|
42
48
|
deleteApiKey,
|
|
43
49
|
deleteBroadcast,
|
|
44
50
|
deleteCommentAutomation,
|
|
@@ -73,6 +79,9 @@ import {
|
|
|
73
79
|
enrollContacts,
|
|
74
80
|
followUser,
|
|
75
81
|
getAccountHealth,
|
|
82
|
+
getAd,
|
|
83
|
+
getAdAnalytics,
|
|
84
|
+
getAdAudience,
|
|
76
85
|
getAllAccountsHealth,
|
|
77
86
|
getAnalytics,
|
|
78
87
|
getBestTimeToPost,
|
|
@@ -145,6 +154,10 @@ import {
|
|
|
145
154
|
likeInboxComment,
|
|
146
155
|
listAccountGroups,
|
|
147
156
|
listAccounts,
|
|
157
|
+
listAdAccounts,
|
|
158
|
+
listAdAudiences,
|
|
159
|
+
listAdCampaigns,
|
|
160
|
+
listAds,
|
|
148
161
|
listApiKeys,
|
|
149
162
|
listBroadcastRecipients,
|
|
150
163
|
listBroadcasts,
|
|
@@ -188,6 +201,7 @@ import {
|
|
|
188
201
|
retweetPost,
|
|
189
202
|
scheduleBroadcast,
|
|
190
203
|
scheduleWhatsAppBroadcast,
|
|
204
|
+
searchAdInterests,
|
|
191
205
|
searchReddit,
|
|
192
206
|
selectFacebookPage,
|
|
193
207
|
selectGoogleBusinessLocation,
|
|
@@ -204,6 +218,7 @@ import {
|
|
|
204
218
|
setInstagramIceBreakers,
|
|
205
219
|
setMessengerMenu,
|
|
206
220
|
setTelegramCommands,
|
|
221
|
+
syncExternalAds,
|
|
207
222
|
testWebhook,
|
|
208
223
|
undoRetweet,
|
|
209
224
|
unenrollContact,
|
|
@@ -213,6 +228,8 @@ import {
|
|
|
213
228
|
unpublishPost,
|
|
214
229
|
updateAccount,
|
|
215
230
|
updateAccountGroup,
|
|
231
|
+
updateAd,
|
|
232
|
+
updateAdCampaignStatus,
|
|
216
233
|
updateBroadcast,
|
|
217
234
|
updateCommentAutomation,
|
|
218
235
|
updateContact,
|
|
@@ -770,6 +787,41 @@ export class Zernio {
|
|
|
770
787
|
listCommentAutomationLogs: listCommentAutomationLogs,
|
|
771
788
|
};
|
|
772
789
|
|
|
790
|
+
/**
|
|
791
|
+
* ads API
|
|
792
|
+
*/
|
|
793
|
+
ads = {
|
|
794
|
+
listAds: listAds,
|
|
795
|
+
getAd: getAd,
|
|
796
|
+
updateAd: updateAd,
|
|
797
|
+
deleteAd: deleteAd,
|
|
798
|
+
getAdAnalytics: getAdAnalytics,
|
|
799
|
+
listAdAccounts: listAdAccounts,
|
|
800
|
+
boostPost: boostPost,
|
|
801
|
+
createStandaloneAd: createStandaloneAd,
|
|
802
|
+
syncExternalAds: syncExternalAds,
|
|
803
|
+
searchAdInterests: searchAdInterests,
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* adcampaigns API
|
|
808
|
+
*/
|
|
809
|
+
adcampaigns = {
|
|
810
|
+
listAdCampaigns: listAdCampaigns,
|
|
811
|
+
updateAdCampaignStatus: updateAdCampaignStatus,
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* adaudiences API
|
|
816
|
+
*/
|
|
817
|
+
adaudiences = {
|
|
818
|
+
listAdAudiences: listAdAudiences,
|
|
819
|
+
createAdAudience: createAdAudience,
|
|
820
|
+
getAdAudience: getAdAudience,
|
|
821
|
+
deleteAdAudience: deleteAdAudience,
|
|
822
|
+
addUsersToAdAudience: addUsersToAdAudience,
|
|
823
|
+
};
|
|
824
|
+
|
|
773
825
|
/**
|
|
774
826
|
* Create a new Zernio API client.
|
|
775
827
|
*
|