@parra/parra-js-sdk 0.3.533 → 0.3.535

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,24 +2025,83 @@ 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",
2030
2064
  tiktok = "tiktok",
2031
2065
  instagram = "instagram",
2032
- facebook = "facebook"
2066
+ facebook = "facebook",
2067
+ twitch = "twitch"
2033
2068
  }
2034
2069
  export interface SocialAccountYoutubeData {
2035
- channel_id: string;
2036
- channel_title: string;
2037
2070
  channel_handle: string;
2071
+ channel_id?: string | null;
2072
+ channel_title?: string | null;
2038
2073
  }
2039
2074
  export interface SocialAccountXData {
2040
- user_id: string;
2041
2075
  username: string;
2042
- name: string;
2076
+ user_id?: string | null;
2077
+ name?: string | null;
2043
2078
  }
2044
- export type SocialAccountData = SocialAccountYoutubeData | SocialAccountXData;
2079
+ export interface SocialAccountTiktokData {
2080
+ handle: string;
2081
+ display_name?: string | null;
2082
+ bio?: string | null;
2083
+ profile_image_url?: string | null;
2084
+ }
2085
+ export interface SocialAccountInstagramData {
2086
+ username: string;
2087
+ full_name?: string | null;
2088
+ biography?: string | null;
2089
+ profile_image_url?: string | null;
2090
+ }
2091
+ export interface SocialAccountFacebookData {
2092
+ page_id: string;
2093
+ page_name?: string | null;
2094
+ page_description?: string | null;
2095
+ page_profile_image_url?: string | null;
2096
+ page_cover_image_url?: string | null;
2097
+ }
2098
+ export interface SocialAccountTwitchData {
2099
+ handle: string;
2100
+ display_name?: string | null;
2101
+ description?: string | null;
2102
+ profile_image_url?: string | null;
2103
+ }
2104
+ export type SocialAccountData = SocialAccountYoutubeData | SocialAccountXData | SocialAccountTiktokData | SocialAccountInstagramData | SocialAccountFacebookData | SocialAccountTwitchData;
2045
2105
  export interface SocialAccountYoutubeMetrics {
2046
2106
  last_synced_at: string;
2047
2107
  subscriber_count: number;
@@ -2063,7 +2123,7 @@ export interface SocialAccount {
2063
2123
  deleted_at?: string | null;
2064
2124
  tenant_id: string;
2065
2125
  type: SocialAccountType;
2066
- connected_app_connection_id: string;
2126
+ connected_app_connection_id?: string | null;
2067
2127
  data: SocialAccountData;
2068
2128
  metrics?: SocialAccountMetrics | null;
2069
2129
  }
@@ -2105,7 +2165,8 @@ export interface CreateFeedRequestBody {
2105
2165
  export declare enum FeedItemType {
2106
2166
  youtubeVideo = "youtube_video",
2107
2167
  contentCard = "content_card",
2108
- creatorUpdate = "creator_update"
2168
+ creatorUpdate = "creator_update",
2169
+ rssItem = "rss_item"
2109
2170
  }
2110
2171
  export interface EntitlementStub {
2111
2172
  id: string;
@@ -2192,7 +2253,13 @@ export interface CreatorUpdateAppStub {
2192
2253
  attachments?: Array<CreatorUpdateAttachmentStub>;
2193
2254
  attachment_paywall?: AppPaywallConfiguration | null;
2194
2255
  }
2195
- export type FeedItemData = AppYoutubeVideo | AppContentCard | CreatorUpdateAppStub;
2256
+ export interface AppRssItem {
2257
+ id: string;
2258
+ title: string;
2259
+ description: string;
2260
+ image_url?: string | null;
2261
+ }
2262
+ export type FeedItemData = AppYoutubeVideo | AppContentCard | CreatorUpdateAppStub | AppRssItem;
2196
2263
  export declare enum ReactionType {
2197
2264
  emoji = "emoji",
2198
2265
  custom = "custom"
@@ -5371,6 +5438,7 @@ declare class ParraAPI {
5371
5438
  sendCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
5372
5439
  scheduleCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, body: ScheduleCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
5373
5440
  deleteAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, creator_update_attachment_id: string, options?: Options) => Promise<Response>;
5441
+ createSocialAccountForTenant: (tenant_id: string, body?: CreateSocialAccountRequestBody, options?: Options) => Promise<SocialAccount>;
5374
5442
  listSocialAccountsForTenant: (tenant_id: string, query?: {
5375
5443
  include?: string;
5376
5444
  }, options?: Options) => Promise<Array<SocialAccount>>;
package/dist/ParraAPI.js CHANGED
@@ -244,12 +244,14 @@ var SocialAccountType;
244
244
  SocialAccountType["tiktok"] = "tiktok";
245
245
  SocialAccountType["instagram"] = "instagram";
246
246
  SocialAccountType["facebook"] = "facebook";
247
+ SocialAccountType["twitch"] = "twitch";
247
248
  })(SocialAccountType || (exports.SocialAccountType = SocialAccountType = {}));
248
249
  var FeedItemType;
249
250
  (function (FeedItemType) {
250
251
  FeedItemType["youtubeVideo"] = "youtube_video";
251
252
  FeedItemType["contentCard"] = "content_card";
252
253
  FeedItemType["creatorUpdate"] = "creator_update";
254
+ FeedItemType["rssItem"] = "rss_item";
253
255
  })(FeedItemType || (exports.FeedItemType = FeedItemType = {}));
254
256
  var ReactionType;
255
257
  (function (ReactionType) {
@@ -1292,6 +1294,12 @@ var ParraAPI = /** @class */ (function () {
1292
1294
  if (options === void 0) { options = {}; }
1293
1295
  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
1296
  };
1297
+ this.createSocialAccountForTenant = function (tenant_id, body, options) {
1298
+ if (options === void 0) { options = {}; }
1299
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/social/accounts"), method: "post", body: JSON.stringify(body), headers: {
1300
+ "content-type": "application/json",
1301
+ } }, options));
1302
+ };
1295
1303
  this.listSocialAccountsForTenant = function (tenant_id, query, options) {
1296
1304
  if (options === void 0) { options = {}; }
1297
1305
  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.535",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",