@streamscloud/streams-api-client 1.0.0 → 2.0.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.
Files changed (52) hide show
  1. package/dist/adcampaignsquery.graphql.js +3 -0
  2. package/dist/articlequery.graphql.js +3 -0
  3. package/dist/components-data/component-data-provider.service.d.ts +3 -0
  4. package/dist/components-data/component-data-provider.service.js +35 -0
  5. package/dist/components-data/components-data-fetcher.service.d.ts +5 -0
  6. package/dist/components-data/components-data-fetcher.service.js +35 -0
  7. package/dist/components-data/components-data-parameters-reader.service.d.ts +2 -0
  8. package/dist/components-data/components-data-parameters-reader.service.js +20 -0
  9. package/dist/components-data/index.d.ts +4 -0
  10. package/dist/components-data/index.js +3 -0
  11. package/dist/components-data/types.d.ts +24 -0
  12. package/dist/components-data/types.js +6 -0
  13. package/dist/contentlistsquery.graphql.js +3 -0
  14. package/dist/data-loaders/index.d.ts +2 -0
  15. package/dist/data-loaders/index.js +2 -0
  16. package/dist/data-loaders/short-videos-data-loader/index.d.ts +2 -0
  17. package/dist/data-loaders/short-videos-data-loader/loader.d.ts +4 -0
  18. package/dist/data-loaders/short-videos-data-loader/loader.js +14 -0
  19. package/dist/data-loaders/short-videos-data-loader/mapper.d.ts +3 -0
  20. package/dist/data-loaders/short-videos-data-loader/mapper.js +27 -0
  21. package/dist/data-loaders/short-videos-data-loader/types.d.ts +14 -0
  22. package/dist/data-loaders/streams-data-loader/index.d.ts +2 -0
  23. package/dist/data-loaders/streams-data-loader/loader.d.ts +4 -0
  24. package/dist/data-loaders/streams-data-loader/loader.js +14 -0
  25. package/dist/data-loaders/streams-data-loader/mapper.d.ts +3 -0
  26. package/dist/data-loaders/streams-data-loader/mapper.js +11 -0
  27. package/dist/data-loaders/streams-data-loader/types.d.ts +4 -0
  28. package/dist/data-loaders/types.d.ts +3 -0
  29. package/dist/index.js +4 -347
  30. package/dist/postsquery.graphql.js +3 -0
  31. package/dist/services/embed-content-api-client.d.ts +8 -0
  32. package/dist/services/embed-content-api-client.js +48 -0
  33. package/dist/services/embed-content-client.service.d.ts +2 -0
  34. package/dist/services/embed-content-client.service.js +5 -0
  35. package/dist/services/index.d.ts +2 -0
  36. package/dist/services/index.js +2 -0
  37. package/dist/services/operations/posts-query.graphql.js +3 -0
  38. package/dist/services/operations/streams-query.graphql.js +3 -0
  39. package/dist/services/types.d.ts +303 -0
  40. package/dist/streams-content-api-client.js +9 -7
  41. package/dist/types.d.ts +3 -3
  42. package/dist/types.js +33 -32
  43. package/package.json +23 -3
  44. package/dist/adcampaignsquery.graphql +0 -42
  45. package/dist/articlequery.graphql +0 -135
  46. package/dist/contentlistsquery.graphql +0 -12
  47. package/dist/index.js.map +0 -1
  48. package/dist/postsquery.graphql +0 -152
  49. package/dist/streams-api-client-model.js +0 -2
  50. package/dist/streams-api-client-model.js.map +0 -1
  51. package/dist/streams-content-api-client.js.map +0 -1
  52. package/dist/types.js.map +0 -1
@@ -0,0 +1,303 @@
1
+ import { MediaItem } from '../types';
2
+ export type EmbedContentApiClientModel = {
3
+ streamsGqlEndpoint: string;
4
+ };
5
+ export type EmbedPostsInput = {
6
+ filter: EmbedPostsFilterInput;
7
+ };
8
+ export type EmbedStreamsInput = {
9
+ filter: EmbedPostsFilterInput;
10
+ };
11
+ export interface Media {
12
+ type: MediaType;
13
+ url: string;
14
+ thumbnailUrl: string | null;
15
+ }
16
+ export type EmbedPostsFilterInput = {
17
+ ids: string[];
18
+ };
19
+ export type EmbedPostsData = {
20
+ embedPosts: CursorResultOfPost;
21
+ };
22
+ export type EmbedStreamsFilterInput = {
23
+ ids: string[];
24
+ };
25
+ export type EmbedStreamsData = {
26
+ embedStreams: CursorResultOfStreams;
27
+ };
28
+ export type GqlResponse<T> = {
29
+ data?: T;
30
+ errors?: unknown;
31
+ };
32
+ export type ContentMediaItem = IMediaItem & {
33
+ blobId: string;
34
+ mediaPageTags?: MediaPageTagPosition[];
35
+ metadata: MediaItemMetadata;
36
+ thumbnailBlobId?: string;
37
+ thumbnailUrl: string | null;
38
+ type: MediaType;
39
+ url: string;
40
+ userTags?: UserTagPosition[];
41
+ };
42
+ export type CtaButton = {
43
+ background: string;
44
+ border: string;
45
+ text: string;
46
+ textColor: string;
47
+ url: string;
48
+ };
49
+ export type IMediaItem = {
50
+ blobId: string;
51
+ metadata: MediaItemMetadata;
52
+ thumbnailBlobId?: string;
53
+ thumbnailUrl?: string;
54
+ type: MediaType;
55
+ url: string;
56
+ };
57
+ export declare enum MediaFormat {
58
+ W4H3 = "W4H3",
59
+ W16H9 = "W16H9"
60
+ }
61
+ export type MediaItemMetadata = {
62
+ durationSec?: number;
63
+ fileName?: string;
64
+ height: number;
65
+ width: number;
66
+ };
67
+ export type MediaPageTag = {
68
+ handle: string;
69
+ id: string;
70
+ image?: string;
71
+ name: string;
72
+ };
73
+ export type MediaPageTagPosition = TagPosition & {
74
+ itemId: string;
75
+ leftPCT: number;
76
+ mediaPage?: MediaPageTag;
77
+ topPCT: number;
78
+ };
79
+ export type MediaPostData = {
80
+ ctaButton?: CtaButton;
81
+ preferredMediaFormat: MediaFormat;
82
+ text?: string;
83
+ };
84
+ export declare enum MediaType {
85
+ Audio = "AUDIO",
86
+ Image = "IMAGE",
87
+ ShortVideo = "SHORT_VIDEO",
88
+ Video = "VIDEO"
89
+ }
90
+ export type MomentInfo = {
91
+ author: Profile;
92
+ cover: string;
93
+ displayDate: Date;
94
+ id: string;
95
+ isSeen: boolean;
96
+ text?: string;
97
+ };
98
+ export declare enum MomentLifetime {
99
+ Day = "DAY",
100
+ Week = "WEEK"
101
+ }
102
+ export type MomentPostData = {
103
+ lifetime: MomentLifetime;
104
+ text?: string;
105
+ };
106
+ export type MomentsContainerInfo = {
107
+ hideIfNoMoments: boolean;
108
+ image?: ScaledImageBlob;
109
+ momentsEnabled: boolean;
110
+ primaryColor?: string;
111
+ targetId: string;
112
+ targetType: PublishTargetType;
113
+ useImageAsMomentsCover: boolean;
114
+ };
115
+ export type MomentsInfo = {
116
+ containerInfo: MomentsContainerInfo;
117
+ moments: MomentInfo[];
118
+ unseenMomentsCount: number;
119
+ };
120
+ export type CursorResultOfStreams = {
121
+ continuationToken?: string;
122
+ items: Stream[];
123
+ };
124
+ export type CursorResultOfPost = {
125
+ continuationToken?: string;
126
+ items: Post[];
127
+ };
128
+ export type Post = {
129
+ authorProfile: Profile;
130
+ createdAt: Date;
131
+ createdBy: string;
132
+ displayDate: Date;
133
+ editorProfile: Profile;
134
+ enableSocialInteractions: boolean;
135
+ expiresOn?: Date;
136
+ generatedName: string;
137
+ id: string;
138
+ isPinned: boolean;
139
+ isSeen: boolean;
140
+ language: string;
141
+ mainImage?: string;
142
+ ownerProfile: Profile;
143
+ postData: PostData;
144
+ postHeading: PostHeading;
145
+ postProfile: Profile;
146
+ postType: PostType;
147
+ publishedTo?: PublishTarget;
148
+ scheduledOn?: Date;
149
+ sharesCount: number;
150
+ showInFeed: boolean;
151
+ social?: PostSocialInteractions;
152
+ status: Status;
153
+ updatedAt: Date;
154
+ updatedBy: string;
155
+ userReaction?: Reaction;
156
+ viewsCount: number;
157
+ };
158
+ export type PostData = {
159
+ media: ContentMediaItem[];
160
+ mediaData?: MediaPostData;
161
+ momentData?: MomentPostData;
162
+ postType: PostType;
163
+ shortVideoData?: ShortVideoPostData;
164
+ textData?: TextPostData;
165
+ videoData?: VideoPostData;
166
+ };
167
+ export type PostHeading = {
168
+ networkData?: PostHeadingNetworkTargetData;
169
+ postDisplayDate: string;
170
+ postViewsCount: number;
171
+ sourceHandle: string;
172
+ sourceId: string;
173
+ sourceImage?: string;
174
+ sourceIsRemoved: boolean;
175
+ sourceName: string;
176
+ sourceType: PostSourceType;
177
+ wasModified: boolean;
178
+ };
179
+ export type PostHeadingNetworkTargetData = {
180
+ momentsInfo: MomentsInfo;
181
+ primaryColor?: string;
182
+ };
183
+ export type PostSocialInteractions = {
184
+ commentsCount: number;
185
+ reactions: ReactionsCount;
186
+ sharesCount: number;
187
+ };
188
+ export declare enum PostSourceType {
189
+ Channel = "CHANNEL",
190
+ Group = "GROUP",
191
+ MediaPage = "MEDIA_PAGE",
192
+ Organization = "ORGANIZATION",
193
+ UserProfile = "USER_PROFILE"
194
+ }
195
+ export declare enum PostType {
196
+ Article = "ARTICLE",
197
+ Audio = "AUDIO",
198
+ Event = "EVENT",
199
+ Link = "LINK",
200
+ Media = "MEDIA",
201
+ Moment = "MOMENT",
202
+ ShortVideo = "SHORT_VIDEO",
203
+ Text = "TEXT",
204
+ Video = "VIDEO"
205
+ }
206
+ export type Profile = {
207
+ __typename?: 'Profile';
208
+ handle: string;
209
+ id: string;
210
+ image?: string;
211
+ isRemoved: boolean;
212
+ name: string;
213
+ type: ProfileType;
214
+ };
215
+ export declare enum ProfileType {
216
+ Channel = "CHANNEL",
217
+ Group = "GROUP",
218
+ Organization = "ORGANIZATION",
219
+ User = "USER"
220
+ }
221
+ export type PublishTarget = {
222
+ enableMoments: boolean;
223
+ enablePostsSocialInteractionsByDefault: boolean;
224
+ id: string;
225
+ image?: string;
226
+ isRemoved: boolean;
227
+ momentsLifetime: MomentLifetime;
228
+ name: string;
229
+ primaryColor?: string;
230
+ targetContentOwnerProfile?: Profile;
231
+ type: PublishTargetType;
232
+ };
233
+ export declare enum PublishTargetType {
234
+ Channel = "CHANNEL",
235
+ Group = "GROUP",
236
+ MediaPage = "MEDIA_PAGE",
237
+ User = "USER"
238
+ }
239
+ export declare enum ReactableType {
240
+ ChatMessage = "CHAT_MESSAGE",
241
+ Comment = "COMMENT",
242
+ CommunityMessage = "COMMUNITY_MESSAGE",
243
+ Post = "POST"
244
+ }
245
+ export type Reaction = {
246
+ code: string;
247
+ id: string;
248
+ reactableId: string;
249
+ reactableType: ReactableType;
250
+ userProfile: Profile;
251
+ };
252
+ export type ReactionCodeCount = {
253
+ code: string;
254
+ count: number;
255
+ };
256
+ export type ReactionsCount = {
257
+ perCode: ReactionCodeCount[];
258
+ total: number;
259
+ };
260
+ export type ScaledImageBlob = {
261
+ id: string;
262
+ url: string;
263
+ };
264
+ export type ShortVideoPostData = {
265
+ text?: string;
266
+ };
267
+ export declare enum Status {
268
+ Archived = "ARCHIVED",
269
+ Draft = "DRAFT",
270
+ Published = "PUBLISHED",
271
+ Scheduled = "SCHEDULED"
272
+ }
273
+ export type Stream = {
274
+ id: string;
275
+ cover: MediaItem;
276
+ };
277
+ export type TagPosition = {
278
+ itemId: string;
279
+ leftPCT: number;
280
+ topPCT: number;
281
+ };
282
+ export type TextPostData = {
283
+ ctaButton?: CtaButton;
284
+ text: string;
285
+ };
286
+ export type UserTag = {
287
+ id: string;
288
+ image: string;
289
+ name: string;
290
+ username?: string;
291
+ };
292
+ export type UserTagPosition = TagPosition & {
293
+ itemId: string;
294
+ leftPCT: number;
295
+ topPCT: number;
296
+ user?: UserTag;
297
+ };
298
+ export type VideoPostData = {
299
+ preferredMediaFormat: MediaFormat;
300
+ text?: string;
301
+ title?: string;
302
+ viewsCount?: number;
303
+ };
@@ -1,9 +1,10 @@
1
- import SiteActiveCampaignsQuery from './adcampaignsquery.graphql';
2
- import SiteArticleQuery from './articlequery.graphql';
3
- import SiteContentListsQuery from './contentlistsquery.graphql';
4
- import SitePostsQuery from './postsquery.graphql';
5
- import { SiteAdCampaignsOrderBy, SiteContentListsOrderBy, SitePostsOrderBy } from './types';
6
- export class StreamsContentApiClient {
1
+ import SiteActiveCampaignsQuery from './adcampaignsquery.graphql.js';
2
+ import SiteArticleQuery from './articlequery.graphql.js';
3
+ import SiteContentListsQuery from './contentlistsquery.graphql.js';
4
+ import SitePostsQuery from './postsquery.graphql.js';
5
+ import { SitePostsOrderBy, SiteContentListsOrderBy, SiteAdCampaignsOrderBy } from './types.js';
6
+
7
+ class StreamsContentApiClient {
7
8
  gqlEndpoint = '{{streamsGqlEndpoint}}';
8
9
  organizationId = '{{organizationId}}';
9
10
  siteId = '{{siteId}}';
@@ -84,4 +85,5 @@ export class StreamsContentApiClient {
84
85
  return gql.data;
85
86
  };
86
87
  }
87
- //# sourceMappingURL=streams-content-api-client.js.map
88
+
89
+ export { StreamsContentApiClient };
package/dist/types.d.ts CHANGED
@@ -200,7 +200,7 @@ export type ContentMediaItem = IMediaItem & {
200
200
  metadata: MediaItemMetadata;
201
201
  productTags?: ProductTagPosition[];
202
202
  thumbnailBlobId?: string;
203
- thumbnailUrl?: string;
203
+ thumbnailUrl: string | null;
204
204
  type: MediaType;
205
205
  url: string;
206
206
  userTags?: UserTagPosition[];
@@ -429,7 +429,7 @@ export type PostData = {
429
429
  audioData?: AudioPostData;
430
430
  eventData?: EventPostData;
431
431
  linkData?: LinkPostData;
432
- media?: ContentMediaItem[];
432
+ media: ContentMediaItem[];
433
433
  mediaData?: MediaPostData;
434
434
  momentData?: MomentPostData;
435
435
  postType: PostType;
@@ -439,7 +439,7 @@ export type PostData = {
439
439
  };
440
440
  export type PostHeading = {
441
441
  networkData?: PostHeadingNetworkTargetData;
442
- postDisplayDate: Date;
442
+ postDisplayDate: string;
443
443
  postViewsCount: number;
444
444
  sourceHandle: string;
445
445
  sourceId: string;
package/dist/types.js CHANGED
@@ -1,27 +1,27 @@
1
- export var AdType;
1
+ var AdType;
2
2
  (function (AdType) {
3
3
  AdType["BannerResponsive"] = "BANNER_RESPONSIVE";
4
4
  AdType["MediaDialogPromotion"] = "MEDIA_DIALOG_PROMOTION";
5
5
  AdType["Story"] = "STORY";
6
6
  })(AdType || (AdType = {}));
7
- export var AdPricingPlan;
7
+ var AdPricingPlan;
8
8
  (function (AdPricingPlan) {
9
9
  AdPricingPlan["Free"] = "FREE";
10
10
  AdPricingPlan["Paid"] = "PAID";
11
11
  })(AdPricingPlan || (AdPricingPlan = {}));
12
- export var AdStatus;
12
+ var AdStatus;
13
13
  (function (AdStatus) {
14
14
  AdStatus["Archived"] = "ARCHIVED";
15
15
  AdStatus["Draft"] = "DRAFT";
16
16
  AdStatus["Published"] = "PUBLISHED";
17
17
  })(AdStatus || (AdStatus = {}));
18
- export var SiteAdCampaignsOrderBy;
18
+ var SiteAdCampaignsOrderBy;
19
19
  (function (SiteAdCampaignsOrderBy) {
20
20
  SiteAdCampaignsOrderBy["Created"] = "CREATED";
21
21
  SiteAdCampaignsOrderBy["Modified"] = "MODIFIED";
22
22
  SiteAdCampaignsOrderBy["Name"] = "NAME";
23
23
  })(SiteAdCampaignsOrderBy || (SiteAdCampaignsOrderBy = {}));
24
- export var ArticleFieldType;
24
+ var ArticleFieldType;
25
25
  (function (ArticleFieldType) {
26
26
  ArticleFieldType["Byline"] = "BYLINE";
27
27
  ArticleFieldType["Image"] = "IMAGE";
@@ -31,55 +31,55 @@ export var ArticleFieldType;
31
31
  ArticleFieldType["Text"] = "TEXT";
32
32
  ArticleFieldType["Video"] = "VIDEO";
33
33
  })(ArticleFieldType || (ArticleFieldType = {}));
34
- export var ArticleLayoutType;
34
+ var ArticleLayoutType;
35
35
  (function (ArticleLayoutType) {
36
36
  ArticleLayoutType["Vertical"] = "VERTICAL";
37
37
  })(ArticleLayoutType || (ArticleLayoutType = {}));
38
- export var Currency;
38
+ var Currency;
39
39
  (function (Currency) {
40
40
  Currency["Eur"] = "EUR";
41
41
  Currency["Nok"] = "NOK";
42
42
  Currency["Usd"] = "USD";
43
43
  })(Currency || (Currency = {}));
44
- export var DisplayVariant;
44
+ var DisplayVariant;
45
45
  (function (DisplayVariant) {
46
46
  DisplayVariant["Variant1"] = "VARIANT1";
47
47
  })(DisplayVariant || (DisplayVariant = {}));
48
- export var GalleryFieldMode;
48
+ var GalleryFieldMode;
49
49
  (function (GalleryFieldMode) {
50
50
  GalleryFieldMode["Gallery"] = "GALLERY";
51
51
  GalleryFieldMode["Slider"] = "SLIDER";
52
52
  })(GalleryFieldMode || (GalleryFieldMode = {}));
53
- export var ImageScale;
53
+ var ImageScale;
54
54
  (function (ImageScale) {
55
55
  ImageScale["Big"] = "BIG";
56
56
  ImageScale["Medium"] = "MEDIUM";
57
57
  ImageScale["OriginalEncoded"] = "ORIGINAL_ENCODED";
58
58
  ImageScale["Small"] = "SMALL";
59
59
  })(ImageScale || (ImageScale = {}));
60
- export var LayoutMode;
60
+ var LayoutMode;
61
61
  (function (LayoutMode) {
62
62
  LayoutMode["Horizontal"] = "HORIZONTAL";
63
63
  LayoutMode["Standard"] = "STANDARD";
64
64
  })(LayoutMode || (LayoutMode = {}));
65
- export var MediaFormat;
65
+ var MediaFormat;
66
66
  (function (MediaFormat) {
67
67
  MediaFormat["W4H3"] = "W4H3";
68
68
  MediaFormat["W16H9"] = "W16H9";
69
69
  })(MediaFormat || (MediaFormat = {}));
70
- export var MediaType;
70
+ var MediaType;
71
71
  (function (MediaType) {
72
72
  MediaType["Audio"] = "AUDIO";
73
73
  MediaType["Image"] = "IMAGE";
74
74
  MediaType["ShortVideo"] = "SHORT_VIDEO";
75
75
  MediaType["Video"] = "VIDEO";
76
76
  })(MediaType || (MediaType = {}));
77
- export var MomentLifetime;
77
+ var MomentLifetime;
78
78
  (function (MomentLifetime) {
79
79
  MomentLifetime["Day"] = "DAY";
80
80
  MomentLifetime["Week"] = "WEEK";
81
81
  })(MomentLifetime || (MomentLifetime = {}));
82
- export var PostCategory;
82
+ var PostCategory;
83
83
  (function (PostCategory) {
84
84
  PostCategory["Education"] = "EDUCATION";
85
85
  PostCategory["Entertainment"] = "ENTERTAINMENT";
@@ -88,7 +88,7 @@ export var PostCategory;
88
88
  PostCategory["Shopping"] = "SHOPPING";
89
89
  PostCategory["Sports"] = "SPORTS";
90
90
  })(PostCategory || (PostCategory = {}));
91
- export var PostSourceType;
91
+ var PostSourceType;
92
92
  (function (PostSourceType) {
93
93
  PostSourceType["Channel"] = "CHANNEL";
94
94
  PostSourceType["Group"] = "GROUP";
@@ -96,7 +96,7 @@ export var PostSourceType;
96
96
  PostSourceType["Organization"] = "ORGANIZATION";
97
97
  PostSourceType["UserProfile"] = "USER_PROFILE";
98
98
  })(PostSourceType || (PostSourceType = {}));
99
- export var PostType;
99
+ var PostType;
100
100
  (function (PostType) {
101
101
  PostType["Article"] = "ARTICLE";
102
102
  PostType["Audio"] = "AUDIO";
@@ -108,12 +108,12 @@ export var PostType;
108
108
  PostType["Text"] = "TEXT";
109
109
  PostType["Video"] = "VIDEO";
110
110
  })(PostType || (PostType = {}));
111
- export var PostedAs;
111
+ var PostedAs;
112
112
  (function (PostedAs) {
113
113
  PostedAs["AuthorProfile"] = "AUTHOR_PROFILE";
114
114
  PostedAs["OwnerProfile"] = "OWNER_PROFILE";
115
115
  })(PostedAs || (PostedAs = {}));
116
- export var PricingMeasureUnit;
116
+ var PricingMeasureUnit;
117
117
  (function (PricingMeasureUnit) {
118
118
  PricingMeasureUnit["Other"] = "OTHER";
119
119
  PricingMeasureUnit["PerBag"] = "PER_BAG";
@@ -147,75 +147,76 @@ export var PricingMeasureUnit;
147
147
  PricingMeasureUnit["PerUnit"] = "PER_UNIT";
148
148
  PricingMeasureUnit["PerYard"] = "PER_YARD";
149
149
  })(PricingMeasureUnit || (PricingMeasureUnit = {}));
150
- export var ProductAnnotationPosition;
150
+ var ProductAnnotationPosition;
151
151
  (function (ProductAnnotationPosition) {
152
152
  ProductAnnotationPosition["BottomLeft"] = "BOTTOM_LEFT";
153
153
  ProductAnnotationPosition["BottomRight"] = "BOTTOM_RIGHT";
154
154
  ProductAnnotationPosition["TopLeft"] = "TOP_LEFT";
155
155
  ProductAnnotationPosition["TopRight"] = "TOP_RIGHT";
156
156
  })(ProductAnnotationPosition || (ProductAnnotationPosition = {}));
157
- export var ProductAnnotationType;
157
+ var ProductAnnotationType;
158
158
  (function (ProductAnnotationType) {
159
159
  ProductAnnotationType["Svg"] = "SVG";
160
160
  })(ProductAnnotationType || (ProductAnnotationType = {}));
161
- export var ProductAvailability;
161
+ var ProductAvailability;
162
162
  (function (ProductAvailability) {
163
163
  ProductAvailability["Backorder"] = "BACKORDER";
164
164
  ProductAvailability["InStock"] = "IN_STOCK";
165
165
  ProductAvailability["OutOfStock"] = "OUT_OF_STOCK";
166
166
  ProductAvailability["Preorder"] = "PREORDER";
167
167
  })(ProductAvailability || (ProductAvailability = {}));
168
- export var ProductStatus;
168
+ var ProductStatus;
169
169
  (function (ProductStatus) {
170
170
  ProductStatus["Archived"] = "ARCHIVED";
171
171
  ProductStatus["Draft"] = "DRAFT";
172
172
  ProductStatus["Published"] = "PUBLISHED";
173
173
  })(ProductStatus || (ProductStatus = {}));
174
- export var ProfileType;
174
+ var ProfileType;
175
175
  (function (ProfileType) {
176
176
  ProfileType["Channel"] = "CHANNEL";
177
177
  ProfileType["Group"] = "GROUP";
178
178
  ProfileType["Organization"] = "ORGANIZATION";
179
179
  ProfileType["User"] = "USER";
180
180
  })(ProfileType || (ProfileType = {}));
181
- export var PublishTargetType;
181
+ var PublishTargetType;
182
182
  (function (PublishTargetType) {
183
183
  PublishTargetType["Channel"] = "CHANNEL";
184
184
  PublishTargetType["Group"] = "GROUP";
185
185
  PublishTargetType["MediaPage"] = "MEDIA_PAGE";
186
186
  PublishTargetType["User"] = "USER";
187
187
  })(PublishTargetType || (PublishTargetType = {}));
188
- export var ReactableType;
188
+ var ReactableType;
189
189
  (function (ReactableType) {
190
190
  ReactableType["ChatMessage"] = "CHAT_MESSAGE";
191
191
  ReactableType["Comment"] = "COMMENT";
192
192
  ReactableType["CommunityMessage"] = "COMMUNITY_MESSAGE";
193
193
  ReactableType["Post"] = "POST";
194
194
  })(ReactableType || (ReactableType = {}));
195
- export var SitePostsOrderBy;
195
+ var SitePostsOrderBy;
196
196
  (function (SitePostsOrderBy) {
197
197
  SitePostsOrderBy["Published"] = "PUBLISHED";
198
198
  })(SitePostsOrderBy || (SitePostsOrderBy = {}));
199
- export var Status;
199
+ var Status;
200
200
  (function (Status) {
201
201
  Status["Archived"] = "ARCHIVED";
202
202
  Status["Draft"] = "DRAFT";
203
203
  Status["Published"] = "PUBLISHED";
204
204
  Status["Scheduled"] = "SCHEDULED";
205
205
  })(Status || (Status = {}));
206
- export var TextFieldMode;
206
+ var TextFieldMode;
207
207
  (function (TextFieldMode) {
208
208
  TextFieldMode["Multiline"] = "MULTILINE";
209
209
  TextFieldMode["SingleLine"] = "SINGLE_LINE";
210
210
  })(TextFieldMode || (TextFieldMode = {}));
211
- export var TextFieldWeight;
211
+ var TextFieldWeight;
212
212
  (function (TextFieldWeight) {
213
213
  TextFieldWeight["Bold"] = "BOLD";
214
214
  TextFieldWeight["Normal"] = "NORMAL";
215
215
  TextFieldWeight["SemiBold"] = "SEMI_BOLD";
216
216
  })(TextFieldWeight || (TextFieldWeight = {}));
217
- export var SiteContentListsOrderBy;
217
+ var SiteContentListsOrderBy;
218
218
  (function (SiteContentListsOrderBy) {
219
219
  SiteContentListsOrderBy["Name"] = "NAME";
220
220
  })(SiteContentListsOrderBy || (SiteContentListsOrderBy = {}));
221
- //# sourceMappingURL=types.js.map
221
+
222
+ export { AdPricingPlan, AdStatus, AdType, ArticleFieldType, ArticleLayoutType, Currency, DisplayVariant, GalleryFieldMode, ImageScale, LayoutMode, MediaFormat, MediaType, MomentLifetime, PostCategory, PostSourceType, PostType, PostedAs, PricingMeasureUnit, ProductAnnotationPosition, ProductAnnotationType, ProductAvailability, ProductStatus, ProfileType, PublishTargetType, ReactableType, SiteAdCampaignsOrderBy, SiteContentListsOrderBy, SitePostsOrderBy, Status, TextFieldMode, TextFieldWeight };
package/package.json CHANGED
@@ -1,9 +1,29 @@
1
1
  {
2
2
  "name": "@streamscloud/streams-api-client",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
- "main": "./dist/index.js",
6
- "types": "./dist/index.d.ts",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "svelte": "./dist/index.js"
13
+ },
14
+ "./data-loaders": {
15
+ "import": "./dist/data-loaders/index.js",
16
+ "types": "./dist/data-loaders/index.d.ts"
17
+ },
18
+ "./components-data": {
19
+ "import": "./dist/components-data/index.js",
20
+ "types": "./dist/components-data/index.d.ts"
21
+ },
22
+ "./services": {
23
+ "import": "./dist/services/index.js",
24
+ "types": "./dist/services/index.d.ts"
25
+ }
26
+ },
7
27
  "files": [
8
28
  "dist"
9
29
  ],
@@ -1,42 +0,0 @@
1
- query SiteActiveCampaigns($filter: SiteActiveCampaignsFilterInput!, $pageQuery: PaginationOfAdCampaignsOrderByInput!) {
2
- siteActiveCampaigns(filter: $filter, pagination: $pageQuery) {
3
- total
4
- items {
5
- id
6
- name
7
- status
8
- adGroupIds
9
- adGroups {
10
- name
11
- ads {
12
- ..._adForGridPayloadFragment
13
- }
14
- adPlacement {
15
- name
16
- }
17
- }
18
- status
19
- updatedAt
20
- editorProfile {
21
- id
22
- name
23
- handle
24
- image
25
- }
26
- }
27
- }
28
- }
29
-
30
- fragment _adForGridPayloadFragment on Ad {
31
- id
32
- media {
33
- type
34
- url
35
- thumbnailUrl
36
- }
37
- name
38
- title
39
- description
40
- status
41
- updatedAt
42
- }