@parra/parra-js-sdk 0.3.533 → 0.3.534

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.
@@ -418,6 +418,7 @@ export interface TenantMemberTenantStub {
418
418
  export interface TenantMemberTeamMemberStub {
419
419
  id: string;
420
420
  user_id: string;
421
+ roles?: Array<string> | null;
421
422
  }
422
423
  export interface TenantMember {
423
424
  tenant: TenantMemberTenantStub;
@@ -2024,6 +2025,39 @@ export interface CreatorUpdateGiveawayWinnerResponse {
2024
2025
  export interface ScheduleCreatorUpdateRequestBody {
2025
2026
  schedule_at: string;
2026
2027
  }
2028
+ export interface CreateYoutubeSocialAccountRequestBody {
2029
+ type: string;
2030
+ handle?: string | null;
2031
+ connection_id?: string | null;
2032
+ channel_id?: string | null;
2033
+ playlist_id?: string | null;
2034
+ }
2035
+ export interface CreateXSocialAccountRequestBody {
2036
+ type: string;
2037
+ handle?: string | null;
2038
+ connection_id?: string | null;
2039
+ }
2040
+ export interface CreateTiktokSocialAccountRequestBody {
2041
+ type: string;
2042
+ handle: string;
2043
+ connection_id?: string | null;
2044
+ }
2045
+ export interface CreateInstagramSocialAccountRequestBody {
2046
+ type: string;
2047
+ username: string;
2048
+ connection_id?: string | null;
2049
+ }
2050
+ export interface CreateFacebookSocialAccountRequestBody {
2051
+ type: string;
2052
+ page_id: string;
2053
+ connection_id?: string | null;
2054
+ }
2055
+ export interface CreateTwitchSocialAccountRequestBody {
2056
+ type: string;
2057
+ handle: string;
2058
+ connection_id?: string | null;
2059
+ }
2060
+ export type CreateSocialAccountRequestBody = CreateYoutubeSocialAccountRequestBody | CreateXSocialAccountRequestBody | CreateTiktokSocialAccountRequestBody | CreateInstagramSocialAccountRequestBody | CreateFacebookSocialAccountRequestBody | CreateTwitchSocialAccountRequestBody;
2027
2061
  export declare enum SocialAccountType {
2028
2062
  x = "x",
2029
2063
  youtube = "youtube",
@@ -2032,16 +2066,41 @@ export declare enum SocialAccountType {
2032
2066
  facebook = "facebook"
2033
2067
  }
2034
2068
  export interface SocialAccountYoutubeData {
2035
- channel_id: string;
2036
- channel_title: string;
2037
2069
  channel_handle: string;
2070
+ channel_id?: string | null;
2071
+ channel_title?: string | null;
2038
2072
  }
2039
2073
  export interface SocialAccountXData {
2040
- user_id: string;
2041
2074
  username: string;
2042
- name: string;
2075
+ user_id?: string | null;
2076
+ name?: string | null;
2077
+ }
2078
+ export interface SocialAccountTiktokData {
2079
+ handle: string;
2080
+ display_name?: string | null;
2081
+ bio?: string | null;
2082
+ profile_image_url?: string | null;
2083
+ }
2084
+ export interface SocialAccountInstagramData {
2085
+ username: string;
2086
+ full_name?: string | null;
2087
+ biography?: string | null;
2088
+ profile_image_url?: string | null;
2089
+ }
2090
+ export interface SocialAccountFacebookData {
2091
+ page_id: string;
2092
+ page_name?: string | null;
2093
+ page_description?: string | null;
2094
+ page_profile_image_url?: string | null;
2095
+ page_cover_image_url?: string | null;
2096
+ }
2097
+ export interface SocialAccountTwitchData {
2098
+ handle: string;
2099
+ display_name?: string | null;
2100
+ description?: string | null;
2101
+ profile_image_url?: string | null;
2043
2102
  }
2044
- export type SocialAccountData = SocialAccountYoutubeData | SocialAccountXData;
2103
+ export type SocialAccountData = SocialAccountYoutubeData | SocialAccountXData | SocialAccountTiktokData | SocialAccountInstagramData | SocialAccountFacebookData | SocialAccountTwitchData;
2045
2104
  export interface SocialAccountYoutubeMetrics {
2046
2105
  last_synced_at: string;
2047
2106
  subscriber_count: number;
@@ -2063,7 +2122,7 @@ export interface SocialAccount {
2063
2122
  deleted_at?: string | null;
2064
2123
  tenant_id: string;
2065
2124
  type: SocialAccountType;
2066
- connected_app_connection_id: string;
2125
+ connected_app_connection_id?: string | null;
2067
2126
  data: SocialAccountData;
2068
2127
  metrics?: SocialAccountMetrics | null;
2069
2128
  }
@@ -2105,7 +2164,8 @@ export interface CreateFeedRequestBody {
2105
2164
  export declare enum FeedItemType {
2106
2165
  youtubeVideo = "youtube_video",
2107
2166
  contentCard = "content_card",
2108
- creatorUpdate = "creator_update"
2167
+ creatorUpdate = "creator_update",
2168
+ rssItem = "rss_item"
2109
2169
  }
2110
2170
  export interface EntitlementStub {
2111
2171
  id: string;
@@ -2192,7 +2252,13 @@ export interface CreatorUpdateAppStub {
2192
2252
  attachments?: Array<CreatorUpdateAttachmentStub>;
2193
2253
  attachment_paywall?: AppPaywallConfiguration | null;
2194
2254
  }
2195
- export type FeedItemData = AppYoutubeVideo | AppContentCard | CreatorUpdateAppStub;
2255
+ export interface AppRssItem {
2256
+ id: string;
2257
+ title: string;
2258
+ description: string;
2259
+ image_url?: string | null;
2260
+ }
2261
+ export type FeedItemData = AppYoutubeVideo | AppContentCard | CreatorUpdateAppStub | AppRssItem;
2196
2262
  export declare enum ReactionType {
2197
2263
  emoji = "emoji",
2198
2264
  custom = "custom"
@@ -5371,6 +5437,7 @@ declare class ParraAPI {
5371
5437
  sendCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
5372
5438
  scheduleCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, body: ScheduleCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
5373
5439
  deleteAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, creator_update_attachment_id: string, options?: Options) => Promise<Response>;
5440
+ createSocialAccountForTenant: (tenant_id: string, body?: CreateSocialAccountRequestBody, options?: Options) => Promise<SocialAccount>;
5374
5441
  listSocialAccountsForTenant: (tenant_id: string, query?: {
5375
5442
  include?: string;
5376
5443
  }, options?: Options) => Promise<Array<SocialAccount>>;
package/dist/ParraAPI.js CHANGED
@@ -250,6 +250,7 @@ var FeedItemType;
250
250
  FeedItemType["youtubeVideo"] = "youtube_video";
251
251
  FeedItemType["contentCard"] = "content_card";
252
252
  FeedItemType["creatorUpdate"] = "creator_update";
253
+ FeedItemType["rssItem"] = "rss_item";
253
254
  })(FeedItemType || (exports.FeedItemType = FeedItemType = {}));
254
255
  var ReactionType;
255
256
  (function (ReactionType) {
@@ -1292,6 +1293,12 @@ var ParraAPI = /** @class */ (function () {
1292
1293
  if (options === void 0) { options = {}; }
1293
1294
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/attachments/").concat(creator_update_attachment_id), method: "delete" }, options));
1294
1295
  };
1296
+ this.createSocialAccountForTenant = function (tenant_id, body, options) {
1297
+ if (options === void 0) { options = {}; }
1298
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/social/accounts"), method: "post", body: JSON.stringify(body), headers: {
1299
+ "content-type": "application/json",
1300
+ } }, options));
1301
+ };
1295
1302
  this.listSocialAccountsForTenant = function (tenant_id, query, options) {
1296
1303
  if (options === void 0) { options = {}; }
1297
1304
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/social/accounts"), method: "get", query: query }, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.533",
3
+ "version": "0.3.534",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",