@pubnio/sdk 0.1.2 → 0.2.0

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 CHANGED
@@ -53,6 +53,179 @@ __export(exports_src, {
53
53
  });
54
54
  module.exports = __toCommonJS(exports_src);
55
55
 
56
+ // src/generated/sdk.gen.ts
57
+ var exports_sdk_gen = {};
58
+ __export(exports_sdk_gen, {
59
+ adsActivateCampaign: () => adsActivateCampaign,
60
+ adsArchiveCampaign: () => adsArchiveCampaign,
61
+ adsAttachAd: () => adsAttachAd,
62
+ adsConnectAccount: () => adsConnectAccount,
63
+ adsConnectApiKeyAccount: () => adsConnectApiKeyAccount,
64
+ adsCreateAdGroup: () => adsCreateAdGroup,
65
+ adsCreateBoost: () => adsCreateBoost,
66
+ adsCreateCampaignPlan: () => adsCreateCampaignPlan,
67
+ adsCreateCreative: () => adsCreateCreative,
68
+ adsDisconnectAccount: () => adsDisconnectAccount,
69
+ adsDuplicateCampaign: () => adsDuplicateCampaign,
70
+ adsGetAd: () => adsGetAd,
71
+ adsGetCampaignPlan: () => adsGetCampaignPlan,
72
+ adsGetCreative: () => adsGetCreative,
73
+ adsGetOperation: () => adsGetOperation,
74
+ adsGetSpendPolicy: () => adsGetSpendPolicy,
75
+ adsGetTree: () => adsGetTree,
76
+ adsListAccounts: () => adsListAccounts,
77
+ adsListAdGroups: () => adsListAdGroups,
78
+ adsListAds: () => adsListAds,
79
+ adsListCampaignPlans: () => adsListCampaignPlans,
80
+ adsListCampaigns: () => adsListCampaigns,
81
+ adsListCreatives: () => adsListCreatives,
82
+ adsListInsights: () => adsListInsights,
83
+ adsListWorkspaceCampaigns: () => adsListWorkspaceCampaigns,
84
+ adsListWorkspaceInsights: () => adsListWorkspaceInsights,
85
+ adsPauseCampaign: () => adsPauseCampaign,
86
+ adsRefreshInsights: () => adsRefreshInsights,
87
+ adsSelectAccount: () => adsSelectAccount,
88
+ adsSetAdGroupBudget: () => adsSetAdGroupBudget,
89
+ adsSetAdGroupStatus: () => adsSetAdGroupStatus,
90
+ adsSetAdStatus: () => adsSetAdStatus,
91
+ adsSetCampaignBudget: () => adsSetCampaignBudget,
92
+ adsSetKillSwitch: () => adsSetKillSwitch,
93
+ adsUpdateSpendPolicy: () => adsUpdateSpendPolicy,
94
+ adsValidateBoost: () => adsValidateBoost,
95
+ adsValidateCampaignPlan: () => adsValidateCampaignPlan,
96
+ analyticsAccountsGet: () => analyticsAccountsGet,
97
+ analyticsAccountsList: () => analyticsAccountsList,
98
+ analyticsCapabilitiesGet: () => analyticsCapabilitiesGet,
99
+ analyticsPostsGet: () => analyticsPostsGet,
100
+ analyticsPostsSeries: () => analyticsPostsSeries,
101
+ analyticsRefreshesCreate: () => analyticsRefreshesCreate,
102
+ analyticsRefreshesGet: () => analyticsRefreshesGet,
103
+ apiKeysCreate: () => apiKeysCreate,
104
+ apiKeysGet: () => apiKeysGet,
105
+ apiKeysList: () => apiKeysList,
106
+ apiKeysRevoke: () => apiKeysRevoke,
107
+ apiKeysUpdate: () => apiKeysUpdate,
108
+ auditActionsList: () => auditActionsList,
109
+ auditGet: () => auditGet,
110
+ auditList: () => auditList,
111
+ billingCheckoutCreate: () => billingCheckoutCreate,
112
+ billingGet: () => billingGet,
113
+ billingLedgerList: () => billingLedgerList,
114
+ billingPlansList: () => billingPlansList,
115
+ billingPortalCreate: () => billingPortalCreate,
116
+ billingSpendControlsUpdate: () => billingSpendControlsUpdate,
117
+ billingUsageGet: () => billingUsageGet,
118
+ capabilitiesCatalog: () => capabilitiesCatalog,
119
+ capabilitiesGet: () => capabilitiesGet,
120
+ capabilitiesList: () => capabilitiesList,
121
+ commentsCreate: () => commentsCreate,
122
+ inboxAttachmentsGet: () => inboxAttachmentsGet,
123
+ inboxCapabilitiesGet: () => inboxCapabilitiesGet,
124
+ inboxCommentsDelete: () => inboxCommentsDelete,
125
+ inboxCommentsGet: () => inboxCommentsGet,
126
+ inboxCommentsList: () => inboxCommentsList,
127
+ inboxCommentsModerate: () => inboxCommentsModerate,
128
+ inboxCommentsReply: () => inboxCommentsReply,
129
+ inboxConversationsGet: () => inboxConversationsGet,
130
+ inboxConversationsList: () => inboxConversationsList,
131
+ inboxConversationsUpdate: () => inboxConversationsUpdate,
132
+ inboxMentionsList: () => inboxMentionsList,
133
+ inboxMentionsReply: () => inboxMentionsReply,
134
+ inboxMessagesList: () => inboxMessagesList,
135
+ inboxMessagesSend: () => inboxMessagesSend,
136
+ inboxReviewsGet: () => inboxReviewsGet,
137
+ inboxReviewsList: () => inboxReviewsList,
138
+ inboxReviewsReply: () => inboxReviewsReply,
139
+ inboxSyncGet: () => inboxSyncGet,
140
+ inboxSyncStart: () => inboxSyncStart,
141
+ inboxUnreadCount: () => inboxUnreadCount,
142
+ integrationsBlueskySession: () => integrationsBlueskySession,
143
+ integrationsConnectionStatus: () => integrationsConnectionStatus,
144
+ integrationsDisconnect: () => integrationsDisconnect,
145
+ integrationsGetAccount: () => integrationsGetAccount,
146
+ integrationsGetInstagramAudio: () => integrationsGetInstagramAudio,
147
+ integrationsInstagramPublishingLimit: () => integrationsInstagramPublishingLimit,
148
+ integrationsList: () => integrationsList,
149
+ integrationsMoveAccount: () => integrationsMoveAccount,
150
+ integrationsPrepareConnection: () => integrationsPrepareConnection,
151
+ integrationsReconnect: () => integrationsReconnect,
152
+ integrationsSearchInstagramAudio: () => integrationsSearchInstagramAudio,
153
+ integrationsSetEnabled: () => integrationsSetEnabled,
154
+ limitsGet: () => limitsGet,
155
+ meInvitesAccept: () => meInvitesAccept,
156
+ meInvitesDecline: () => meInvitesDecline,
157
+ meInvitesList: () => meInvitesList,
158
+ mediaCompleteUpload: () => mediaCompleteUpload,
159
+ mediaDelete: () => mediaDelete,
160
+ mediaDownload: () => mediaDownload,
161
+ mediaGet: () => mediaGet,
162
+ mediaImport: () => mediaImport,
163
+ mediaList: () => mediaList,
164
+ mediaStartUpload: () => mediaStartUpload,
165
+ mediaStatus: () => mediaStatus,
166
+ mediaUpload: () => mediaUpload,
167
+ mediaUploadInline: () => mediaUploadInline,
168
+ mediaUploadPart: () => mediaUploadPart,
169
+ notificationsPreferencesGet: () => notificationsPreferencesGet,
170
+ notificationsPreferencesUpdate: () => notificationsPreferencesUpdate,
171
+ postsAttempts: () => postsAttempts,
172
+ postsCreate: () => postsCreate,
173
+ postsDelete: () => postsDelete,
174
+ postsGet: () => postsGet,
175
+ postsList: () => postsList,
176
+ postsPublish: () => postsPublish,
177
+ postsReconcile: () => postsReconcile,
178
+ postsRetry: () => postsRetry,
179
+ postsUpdate: () => postsUpdate,
180
+ postsValidate: () => postsValidate,
181
+ profileDeactivate: () => profileDeactivate,
182
+ profileGet: () => profileGet,
183
+ profileUpdate: () => profileUpdate,
184
+ profilesArchive: () => profilesArchive,
185
+ profilesCreate: () => profilesCreate,
186
+ profilesGet: () => profilesGet,
187
+ profilesList: () => profilesList,
188
+ profilesUpdate: () => profilesUpdate,
189
+ queuesArchive: () => queuesArchive,
190
+ queuesBlackoutsCreate: () => queuesBlackoutsCreate,
191
+ queuesBlackoutsDelete: () => queuesBlackoutsDelete,
192
+ queuesBlackoutsList: () => queuesBlackoutsList,
193
+ queuesCreate: () => queuesCreate,
194
+ queuesGet: () => queuesGet,
195
+ queuesList: () => queuesList,
196
+ queuesSkipsCreate: () => queuesSkipsCreate,
197
+ queuesSkipsDelete: () => queuesSkipsDelete,
198
+ queuesSkipsList: () => queuesSkipsList,
199
+ queuesSlotsNext: () => queuesSlotsNext,
200
+ queuesSlotsPreview: () => queuesSlotsPreview,
201
+ queuesSlotsReplace: () => queuesSlotsReplace,
202
+ queuesUpdate: () => queuesUpdate,
203
+ scheduleChange: () => scheduleChange,
204
+ scheduleList: () => scheduleList,
205
+ webhooksCreate: () => webhooksCreate,
206
+ webhooksDelete: () => webhooksDelete,
207
+ webhooksEventTypes: () => webhooksEventTypes,
208
+ webhooksGet: () => webhooksGet,
209
+ webhooksGetDelivery: () => webhooksGetDelivery,
210
+ webhooksList: () => webhooksList,
211
+ webhooksListDeliveries: () => webhooksListDeliveries,
212
+ webhooksReplayDelivery: () => webhooksReplayDelivery,
213
+ webhooksTest: () => webhooksTest,
214
+ webhooksUpdate: () => webhooksUpdate,
215
+ workspacesArchive: () => workspacesArchive,
216
+ workspacesCreate: () => workspacesCreate,
217
+ workspacesGet: () => workspacesGet,
218
+ workspacesInvitesCreate: () => workspacesInvitesCreate,
219
+ workspacesInvitesList: () => workspacesInvitesList,
220
+ workspacesInvitesResend: () => workspacesInvitesResend,
221
+ workspacesInvitesRevoke: () => workspacesInvitesRevoke,
222
+ workspacesList: () => workspacesList,
223
+ workspacesMembersList: () => workspacesMembersList,
224
+ workspacesMembersRemove: () => workspacesMembersRemove,
225
+ workspacesMembersUpdateRole: () => workspacesMembersUpdateRole,
226
+ workspacesUpdate: () => workspacesUpdate
227
+ });
228
+
56
229
  // ../protocol/src/accounts.ts
57
230
  var import_effect2 = require("effect");
58
231
 
@@ -237,6 +410,7 @@ var PROVIDERS = [
237
410
  "linkedin",
238
411
  "pinterest",
239
412
  "reddit",
413
+ "snapchat",
240
414
  "tiktok",
241
415
  "threads",
242
416
  "x",
@@ -253,7 +427,8 @@ var ACCOUNT_PROVIDERS = [
253
427
  "tiktok_ads",
254
428
  "linkedin_ads",
255
429
  "snapchat_ads",
256
- "amazon_ads"
430
+ "amazon_ads",
431
+ "openai_ads"
257
432
  ];
258
433
  var AccountProvider = import_effect7.Schema.Literals(ACCOUNT_PROVIDERS);
259
434
  var AmazonAdsRegion = import_effect7.Schema.Literals(["na", "eu", "fe"]);
@@ -1353,7 +1528,7 @@ var providerCatalog = {
1353
1528
  availability: "beta",
1354
1529
  authFamily: "bluesky",
1355
1530
  accountKinds: ["social_account"],
1356
- capabilities: { social_account: socialCapabilities },
1531
+ capabilities: { social_account: messagingCapabilities },
1357
1532
  approvalRequired: {},
1358
1533
  limited: {}
1359
1534
  },
@@ -1401,9 +1576,16 @@ var providerCatalog = {
1401
1576
  availability: "upcoming",
1402
1577
  authFamily: "reddit",
1403
1578
  accountKinds: ["social_account"],
1404
- capabilities: {
1405
- social_account: ["publish", "read_insights", "manage_comments"]
1406
- },
1579
+ capabilities: { social_account: messagingCapabilities },
1580
+ approvalRequired: {},
1581
+ limited: {}
1582
+ },
1583
+ snapchat: {
1584
+ label: "Snapchat",
1585
+ availability: "beta",
1586
+ authFamily: "snapchat",
1587
+ accountKinds: ["social_page"],
1588
+ capabilities: { social_page: ["publish"] },
1407
1589
  approvalRequired: {},
1408
1590
  limited: {}
1409
1591
  },
@@ -1475,6 +1657,7 @@ var accountProviderCatalog = {
1475
1657
  linkedin: { ...providerCatalog.linkedin, publishCapable: true },
1476
1658
  pinterest: { ...providerCatalog.pinterest, publishCapable: true },
1477
1659
  reddit: { ...providerCatalog.reddit, publishCapable: true },
1660
+ snapchat: { ...providerCatalog.snapchat, publishCapable: true },
1478
1661
  tiktok: { ...providerCatalog.tiktok, publishCapable: true },
1479
1662
  threads: { ...providerCatalog.threads, publishCapable: true },
1480
1663
  x: { ...providerCatalog.x, publishCapable: true },
@@ -1491,7 +1674,8 @@ var accountProviderCatalog = {
1491
1674
  capabilities: { ad_account: ["ads_read"] },
1492
1675
  approvalRequired: {},
1493
1676
  limited: {},
1494
- publishCapable: false
1677
+ publishCapable: false,
1678
+ integrationState: "connectable"
1495
1679
  },
1496
1680
  google_ads: {
1497
1681
  label: "Google Ads",
@@ -1501,7 +1685,8 @@ var accountProviderCatalog = {
1501
1685
  capabilities: { ad_account: ["ads_read"] },
1502
1686
  approvalRequired: {},
1503
1687
  limited: {},
1504
- publishCapable: false
1688
+ publishCapable: false,
1689
+ integrationState: "connectable"
1505
1690
  },
1506
1691
  reddit_ads: {
1507
1692
  label: "Reddit Ads",
@@ -1511,7 +1696,8 @@ var accountProviderCatalog = {
1511
1696
  capabilities: { ad_account: ["ads_read"] },
1512
1697
  approvalRequired: {},
1513
1698
  limited: {},
1514
- publishCapable: false
1699
+ publishCapable: false,
1700
+ integrationState: "connectable"
1515
1701
  },
1516
1702
  pinterest_ads: {
1517
1703
  label: "Pinterest Ads",
@@ -1521,7 +1707,8 @@ var accountProviderCatalog = {
1521
1707
  capabilities: { ad_account: ["ads_read"] },
1522
1708
  approvalRequired: {},
1523
1709
  limited: {},
1524
- publishCapable: false
1710
+ publishCapable: false,
1711
+ integrationState: "connectable"
1525
1712
  },
1526
1713
  tiktok_ads: {
1527
1714
  label: "TikTok Ads",
@@ -1531,7 +1718,8 @@ var accountProviderCatalog = {
1531
1718
  capabilities: { ad_account: ["ads_read"] },
1532
1719
  approvalRequired: {},
1533
1720
  limited: {},
1534
- publishCapable: false
1721
+ publishCapable: false,
1722
+ integrationState: "connectable"
1535
1723
  },
1536
1724
  linkedin_ads: {
1537
1725
  label: "LinkedIn Ads",
@@ -1541,7 +1729,8 @@ var accountProviderCatalog = {
1541
1729
  capabilities: { ad_account: ["ads_read"] },
1542
1730
  approvalRequired: {},
1543
1731
  limited: {},
1544
- publishCapable: false
1732
+ publishCapable: false,
1733
+ integrationState: "connectable"
1545
1734
  },
1546
1735
  snapchat_ads: {
1547
1736
  label: "Snapchat Ads",
@@ -1551,7 +1740,8 @@ var accountProviderCatalog = {
1551
1740
  capabilities: { ad_account: ["ads_read"] },
1552
1741
  approvalRequired: {},
1553
1742
  limited: {},
1554
- publishCapable: false
1743
+ publishCapable: false,
1744
+ integrationState: "connectable"
1555
1745
  },
1556
1746
  amazon_ads: {
1557
1747
  label: "Amazon Ads",
@@ -1561,7 +1751,19 @@ var accountProviderCatalog = {
1561
1751
  capabilities: { ad_account: ["ads_read"] },
1562
1752
  approvalRequired: {},
1563
1753
  limited: {},
1564
- publishCapable: false
1754
+ publishCapable: false,
1755
+ integrationState: "connectable"
1756
+ },
1757
+ openai_ads: {
1758
+ label: "OpenAI Ads",
1759
+ availability: "beta",
1760
+ authFamily: "openai_ads",
1761
+ accountKinds: ["ad_account"],
1762
+ capabilities: { ad_account: ["ads_read"] },
1763
+ approvalRequired: {},
1764
+ limited: {},
1765
+ publishCapable: false,
1766
+ integrationState: "connectable"
1565
1767
  }
1566
1768
  };
1567
1769
  var capabilityCatalog = PROVIDERS.flatMap((provider) => {
@@ -1788,6 +1990,13 @@ var AccountDetails = import_effect16.Schema.Union([
1788
1990
  kind: import_effect16.Schema.Literal("account"),
1789
1991
  username: import_effect16.Schema.String
1790
1992
  }),
1993
+ import_effect16.Schema.Struct({
1994
+ provider: import_effect16.Schema.Literal("snapchat"),
1995
+ kind: import_effect16.Schema.Literal("public_profile"),
1996
+ profileId: import_effect16.Schema.String,
1997
+ organizationId: import_effect16.Schema.optionalKey(import_effect16.Schema.String),
1998
+ username: import_effect16.Schema.optionalKey(import_effect16.Schema.String)
1999
+ }),
1791
2000
  import_effect16.Schema.Struct({
1792
2001
  provider: import_effect16.Schema.Literal("tiktok"),
1793
2002
  kind: import_effect16.Schema.Literal("account"),
@@ -1936,6 +2145,20 @@ var AccountDetails = import_effect16.Schema.Union([
1936
2145
  region: AmazonAdsRegion,
1937
2146
  businessId: import_effect16.Schema.optionalKey(import_effect16.Schema.String),
1938
2147
  managerId: import_effect16.Schema.optionalKey(import_effect16.Schema.String)
2148
+ }),
2149
+ import_effect16.Schema.Struct({
2150
+ provider: import_effect16.Schema.Literal("openai_ads"),
2151
+ kind: import_effect16.Schema.Literal("ad_account"),
2152
+ externalId: import_effect16.Schema.String,
2153
+ currency: import_effect16.Schema.String.check(import_effect16.Schema.isPattern(/^[A-Z]{3}$/)),
2154
+ timezone: import_effect16.Schema.String,
2155
+ status: import_effect16.Schema.Literals([
2156
+ "active",
2157
+ "disabled",
2158
+ "pending",
2159
+ "closed",
2160
+ "unknown"
2161
+ ])
1939
2162
  })
1940
2163
  ]);
1941
2164
  var ProviderAccount = import_effect16.Schema.Struct({
@@ -1967,7 +2190,8 @@ var AccountRef = import_effect17.Schema.Struct({ accountId: AccountId });
1967
2190
  var ConnectionRef = import_effect17.Schema.Struct({ connectionId: uuid3 });
1968
2191
  var ConnectionLaunch = import_effect17.Schema.Struct({
1969
2192
  attemptId: uuid3,
1970
- url: import_effect17.Schema.String
2193
+ url: import_effect17.Schema.String,
2194
+ expiresAt: import_effect17.Schema.optionalKey(import_effect17.Schema.String)
1971
2195
  });
1972
2196
  var OAuthFailureReason = import_effect17.Schema.Literals([
1973
2197
  "provider_error",
@@ -2180,6 +2404,13 @@ var RedditFeedSettings = import_effect18.Schema.Struct({
2180
2404
  thumbnailMediaId: import_effect18.Schema.optionalKey(MediaId),
2181
2405
  firstComment: import_effect18.Schema.optionalKey(text)
2182
2406
  }).annotate({ identifier: "RedditFeedSettings" });
2407
+ var SnapchatStorySettings = import_effect18.Schema.Struct({
2408
+ contentType: import_effect18.Schema.optionalKey(import_effect18.Schema.Literals(["story", "saved_story", "spotlight"])),
2409
+ title: import_effect18.Schema.optionalKey(import_effect18.Schema.String.check(import_effect18.Schema.isMinLength(1), import_effect18.Schema.isMaxLength(45))),
2410
+ description: import_effect18.Schema.optionalKey(import_effect18.Schema.String.check(import_effect18.Schema.isMinLength(1), import_effect18.Schema.isMaxLength(160))),
2411
+ link: import_effect18.Schema.optionalKey(MediaUrl),
2412
+ locale: import_effect18.Schema.optionalKey(import_effect18.Schema.String.check(import_effect18.Schema.isPattern(/^[a-z]{2}_[A-Z]{2}$/)))
2413
+ }).annotate({ identifier: "SnapchatStorySettings" });
2183
2414
  var YouTubeVideoSettings = import_effect18.Schema.Struct({
2184
2415
  title: import_effect18.Schema.String.check(import_effect18.Schema.isMinLength(1), import_effect18.Schema.isMaxLength(100)),
2185
2416
  description: import_effect18.Schema.optionalKey(import_effect18.Schema.String.check(import_effect18.Schema.isMaxLength(5000))),
@@ -2338,6 +2569,13 @@ var PublishTarget = import_effect18.Schema.Union([
2338
2569
  ...overrides,
2339
2570
  settings: RedditFeedSettings
2340
2571
  }),
2572
+ import_effect18.Schema.Struct({
2573
+ accountId: AccountId,
2574
+ provider: import_effect18.Schema.Literal("snapchat"),
2575
+ placement: import_effect18.Schema.Literal("story"),
2576
+ ...overrides,
2577
+ settings: import_effect18.Schema.optionalKey(SnapchatStorySettings)
2578
+ }),
2341
2579
  import_effect18.Schema.Struct({
2342
2580
  accountId: AccountId,
2343
2581
  provider: import_effect18.Schema.Literal("tiktok"),
@@ -2369,6 +2607,7 @@ var providerSettings = import_effect18.Schema.Union([
2369
2607
  InstagramStorySettings,
2370
2608
  LinkedInFeedSettings,
2371
2609
  RedditFeedSettings,
2610
+ SnapchatStorySettings,
2372
2611
  ThreadsFeedSettings,
2373
2612
  XFeedSettings,
2374
2613
  YouTubeVideoSettings,
@@ -3047,6 +3286,7 @@ var InboxReview = import_effect21.Schema.Struct({
3047
3286
  providerUpdatedAt: import_effect21.Schema.NullOr(import_effect21.Schema.String),
3048
3287
  repliedAt: import_effect21.Schema.NullOr(import_effect21.Schema.String),
3049
3288
  replyText: import_effect21.Schema.NullOr(import_effect21.Schema.String),
3289
+ canReply: import_effect21.Schema.Boolean,
3050
3290
  deletedAt: import_effect21.Schema.NullOr(import_effect21.Schema.String),
3051
3291
  createdAt: import_effect21.Schema.String
3052
3292
  }).annotate({ identifier: "InboxReview" });
@@ -3184,6 +3424,9 @@ var SendInboxMessage = import_effect21.Schema.Struct({
3184
3424
  var ReplyInboxComment = import_effect21.Schema.Struct({
3185
3425
  text: replyText
3186
3426
  }).annotate({ identifier: "ReplyInboxComment" });
3427
+ var ReplyInboxReview = import_effect21.Schema.Struct({
3428
+ text: replyText
3429
+ }).annotate({ identifier: "ReplyInboxReview" });
3187
3430
  var UpdateInboxComment = import_effect21.Schema.Struct({
3188
3431
  hidden: import_effect21.Schema.optionalKey(import_effect21.Schema.Boolean),
3189
3432
  liked: import_effect21.Schema.optionalKey(import_effect21.Schema.Boolean)
@@ -3261,7 +3504,8 @@ var AD_PROVIDERS = [
3261
3504
  "tiktok_ads",
3262
3505
  "linkedin_ads",
3263
3506
  "snapchat_ads",
3264
- "amazon_ads"
3507
+ "amazon_ads",
3508
+ "openai_ads"
3265
3509
  ];
3266
3510
  var AdProvider = import_effect23.Schema.Literals(AD_PROVIDERS);
3267
3511
  var AdAccountState = import_effect23.Schema.Literals(["available", "selected"]);
@@ -3356,8 +3600,17 @@ var AdKillSwitchResult = import_effect23.Schema.Struct({
3356
3600
  }).annotate({ identifier: "AdKillSwitchResult" });
3357
3601
  var AdOperationKind = import_effect23.Schema.Literals([
3358
3602
  "boost.create",
3603
+ "campaign.create",
3359
3604
  "campaign.activate",
3360
- "campaign.pause"
3605
+ "campaign.pause",
3606
+ "campaign.archive",
3607
+ "ad_group.status",
3608
+ "ad_group.create",
3609
+ "ad.status",
3610
+ "ad.attach",
3611
+ "creative.create",
3612
+ "campaign.duplicate",
3613
+ "budget.update"
3361
3614
  ]);
3362
3615
  var AdOperationStatus = import_effect23.Schema.Literals([
3363
3616
  "queued",
@@ -3434,6 +3687,48 @@ var AdCampaignActivationInput = import_effect23.Schema.Struct({
3434
3687
  var AdCampaignPauseInput = import_effect23.Schema.Struct({
3435
3688
  expectedRevision: import_effect23.Schema.Int.check(import_effect23.Schema.isGreaterThan(0))
3436
3689
  }).annotate({ identifier: "AdCampaignPauseInput" });
3690
+ var AdCampaignArchiveInput = import_effect23.Schema.Struct({
3691
+ expectedRevision: import_effect23.Schema.Int.check(import_effect23.Schema.isGreaterThan(0))
3692
+ }).annotate({ identifier: "AdCampaignArchiveInput" });
3693
+ var AdEntityStatusUpdate = import_effect23.Schema.Struct({
3694
+ status: import_effect23.Schema.Literals(["active", "paused", "archived"]),
3695
+ expectedRevision: import_effect23.Schema.Int.check(import_effect23.Schema.isGreaterThan(0))
3696
+ }).annotate({ identifier: "AdEntityStatusUpdate" });
3697
+ var AdBudgetUpdateInput = import_effect23.Schema.Struct({
3698
+ budget: AdBudget,
3699
+ expectedRevision: import_effect23.Schema.Int.check(import_effect23.Schema.isGreaterThan(0))
3700
+ }).annotate({ identifier: "AdBudgetUpdateInput" });
3701
+ var AdAttachAdCreative = import_effect23.Schema.Struct({
3702
+ headline: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(255))),
3703
+ body: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(2000))),
3704
+ callToAction: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(64))),
3705
+ destinationUrl: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(2048))),
3706
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3707
+ }).annotate({ identifier: "AdAttachAdCreative" });
3708
+ var AdAdGroupCreateInput = import_effect23.Schema.Struct({
3709
+ name: import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(255)),
3710
+ budget: import_effect23.Schema.optionalKey(AdBudget),
3711
+ targeting: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown)),
3712
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3713
+ }).annotate({ identifier: "AdAdGroupCreateInput" });
3714
+ var AdCreativeCreateInput = import_effect23.Schema.Struct({
3715
+ actorAccountId: AccountId,
3716
+ mediaId: import_effect23.Schema.String.check(import_effect23.Schema.isUUID()),
3717
+ headline: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(255))),
3718
+ body: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(2000))),
3719
+ callToAction: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(64))),
3720
+ destinationUrl: import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(2048)),
3721
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3722
+ }).annotate({ identifier: "AdCreativeCreateInput" });
3723
+ var AdCampaignDuplicateInput = import_effect23.Schema.Struct({
3724
+ name: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(255)))
3725
+ }).annotate({ identifier: "AdCampaignDuplicateInput" });
3726
+ var AdAttachAdInput = import_effect23.Schema.Struct({
3727
+ name: import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(255)),
3728
+ creativeId: import_effect23.Schema.optionalKey(AdCreativeId),
3729
+ creative: import_effect23.Schema.optionalKey(AdAttachAdCreative),
3730
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3731
+ }).annotate({ identifier: "AdAttachAdInput" });
3437
3732
  var AdWriteHeaders = import_effect23.Schema.Struct({
3438
3733
  "idempotency-key": IdempotencyKey
3439
3734
  });
@@ -3472,6 +3767,18 @@ var AdConnectLaunch = import_effect23.Schema.Struct({
3472
3767
  url: import_effect23.Schema.String,
3473
3768
  status: import_effect23.Schema.Literal("pending")
3474
3769
  }).annotate({ identifier: "AdConnectLaunch" });
3770
+ var AdApiKeyConnectInput = import_effect23.Schema.Struct({
3771
+ workspaceId: WorkspaceId,
3772
+ provider: import_effect23.Schema.Literal("openai_ads"),
3773
+ apiKey: import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(2048)),
3774
+ accountId: import_effect23.Schema.optionalKey(AccountId),
3775
+ profileId: import_effect23.Schema.optionalKey(ProfileId)
3776
+ }).annotate({ identifier: "AdApiKeyConnectInput" });
3777
+ var AdApiKeyConnectResult = import_effect23.Schema.Struct({
3778
+ provider: import_effect23.Schema.Literal("openai_ads"),
3779
+ accountId: AccountId,
3780
+ status: import_effect23.Schema.Literal("connected")
3781
+ }).annotate({ identifier: "AdApiKeyConnectResult" });
3475
3782
  var AdAccountRef = import_effect23.Schema.Struct({
3476
3783
  workspaceId: WorkspaceId,
3477
3784
  accountId: AccountId
@@ -3532,6 +3839,128 @@ var AdBoostInput = import_effect23.Schema.Struct({
3532
3839
  accountId: AccountId,
3533
3840
  ...AdBoostDraft.fields
3534
3841
  }).annotate({ identifier: "AdBoostInput" });
3842
+ var AdCampaignPlanCapability = import_effect23.Schema.Literals([
3843
+ "campaign.create",
3844
+ "ad_group.create",
3845
+ "creative.create",
3846
+ "ad.create",
3847
+ "campaign.activate",
3848
+ "campaign.pause",
3849
+ "campaign.archive",
3850
+ "ad_group.activate",
3851
+ "ad_group.pause",
3852
+ "ad_group.archive",
3853
+ "ad.activate",
3854
+ "ad.pause",
3855
+ "ad.archive",
3856
+ "budget.update",
3857
+ "boost.create"
3858
+ ]);
3859
+ var AdCampaignPlanProfile = import_effect23.Schema.Struct({
3860
+ budgetOwner: import_effect23.Schema.Literals(["campaign", "ad_group", "shared"]),
3861
+ maxAdGroups: import_effect23.Schema.optionalKey(import_effect23.Schema.Int.check(import_effect23.Schema.isGreaterThanOrEqualTo(1))),
3862
+ budgetUnit: import_effect23.Schema.Literals(["minor", "micros"]),
3863
+ hierarchy: import_effect23.Schema.Array(import_effect23.Schema.Literals(["campaign", "ad_group", "creative", "ad"])),
3864
+ actor: import_effect23.Schema.Literals(["required", "none"]),
3865
+ creative: import_effect23.Schema.Literals(["separate", "embedded"]),
3866
+ review: import_effect23.Schema.Literals(["sync", "pending", "async"]),
3867
+ activation: import_effect23.Schema.Literals(["campaign", "ad_group"])
3868
+ }).annotate({ identifier: "AdCampaignPlanProfile" });
3869
+ var AdCampaignPlanTarget = import_effect23.Schema.Struct({
3870
+ accountId: AccountId,
3871
+ actorAccountId: import_effect23.Schema.optionalKey(AccountId),
3872
+ budget: import_effect23.Schema.optionalKey(AdBudget),
3873
+ schedule: import_effect23.Schema.optionalKey(AdSchedule),
3874
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3875
+ }).annotate({ identifier: "AdCampaignPlanTarget" });
3876
+ var AdCampaignPlanCreative = import_effect23.Schema.Struct({
3877
+ headline: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(255))),
3878
+ body: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(2000))),
3879
+ callToAction: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(64))),
3880
+ destinationUrl: import_effect23.Schema.optionalKey(import_effect23.Schema.String.check(import_effect23.Schema.isMaxLength(2048))),
3881
+ media: import_effect23.Schema.optionalKey(MediaInputs),
3882
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3883
+ }).annotate({ identifier: "AdCampaignPlanCreative" });
3884
+ var AdCampaignPlanAd = import_effect23.Schema.Struct({
3885
+ name: import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(255)),
3886
+ creative: AdCampaignPlanCreative,
3887
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3888
+ }).annotate({ identifier: "AdCampaignPlanAd" });
3889
+ var AdCampaignPlanAdGroup = import_effect23.Schema.Struct({
3890
+ name: import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(255)),
3891
+ budget: import_effect23.Schema.optionalKey(AdBudget),
3892
+ targeting: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown)),
3893
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown)),
3894
+ ads: import_effect23.Schema.Array(AdCampaignPlanAd).check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(50))
3895
+ }).annotate({ identifier: "AdCampaignPlanAdGroup" });
3896
+ var AdCampaignPlan = import_effect23.Schema.Struct({
3897
+ name: import_effect23.Schema.String.check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(255)),
3898
+ objective: AdObjective,
3899
+ budget: import_effect23.Schema.optionalKey(AdBudget),
3900
+ schedule: import_effect23.Schema.optionalKey(AdSchedule),
3901
+ targets: import_effect23.Schema.Array(AdCampaignPlanTarget).check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(50)),
3902
+ adGroups: import_effect23.Schema.Array(AdCampaignPlanAdGroup).check(import_effect23.Schema.isMinLength(1), import_effect23.Schema.isMaxLength(50)),
3903
+ providerSettings: import_effect23.Schema.optionalKey(import_effect23.Schema.Record(import_effect23.Schema.String, import_effect23.Schema.Unknown))
3904
+ }).annotate({ identifier: "AdCampaignPlan" });
3905
+ var AdCampaignPlanTargetValidation = import_effect23.Schema.Struct({
3906
+ accountId: AccountId,
3907
+ provider: import_effect23.Schema.optionalKey(AdProvider),
3908
+ name: import_effect23.Schema.optionalKey(import_effect23.Schema.String),
3909
+ currency: import_effect23.Schema.optionalKey(CurrencyCode),
3910
+ budget: import_effect23.Schema.optionalKey(import_effect23.Schema.NullOr(AdBudget)),
3911
+ profile: import_effect23.Schema.optionalKey(AdCampaignPlanProfile),
3912
+ capabilities: import_effect23.Schema.optionalKey(import_effect23.Schema.Array(AdCampaignPlanCapability)),
3913
+ issues: import_effect23.Schema.Array(AdIssue)
3914
+ }).annotate({ identifier: "AdCampaignPlanTargetValidation" });
3915
+ var AdCampaignPlanValidation = import_effect23.Schema.Struct({
3916
+ valid: import_effect23.Schema.Boolean,
3917
+ issues: import_effect23.Schema.Array(AdIssue),
3918
+ targets: import_effect23.Schema.Array(AdCampaignPlanTargetValidation)
3919
+ }).annotate({ identifier: "AdCampaignPlanValidation" });
3920
+ var AdCampaignPlanStatus = import_effect23.Schema.Literals([
3921
+ "queued",
3922
+ "creating",
3923
+ "partial",
3924
+ "succeeded",
3925
+ "failed",
3926
+ "unresolved"
3927
+ ]);
3928
+ var AdCampaignPlanTargetAccepted = import_effect23.Schema.Struct({
3929
+ accountId: AccountId,
3930
+ provider: AdProvider,
3931
+ operationId: AdOperationId,
3932
+ status: AdOperationStatus
3933
+ }).annotate({ identifier: "AdCampaignPlanTargetAccepted" });
3934
+ var AdCampaignPlanAccepted = import_effect23.Schema.Struct({
3935
+ planId: import_effect23.Schema.String.check(import_effect23.Schema.isUUID()),
3936
+ status: AdCampaignPlanStatus,
3937
+ targets: import_effect23.Schema.Array(AdCampaignPlanTargetAccepted)
3938
+ }).annotate({ identifier: "AdCampaignPlanAccepted" });
3939
+ var AdCampaignPlanListRow = import_effect23.Schema.Struct({
3940
+ planId: import_effect23.Schema.String.check(import_effect23.Schema.isUUID()),
3941
+ status: AdCampaignPlanStatus,
3942
+ createdAt: import_effect23.Schema.String,
3943
+ targets: import_effect23.Schema.Array(AdCampaignPlanTargetAccepted)
3944
+ }).annotate({ identifier: "AdCampaignPlanListRow" });
3945
+ var AdCampaignPlanList = import_effect23.Schema.Struct({
3946
+ data: import_effect23.Schema.Array(AdCampaignPlanListRow),
3947
+ ...pageFields
3948
+ }).annotate({ identifier: "AdCampaignPlanList" });
3949
+ var AdCampaignPlanTargetDetail = import_effect23.Schema.Struct({
3950
+ accountId: AccountId,
3951
+ provider: AdProvider,
3952
+ operationId: AdOperationId,
3953
+ campaignId: import_effect23.Schema.NullOr(AdCampaignId),
3954
+ status: AdOperationStatus,
3955
+ issues: import_effect23.Schema.Array(AdIssue)
3956
+ }).annotate({ identifier: "AdCampaignPlanTargetDetail" });
3957
+ var AdCampaignPlanDetail = import_effect23.Schema.Struct({
3958
+ planId: import_effect23.Schema.String.check(import_effect23.Schema.isUUID()),
3959
+ status: AdCampaignPlanStatus,
3960
+ createdAt: import_effect23.Schema.String,
3961
+ targets: import_effect23.Schema.Array(AdCampaignPlanTargetDetail),
3962
+ issues: import_effect23.Schema.Array(AdIssue)
3963
+ }).annotate({ identifier: "AdCampaignPlanDetail" });
3535
3964
  var AdCampaign = import_effect23.Schema.Struct({
3536
3965
  id: AdCampaignId,
3537
3966
  accountId: AccountId,
@@ -3666,6 +4095,20 @@ var AdCampaignList = import_effect23.Schema.Struct({
3666
4095
  ...pageFields,
3667
4096
  freshness: AdFreshness
3668
4097
  }).annotate({ identifier: "AdCampaignList" });
4098
+ var AdGroupListRow = import_effect23.Schema.Struct({
4099
+ ...AdGroup.fields,
4100
+ insights: import_effect23.Schema.optionalKey(import_effect23.Schema.NullOr(AdInsightSummary))
4101
+ }).annotate({ identifier: "AdGroupListRow" });
4102
+ var AdGroupList = import_effect23.Schema.Struct({
4103
+ data: import_effect23.Schema.Array(AdGroupListRow),
4104
+ ...pageFields,
4105
+ freshness: AdFreshness
4106
+ }).annotate({ identifier: "AdGroupList" });
4107
+ var AdList = import_effect23.Schema.Struct({
4108
+ data: import_effect23.Schema.Array(Ad),
4109
+ ...pageFields,
4110
+ freshness: AdFreshness
4111
+ }).annotate({ identifier: "AdList" });
3669
4112
  var AdCreativeList = import_effect23.Schema.Struct({
3670
4113
  data: import_effect23.Schema.Array(AdCreative),
3671
4114
  ...pageFields,
@@ -3776,6 +4219,7 @@ var WorkspaceEventType = import_effect26.Schema.Literals([
3776
4219
  "inbox.review.updated",
3777
4220
  "inbox.review.deleted",
3778
4221
  "inbox.review.restored",
4222
+ "inbox.review.replied",
3779
4223
  "inbox.mention.received",
3780
4224
  "inbox.message.sent",
3781
4225
  "inbox.message.delivered",
@@ -3795,12 +4239,14 @@ var WorkspaceEventType = import_effect26.Schema.Literals([
3795
4239
  "ads.kill_switch.activated",
3796
4240
  "ads.lead.received",
3797
4241
  "ads.campaign.status_changed",
4242
+ "ads.ad_group.status_changed",
3798
4243
  "ads.ad.status_changed",
3799
4244
  "ads.ad_account.status_changed",
3800
4245
  "ads.ad.review.approved",
3801
4246
  "ads.ad.review.rejected",
3802
4247
  "ads.sync.failed",
3803
4248
  "ads.sync.recovered",
4249
+ "ads.initial_sync.completed",
3804
4250
  "schedule.assignment.changed",
3805
4251
  "account.connected",
3806
4252
  "account.disconnected",
@@ -4032,6 +4478,11 @@ var WebhookEvent = import_effect27.Schema.Union([
4032
4478
  type: import_effect27.Schema.Literal("inbox.review.restored"),
4033
4479
  data: import_effect27.Schema.Struct(inboxReviewData)
4034
4480
  }),
4481
+ import_effect27.Schema.Struct({
4482
+ ...envelope,
4483
+ type: import_effect27.Schema.Literal("inbox.review.replied"),
4484
+ data: import_effect27.Schema.Struct(inboxReviewData)
4485
+ }),
4035
4486
  import_effect27.Schema.Struct({
4036
4487
  ...envelope,
4037
4488
  type: import_effect27.Schema.Literal("inbox.mention.received"),
@@ -4189,6 +4640,16 @@ var WebhookEvent = import_effect27.Schema.Union([
4189
4640
  status: AdEntityStatus
4190
4641
  })
4191
4642
  }),
4643
+ import_effect27.Schema.Struct({
4644
+ ...envelope,
4645
+ type: import_effect27.Schema.Literal("ads.ad_group.status_changed"),
4646
+ data: import_effect27.Schema.Struct({
4647
+ accountId: AccountId,
4648
+ adGroupId: AdGroupId,
4649
+ provider: AdProvider,
4650
+ status: AdEntityStatus
4651
+ })
4652
+ }),
4192
4653
  import_effect27.Schema.Struct({
4193
4654
  ...envelope,
4194
4655
  type: import_effect27.Schema.Literal("ads.ad.status_changed"),
@@ -4242,6 +4703,14 @@ var WebhookEvent = import_effect27.Schema.Union([
4242
4703
  provider: AdProvider
4243
4704
  })
4244
4705
  }),
4706
+ import_effect27.Schema.Struct({
4707
+ ...envelope,
4708
+ type: import_effect27.Schema.Literal("ads.initial_sync.completed"),
4709
+ data: import_effect27.Schema.Struct({
4710
+ accountId: AccountId,
4711
+ provider: AdProvider
4712
+ })
4713
+ }),
4245
4714
  import_effect27.Schema.Struct({
4246
4715
  ...envelope,
4247
4716
  type: import_effect27.Schema.Literal("account.connected"),
@@ -5034,7 +5503,13 @@ class AdRevisionConflict extends import_http_api.HttpApiError.Problem()("AdRevis
5034
5503
  status: 409,
5035
5504
  title: "Ad resource revision conflict"
5036
5505
  }, {
5037
- resource: import_effect28.Schema.Literals(["spend_policy", "campaign", "boost"]),
5506
+ resource: import_effect28.Schema.Literals([
5507
+ "spend_policy",
5508
+ "campaign",
5509
+ "ad_group",
5510
+ "ad",
5511
+ "boost"
5512
+ ]),
5038
5513
  expectedRevision: import_effect28.Schema.Int.check(import_effect28.Schema.isGreaterThanOrEqualTo(0)),
5039
5514
  actualRevision: import_effect28.Schema.Int.check(import_effect28.Schema.isGreaterThanOrEqualTo(0)),
5040
5515
  nextAction: import_effect28.Schema.String
@@ -5649,12 +6124,13 @@ var import_http = require("effect/http");
5649
6124
  // package.json
5650
6125
  var package_default = {
5651
6126
  name: "@pubnio/sdk",
5652
- version: "0.1.2",
6127
+ version: "0.2.0",
5653
6128
  description: "JavaScript and TypeScript client for the PubNio API",
5654
6129
  type: "module",
5655
6130
  exports: {
5656
6131
  ".": "./src/index.ts",
5657
6132
  "./solid": "./src/solid.ts",
6133
+ "./internal": "./src/internal.ts",
5658
6134
  "./package.json": "./package.json"
5659
6135
  },
5660
6136
  dependencies: {
@@ -6811,6 +7287,11 @@ var webhooksReplayDelivery = (options) => (options.client ?? client).post({
6811
7287
  url: "/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/deliveries/{deliveryId}/replay",
6812
7288
  ...options
6813
7289
  });
7290
+ var webhooksEventTypes = (options) => (options?.client ?? client).get({
7291
+ security: [{ scheme: "bearer", type: "http" }],
7292
+ url: "/api/v1/webhooks/event-types",
7293
+ ...options
7294
+ });
6814
7295
  var integrationsList = (options) => (options.client ?? client).get({
6815
7296
  security: [{ scheme: "bearer", type: "http" }],
6816
7297
  url: "/api/v1/integrations",
@@ -6839,6 +7320,15 @@ var integrationsPrepareConnection = (options) => (options.client ?? client).post
6839
7320
  url: "/api/v1/integrations/{provider}/connect",
6840
7321
  ...options
6841
7322
  });
7323
+ var integrationsBlueskySession = (options) => (options.client ?? client).post({
7324
+ security: [{ scheme: "bearer", type: "http" }],
7325
+ url: "/api/v1/integrations/bluesky/session",
7326
+ ...options,
7327
+ headers: {
7328
+ "Content-Type": "application/json",
7329
+ ...options.headers
7330
+ }
7331
+ });
6842
7332
  var integrationsConnectionStatus = (options) => (options.client ?? client).get({
6843
7333
  security: [{ scheme: "bearer", type: "http" }],
6844
7334
  url: "/api/v1/integrations/attempts/{attemptId}",
@@ -6952,6 +7442,15 @@ var mediaGet = (options) => (options.client ?? client).get({
6952
7442
  url: "/api/v1/media/{mediaId}",
6953
7443
  ...options
6954
7444
  });
7445
+ var mediaUploadInline = (options) => (options.client ?? client).post({
7446
+ security: [{ scheme: "bearer", type: "http" }],
7447
+ url: "/api/v1/media/inline",
7448
+ ...options,
7449
+ headers: {
7450
+ "Content-Type": "application/json",
7451
+ ...options.headers
7452
+ }
7453
+ });
6955
7454
  var mediaImport = (options) => (options.client ?? client).post({
6956
7455
  security: [{ scheme: "bearer", type: "http" }],
6957
7456
  url: "/api/v1/media/import",
@@ -7228,6 +7727,15 @@ var inboxReviewsGet = (options) => (options.client ?? client).get({
7228
7727
  url: "/api/v1/inbox/reviews/{reviewId}",
7229
7728
  ...options
7230
7729
  });
7730
+ var inboxReviewsReply = (options) => (options.client ?? client).post({
7731
+ security: [{ scheme: "bearer", type: "http" }],
7732
+ url: "/api/v1/inbox/reviews/{reviewId}/replies",
7733
+ ...options,
7734
+ headers: {
7735
+ "Content-Type": "application/json",
7736
+ ...options.headers
7737
+ }
7738
+ });
7231
7739
  var inboxUnreadCount = (options) => (options.client ?? client).get({
7232
7740
  security: [{ scheme: "bearer", type: "http" }],
7233
7741
  url: "/api/v1/inbox/unread-count",
@@ -7257,6 +7765,15 @@ var inboxAttachmentsGet = (options) => (options.client ?? client).get({
7257
7765
  url: "/api/v1/inbox/attachments/{attachmentId}",
7258
7766
  ...options
7259
7767
  });
7768
+ var commentsCreate = (options) => (options.client ?? client).post({
7769
+ security: [{ scheme: "bearer", type: "http" }],
7770
+ url: "/api/v1/comments",
7771
+ ...options,
7772
+ headers: {
7773
+ "Content-Type": "application/json",
7774
+ ...options.headers
7775
+ }
7776
+ });
7260
7777
  var postsList = (options) => (options.client ?? client).get({
7261
7778
  security: [{ scheme: "bearer", type: "http" }],
7262
7779
  url: "/api/v1/posts",
@@ -7341,6 +7858,48 @@ var adsConnectAccount = (options) => (options.client ?? client).post({
7341
7858
  ...options.headers
7342
7859
  }
7343
7860
  });
7861
+ var adsConnectApiKeyAccount = (options) => (options.client ?? client).post({
7862
+ security: [{ scheme: "bearer", type: "http" }],
7863
+ url: "/api/v1/ads/accounts/connect/api-key",
7864
+ ...options,
7865
+ headers: {
7866
+ "Content-Type": "application/json",
7867
+ ...options.headers
7868
+ }
7869
+ });
7870
+ var adsValidateCampaignPlan = (options) => (options.client ?? client).post({
7871
+ security: [{ scheme: "bearer", type: "http" }],
7872
+ url: "/api/v1/ads/campaigns/validate",
7873
+ ...options,
7874
+ headers: {
7875
+ "Content-Type": "application/json",
7876
+ ...options.headers
7877
+ }
7878
+ });
7879
+ var adsListWorkspaceCampaigns = (options) => (options.client ?? client).get({
7880
+ security: [{ scheme: "bearer", type: "http" }],
7881
+ url: "/api/v1/ads/campaigns",
7882
+ ...options
7883
+ });
7884
+ var adsCreateCampaignPlan = (options) => (options.client ?? client).post({
7885
+ security: [{ scheme: "bearer", type: "http" }],
7886
+ url: "/api/v1/ads/campaigns",
7887
+ ...options,
7888
+ headers: {
7889
+ "Content-Type": "application/json",
7890
+ ...options.headers
7891
+ }
7892
+ });
7893
+ var adsListCampaignPlans = (options) => (options.client ?? client).get({
7894
+ security: [{ scheme: "bearer", type: "http" }],
7895
+ url: "/api/v1/ads/plans",
7896
+ ...options
7897
+ });
7898
+ var adsGetCampaignPlan = (options) => (options.client ?? client).get({
7899
+ security: [{ scheme: "bearer", type: "http" }],
7900
+ url: "/api/v1/ads/plans/{planId}",
7901
+ ...options
7902
+ });
7344
7903
  var adsSelectAccount = (options) => (options.client ?? client).post({
7345
7904
  security: [{ scheme: "bearer", type: "http" }],
7346
7905
  url: "/api/v1/ads/accounts/{accountId}/select",
@@ -7351,11 +7910,6 @@ var adsDisconnectAccount = (options) => (options.client ?? client).post({
7351
7910
  url: "/api/v1/ads/accounts/{accountId}/disconnect",
7352
7911
  ...options
7353
7912
  });
7354
- var adsListWorkspaceCampaigns = (options) => (options.client ?? client).get({
7355
- security: [{ scheme: "bearer", type: "http" }],
7356
- url: "/api/v1/ads/campaigns",
7357
- ...options
7358
- });
7359
7913
  var adsListCampaigns = (options) => (options.client ?? client).get({
7360
7914
  security: [{ scheme: "bearer", type: "http" }],
7361
7915
  url: "/api/v1/ads/accounts/{accountId}/campaigns",
@@ -7366,6 +7920,16 @@ var adsGetTree = (options) => (options.client ?? client).get({
7366
7920
  url: "/api/v1/ads/tree",
7367
7921
  ...options
7368
7922
  });
7923
+ var adsListAds = (options) => (options.client ?? client).get({
7924
+ security: [{ scheme: "bearer", type: "http" }],
7925
+ url: "/api/v1/ads/ads",
7926
+ ...options
7927
+ });
7928
+ var adsListAdGroups = (options) => (options.client ?? client).get({
7929
+ security: [{ scheme: "bearer", type: "http" }],
7930
+ url: "/api/v1/ads/ad-groups",
7931
+ ...options
7932
+ });
7369
7933
  var adsGetAd = (options) => (options.client ?? client).get({
7370
7934
  security: [{ scheme: "bearer", type: "http" }],
7371
7935
  url: "/api/v1/ads/ads/{adId}",
@@ -7376,6 +7940,20 @@ var adsListCreatives = (options) => (options.client ?? client).get({
7376
7940
  url: "/api/v1/ads/creatives",
7377
7941
  ...options
7378
7942
  });
7943
+ var adsCreateCreative = (options) => (options.client ?? client).post({
7944
+ security: [{ scheme: "bearer", type: "http" }],
7945
+ url: "/api/v1/ads/accounts/{accountId}/creatives",
7946
+ ...options,
7947
+ headers: {
7948
+ "Content-Type": "application/json",
7949
+ ...options.headers
7950
+ }
7951
+ });
7952
+ var adsGetCreative = (options) => (options.client ?? client).get({
7953
+ security: [{ scheme: "bearer", type: "http" }],
7954
+ url: "/api/v1/ads/creatives/{creativeId}",
7955
+ ...options
7956
+ });
7379
7957
  var adsListWorkspaceInsights = (options) => (options.client ?? client).get({
7380
7958
  security: [{ scheme: "bearer", type: "http" }],
7381
7959
  url: "/api/v1/ads/insights",
@@ -7455,6 +8033,78 @@ var adsPauseCampaign = (options) => (options.client ?? client).post({
7455
8033
  ...options.headers
7456
8034
  }
7457
8035
  });
8036
+ var adsArchiveCampaign = (options) => (options.client ?? client).post({
8037
+ security: [{ scheme: "bearer", type: "http" }],
8038
+ url: "/api/v1/ads/accounts/{accountId}/campaigns/{campaignId}/archive",
8039
+ ...options,
8040
+ headers: {
8041
+ "Content-Type": "application/json",
8042
+ ...options.headers
8043
+ }
8044
+ });
8045
+ var adsDuplicateCampaign = (options) => (options.client ?? client).post({
8046
+ security: [{ scheme: "bearer", type: "http" }],
8047
+ url: "/api/v1/ads/accounts/{accountId}/campaigns/{campaignId}/duplicate",
8048
+ ...options,
8049
+ headers: {
8050
+ "Content-Type": "application/json",
8051
+ ...options.headers
8052
+ }
8053
+ });
8054
+ var adsSetCampaignBudget = (options) => (options.client ?? client).post({
8055
+ security: [{ scheme: "bearer", type: "http" }],
8056
+ url: "/api/v1/ads/accounts/{accountId}/campaigns/{campaignId}/budget",
8057
+ ...options,
8058
+ headers: {
8059
+ "Content-Type": "application/json",
8060
+ ...options.headers
8061
+ }
8062
+ });
8063
+ var adsSetAdGroupBudget = (options) => (options.client ?? client).post({
8064
+ security: [{ scheme: "bearer", type: "http" }],
8065
+ url: "/api/v1/ads/accounts/{accountId}/ad-groups/{adGroupId}/budget",
8066
+ ...options,
8067
+ headers: {
8068
+ "Content-Type": "application/json",
8069
+ ...options.headers
8070
+ }
8071
+ });
8072
+ var adsSetAdGroupStatus = (options) => (options.client ?? client).post({
8073
+ security: [{ scheme: "bearer", type: "http" }],
8074
+ url: "/api/v1/ads/accounts/{accountId}/ad-groups/{adGroupId}/status",
8075
+ ...options,
8076
+ headers: {
8077
+ "Content-Type": "application/json",
8078
+ ...options.headers
8079
+ }
8080
+ });
8081
+ var adsCreateAdGroup = (options) => (options.client ?? client).post({
8082
+ security: [{ scheme: "bearer", type: "http" }],
8083
+ url: "/api/v1/ads/accounts/{accountId}/campaigns/{campaignId}/ad-groups",
8084
+ ...options,
8085
+ headers: {
8086
+ "Content-Type": "application/json",
8087
+ ...options.headers
8088
+ }
8089
+ });
8090
+ var adsAttachAd = (options) => (options.client ?? client).post({
8091
+ security: [{ scheme: "bearer", type: "http" }],
8092
+ url: "/api/v1/ads/accounts/{accountId}/ad-groups/{adGroupId}/ads",
8093
+ ...options,
8094
+ headers: {
8095
+ "Content-Type": "application/json",
8096
+ ...options.headers
8097
+ }
8098
+ });
8099
+ var adsSetAdStatus = (options) => (options.client ?? client).post({
8100
+ security: [{ scheme: "bearer", type: "http" }],
8101
+ url: "/api/v1/ads/accounts/{accountId}/ads/{adId}/status",
8102
+ ...options,
8103
+ headers: {
8104
+ "Content-Type": "application/json",
8105
+ ...options.headers
8106
+ }
8107
+ });
7458
8108
  var auditList = (options) => (options.client ?? client).get({
7459
8109
  security: [{ scheme: "bearer", type: "http" }],
7460
8110
  url: "/api/v1/workspaces/{workspaceId}/audit-logs",
@@ -7806,7 +8456,8 @@ function createPubNioClient({
7806
8456
  signal: clientSignal,
7807
8457
  retries: requestedRetries = defaultRetries,
7808
8458
  clientName = "sdk",
7809
- clientVersion = package_default.version
8459
+ clientVersion = package_default.version,
8460
+ onRuntime
7810
8461
  }) {
7811
8462
  const timeoutMs = checkedTimeout(requestedTimeoutMs, "timeoutMs");
7812
8463
  const retries = checkedRetries(requestedRetries);
@@ -7861,6 +8512,7 @@ function createPubNioClient({
7861
8512
  throw invalidResponse();
7862
8513
  });
7863
8514
  }
8515
+ onRuntime?.({ client, transport, decode });
7864
8516
  async function poll(read, done, { timeoutMs: waitTimeoutMs = 60000, signal } = {}) {
7865
8517
  const timeoutMs = checkedTimeout(waitTimeoutMs, "timeoutMs");
7866
8518
  const deadline = performance.now() + timeoutMs;
@@ -8333,6 +8985,37 @@ function createPubNioClient({
8333
8985
  },
8334
8986
  ...transport()
8335
8987
  }));
8988
+ const listAdGroups = (options = {}) => decode(AdGroupList, adsListAdGroups({
8989
+ client,
8990
+ query: {
8991
+ workspaceId,
8992
+ accountId: options.accountId,
8993
+ campaignId: options.campaignId,
8994
+ provider: options.provider,
8995
+ status: options.status,
8996
+ from: options.from,
8997
+ to: options.to,
8998
+ cursor: options.cursor,
8999
+ limit: options.limit === undefined ? undefined : String(options.limit)
9000
+ },
9001
+ ...transport()
9002
+ }));
9003
+ const listAds = (options = {}) => decode(AdList, adsListAds({
9004
+ client,
9005
+ query: {
9006
+ workspaceId,
9007
+ accountId: options.accountId,
9008
+ campaignId: options.campaignId,
9009
+ adGroupId: options.adGroupId,
9010
+ provider: options.provider,
9011
+ status: options.status,
9012
+ from: options.from,
9013
+ to: options.to,
9014
+ cursor: options.cursor,
9015
+ limit: options.limit === undefined ? undefined : String(options.limit)
9016
+ },
9017
+ ...transport()
9018
+ }));
8336
9019
  const listAdTree = (options = {}) => decode(AdTree, adsGetTree({
8337
9020
  client,
8338
9021
  query: {
@@ -8355,6 +9038,23 @@ function createPubNioClient({
8355
9038
  },
8356
9039
  ...transport()
8357
9040
  }));
9041
+ const createAdCreative = (accountId, input, options = {}) => {
9042
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9043
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsCreateCreative({
9044
+ client,
9045
+ path: { accountId },
9046
+ query: { workspaceId },
9047
+ headers: { "idempotency-key": idempotencyKey },
9048
+ body: input,
9049
+ ...transport()
9050
+ })));
9051
+ };
9052
+ const getAdCreative = (creativeId) => decode(AdCreative, adsGetCreative({
9053
+ client,
9054
+ path: { creativeId },
9055
+ query: { workspaceId },
9056
+ ...transport()
9057
+ }));
8358
9058
  const listAdInsights = (options = {}) => decode(AdInsightList, adsListWorkspaceInsights({
8359
9059
  client,
8360
9060
  query: {
@@ -8422,6 +9122,68 @@ function createPubNioClient({
8422
9122
  body: input,
8423
9123
  ...transport()
8424
9124
  }));
9125
+ const mutableCampaignPlan = (plan) => ({
9126
+ ...plan,
9127
+ ...plan.budget ? { budget: { ...plan.budget } } : {},
9128
+ ...plan.schedule ? { schedule: { ...plan.schedule } } : {},
9129
+ ...plan.providerSettings ? { providerSettings: { ...plan.providerSettings } } : {},
9130
+ targets: plan.targets.map((target) => ({
9131
+ ...target,
9132
+ ...target.budget ? { budget: { ...target.budget } } : {},
9133
+ ...target.schedule ? { schedule: { ...target.schedule } } : {},
9134
+ ...target.providerSettings ? { providerSettings: { ...target.providerSettings } } : {}
9135
+ })),
9136
+ adGroups: plan.adGroups.map((group) => ({
9137
+ ...group,
9138
+ ...group.budget ? { budget: { ...group.budget } } : {},
9139
+ ...group.targeting ? { targeting: { ...group.targeting } } : {},
9140
+ ...group.providerSettings ? { providerSettings: { ...group.providerSettings } } : {},
9141
+ ads: group.ads.map((ad) => ({
9142
+ ...ad,
9143
+ ...ad.providerSettings ? { providerSettings: { ...ad.providerSettings } } : {},
9144
+ creative: {
9145
+ ...ad.creative.headline !== undefined ? { headline: ad.creative.headline } : {},
9146
+ ...ad.creative.body !== undefined ? { body: ad.creative.body } : {},
9147
+ ...ad.creative.callToAction !== undefined ? { callToAction: ad.creative.callToAction } : {},
9148
+ ...ad.creative.destinationUrl !== undefined ? { destinationUrl: ad.creative.destinationUrl } : {},
9149
+ ...ad.creative.media ? { media: ad.creative.media.map((item) => ({ ...item })) } : {},
9150
+ ...ad.creative.providerSettings ? { providerSettings: { ...ad.creative.providerSettings } } : {}
9151
+ }
9152
+ }))
9153
+ }))
9154
+ });
9155
+ const validateAdCampaignPlan = (input) => decode(AdCampaignPlanValidation, adsValidateCampaignPlan({
9156
+ client,
9157
+ query: { workspaceId },
9158
+ body: mutableCampaignPlan(input),
9159
+ ...transport()
9160
+ }));
9161
+ const createAdCampaignPlan = (input, options = {}) => {
9162
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9163
+ return withIdempotencyKey(idempotencyKey, () => decode(AdCampaignPlanAccepted, adsCreateCampaignPlan({
9164
+ client,
9165
+ query: { workspaceId },
9166
+ headers: { "idempotency-key": idempotencyKey },
9167
+ body: mutableCampaignPlan(input),
9168
+ ...transport()
9169
+ })));
9170
+ };
9171
+ const listAdCampaignPlans = (options = {}) => decode(AdCampaignPlanList, adsListCampaignPlans({
9172
+ client,
9173
+ query: {
9174
+ workspaceId,
9175
+ status: options.status,
9176
+ cursor: options.cursor,
9177
+ limit: options.limit === undefined ? undefined : String(options.limit)
9178
+ },
9179
+ ...transport()
9180
+ }));
9181
+ const readAdCampaignPlan = (planId) => decode(AdCampaignPlanDetail, adsGetCampaignPlan({
9182
+ client,
9183
+ path: { planId },
9184
+ query: { workspaceId },
9185
+ ...transport()
9186
+ }));
8425
9187
  const createAdBoost = (accountId, input, options = {}) => {
8426
9188
  const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
8427
9189
  return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsCreateBoost({
@@ -8455,6 +9217,94 @@ function createPubNioClient({
8455
9217
  ...transport()
8456
9218
  })));
8457
9219
  };
9220
+ const duplicateAdCampaign = (accountId, campaignId, input, options = {}) => {
9221
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9222
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsDuplicateCampaign({
9223
+ client,
9224
+ path: { accountId, campaignId },
9225
+ query: { workspaceId },
9226
+ headers: { "idempotency-key": idempotencyKey },
9227
+ body: input,
9228
+ ...transport()
9229
+ })));
9230
+ };
9231
+ const archiveAdCampaign = (accountId, campaignId, input, options = {}) => {
9232
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9233
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsArchiveCampaign({
9234
+ client,
9235
+ path: { accountId, campaignId },
9236
+ query: { workspaceId },
9237
+ headers: { "idempotency-key": idempotencyKey },
9238
+ body: input,
9239
+ ...transport()
9240
+ })));
9241
+ };
9242
+ const setCampaignBudget = (accountId, campaignId, input, options = {}) => {
9243
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9244
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsSetCampaignBudget({
9245
+ client,
9246
+ path: { accountId, campaignId },
9247
+ query: { workspaceId },
9248
+ headers: { "idempotency-key": idempotencyKey },
9249
+ body: input,
9250
+ ...transport()
9251
+ })));
9252
+ };
9253
+ const createAdGroup = (accountId, campaignId, input, options = {}) => {
9254
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9255
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsCreateAdGroup({
9256
+ client,
9257
+ path: { accountId, campaignId },
9258
+ query: { workspaceId },
9259
+ headers: { "idempotency-key": idempotencyKey },
9260
+ body: input,
9261
+ ...transport()
9262
+ })));
9263
+ };
9264
+ const attachAd = (accountId, adGroupId, input, options = {}) => {
9265
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9266
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsAttachAd({
9267
+ client,
9268
+ path: { accountId, adGroupId },
9269
+ query: { workspaceId },
9270
+ headers: { "idempotency-key": idempotencyKey },
9271
+ body: input,
9272
+ ...transport()
9273
+ })));
9274
+ };
9275
+ const setAdGroupBudget = (accountId, adGroupId, input, options = {}) => {
9276
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9277
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsSetAdGroupBudget({
9278
+ client,
9279
+ path: { accountId, adGroupId },
9280
+ query: { workspaceId },
9281
+ headers: { "idempotency-key": idempotencyKey },
9282
+ body: input,
9283
+ ...transport()
9284
+ })));
9285
+ };
9286
+ const setAdGroupStatus = (accountId, adGroupId, input, options = {}) => {
9287
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9288
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsSetAdGroupStatus({
9289
+ client,
9290
+ path: { accountId, adGroupId },
9291
+ query: { workspaceId },
9292
+ headers: { "idempotency-key": idempotencyKey },
9293
+ body: input,
9294
+ ...transport()
9295
+ })));
9296
+ };
9297
+ const setAdStatus = (accountId, adId, input, options = {}) => {
9298
+ const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
9299
+ return withIdempotencyKey(idempotencyKey, () => decode(AdOperation, adsSetAdStatus({
9300
+ client,
9301
+ path: { accountId, adId },
9302
+ query: { workspaceId },
9303
+ headers: { "idempotency-key": idempotencyKey },
9304
+ body: input,
9305
+ ...transport()
9306
+ })));
9307
+ };
8458
9308
  return {
8459
9309
  workspaceId,
8460
9310
  posts: {
@@ -9021,6 +9871,11 @@ function createPubNioClient({
9021
9871
  body: { ...input, workspaceId },
9022
9872
  ...transport()
9023
9873
  })),
9874
+ connectApiKey: (input) => decode(AdApiKeyConnectResult, adsConnectApiKeyAccount({
9875
+ client,
9876
+ body: { ...input, workspaceId },
9877
+ ...transport()
9878
+ })),
9024
9879
  select: (accountId) => decode(AdAccountSelection, adsSelectAccount({
9025
9880
  client,
9026
9881
  path: { accountId },
@@ -9036,6 +9891,10 @@ function createPubNioClient({
9036
9891
  campaigns: listAdCampaigns,
9037
9892
  iterateCampaigns: (options, iteration) => iterateItems(listAdCampaigns, options ?? {}, iteration),
9038
9893
  accountCampaigns: listAdAccountCampaigns,
9894
+ adGroups: listAdGroups,
9895
+ iterateAdGroups: (options, iteration) => iterateItems(listAdGroups, options ?? {}, iteration),
9896
+ ads: listAds,
9897
+ iterateAds: (options, iteration) => iterateItems(listAds, options ?? {}, iteration),
9039
9898
  iterateAccountCampaigns: (accountId, options, iteration) => iterateItems((query) => listAdAccountCampaigns(accountId, query), options ?? {}, iteration),
9040
9899
  tree: listAdTree,
9041
9900
  iterateTree: (options, iteration) => iterateItems(listAdTree, options ?? {}, iteration),
@@ -9046,6 +9905,8 @@ function createPubNioClient({
9046
9905
  ...transport()
9047
9906
  })),
9048
9907
  creatives: listAdCreatives,
9908
+ creative: getAdCreative,
9909
+ createCreative: createAdCreative,
9049
9910
  iterateCreatives: (options, iteration) => iterateItems(listAdCreatives, options ?? {}, iteration),
9050
9911
  insights: listAdInsights,
9051
9912
  iterateInsights: (options, iteration) => iterateItems(listAdInsights, options ?? {}, iteration),
@@ -9062,9 +9923,22 @@ function createPubNioClient({
9062
9923
  setKillSwitch: setAdKillSwitch,
9063
9924
  operation: readAdOperation,
9064
9925
  validateBoost: validateAdBoost,
9926
+ validateCampaignPlan: validateAdCampaignPlan,
9927
+ createCampaignPlan: createAdCampaignPlan,
9928
+ campaignPlan: readAdCampaignPlan,
9929
+ campaignPlans: listAdCampaignPlans,
9930
+ iterateCampaignPlans: (options, iteration) => iterateItems(listAdCampaignPlans, options ?? {}, iteration),
9065
9931
  createBoost: createAdBoost,
9066
9932
  activateCampaign: activateAdCampaign,
9067
- pauseCampaign: pauseAdCampaign
9933
+ pauseCampaign: pauseAdCampaign,
9934
+ archiveCampaign: archiveAdCampaign,
9935
+ duplicateCampaign: duplicateAdCampaign,
9936
+ setCampaignBudget,
9937
+ setAdGroupBudget,
9938
+ setAdGroupStatus,
9939
+ attachAd,
9940
+ createAdGroup,
9941
+ setAdStatus
9068
9942
  },
9069
9943
  analytics: {
9070
9944
  post: (postId, options = {}) => decode(PostAnalytics, analyticsPostsGet({