@parra/parra-js-sdk 0.3.531 → 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.
@@ -409,6 +409,25 @@ export interface UserResponse {
409
409
  role_other_description?: string | null;
410
410
  avatar?: ImageAssetStub;
411
411
  }
412
+ export interface TenantMemberTenantStub {
413
+ id: string;
414
+ team_member_id: string;
415
+ entitlements?: Array<TenantEntitlement> | null;
416
+ scopes: Array<string>;
417
+ }
418
+ export interface TenantMemberTeamMemberStub {
419
+ id: string;
420
+ user_id: string;
421
+ roles?: Array<string> | null;
422
+ }
423
+ export interface TenantMember {
424
+ tenant: TenantMemberTenantStub;
425
+ team_member: TenantMemberTeamMemberStub;
426
+ }
427
+ export interface MemberResponse {
428
+ tenant: TenantMemberTenantStub;
429
+ team_member: TenantMemberTeamMemberStub;
430
+ }
412
431
  export declare enum IdentityType {
413
432
  anonymous = "anonymous",
414
433
  username = "username",
@@ -559,6 +578,7 @@ export interface TenantUser {
559
578
  export interface UserInfoResponse {
560
579
  roles?: Array<string>;
561
580
  user?: UserResponse | null;
581
+ team_member?: MemberResponse | null;
562
582
  tenant_user?: TenantUser | null;
563
583
  }
564
584
  export interface AuthToken {
@@ -2005,6 +2025,39 @@ export interface CreatorUpdateGiveawayWinnerResponse {
2005
2025
  export interface ScheduleCreatorUpdateRequestBody {
2006
2026
  schedule_at: string;
2007
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;
2008
2061
  export declare enum SocialAccountType {
2009
2062
  x = "x",
2010
2063
  youtube = "youtube",
@@ -2013,16 +2066,41 @@ export declare enum SocialAccountType {
2013
2066
  facebook = "facebook"
2014
2067
  }
2015
2068
  export interface SocialAccountYoutubeData {
2016
- channel_id: string;
2017
- channel_title: string;
2018
2069
  channel_handle: string;
2070
+ channel_id?: string | null;
2071
+ channel_title?: string | null;
2019
2072
  }
2020
2073
  export interface SocialAccountXData {
2021
- user_id: string;
2022
2074
  username: string;
2023
- 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;
2024
2083
  }
2025
- export type SocialAccountData = SocialAccountYoutubeData | SocialAccountXData;
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;
2102
+ }
2103
+ export type SocialAccountData = SocialAccountYoutubeData | SocialAccountXData | SocialAccountTiktokData | SocialAccountInstagramData | SocialAccountFacebookData | SocialAccountTwitchData;
2026
2104
  export interface SocialAccountYoutubeMetrics {
2027
2105
  last_synced_at: string;
2028
2106
  subscriber_count: number;
@@ -2044,7 +2122,7 @@ export interface SocialAccount {
2044
2122
  deleted_at?: string | null;
2045
2123
  tenant_id: string;
2046
2124
  type: SocialAccountType;
2047
- connected_app_connection_id: string;
2125
+ connected_app_connection_id?: string | null;
2048
2126
  data: SocialAccountData;
2049
2127
  metrics?: SocialAccountMetrics | null;
2050
2128
  }
@@ -2086,7 +2164,8 @@ export interface CreateFeedRequestBody {
2086
2164
  export declare enum FeedItemType {
2087
2165
  youtubeVideo = "youtube_video",
2088
2166
  contentCard = "content_card",
2089
- creatorUpdate = "creator_update"
2167
+ creatorUpdate = "creator_update",
2168
+ rssItem = "rss_item"
2090
2169
  }
2091
2170
  export interface EntitlementStub {
2092
2171
  id: string;
@@ -2173,7 +2252,13 @@ export interface CreatorUpdateAppStub {
2173
2252
  attachments?: Array<CreatorUpdateAttachmentStub>;
2174
2253
  attachment_paywall?: AppPaywallConfiguration | null;
2175
2254
  }
2176
- 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;
2177
2262
  export declare enum ReactionType {
2178
2263
  emoji = "emoji",
2179
2264
  custom = "custom"
@@ -5168,7 +5253,9 @@ declare class ParraAPI {
5168
5253
  version_token?: string;
5169
5254
  }, options?: Options) => Promise<AppInfo>;
5170
5255
  checkAuthorization: (body: CheckAuthorizationRequestBody, options?: Options) => Promise<CheckAuthorization>;
5171
- getUserInfo: (options?: Options) => Promise<UserInfoResponse>;
5256
+ getUserInfo: (query?: {
5257
+ tenant_id?: string | null;
5258
+ }, options?: Options) => Promise<UserInfoResponse>;
5172
5259
  getParraAuthToken: (options?: Options) => Promise<AuthToken>;
5173
5260
  listImageAssetsForTenantById: (tenant_id: string, query?: {
5174
5261
  ids?: string;
@@ -5350,6 +5437,7 @@ declare class ParraAPI {
5350
5437
  sendCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
5351
5438
  scheduleCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, body: ScheduleCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
5352
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>;
5353
5441
  listSocialAccountsForTenant: (tenant_id: string, query?: {
5354
5442
  include?: string;
5355
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) {
@@ -550,9 +551,9 @@ var ParraAPI = /** @class */ (function () {
550
551
  "content-type": "application/json",
551
552
  } }, options));
552
553
  };
553
- this.getUserInfo = function (options) {
554
+ this.getUserInfo = function (query, options) {
554
555
  if (options === void 0) { options = {}; }
555
- return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/user-info"), method: "get" }, options));
556
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/user-info"), method: "get", query: query }, options));
556
557
  };
557
558
  this.getParraAuthToken = function (options) {
558
559
  if (options === void 0) { options = {}; }
@@ -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.531",
3
+ "version": "0.3.534",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",