@zyacreatives/shared 2.1.67 → 2.1.69

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.
@@ -340,3 +340,37 @@ export declare const DEFAULT_DISCIPLINES: {
340
340
  name: string;
341
341
  slug: string;
342
342
  }[];
343
+ export declare const ANALYTICS_EVENTS: {
344
+ readonly POST: {
345
+ readonly VIEW_DETAILS: "post_view_details";
346
+ readonly LIKE: "post_like";
347
+ readonly BOOKMARK: "post_bookmark";
348
+ readonly VIEW_LIKES_LIST: "post_view_likes_list";
349
+ readonly TAG_CLICK: "post_tag_click";
350
+ readonly LINK_PREVIEW_CLICK: "post_link_preview_click";
351
+ readonly MEDIA_EXPAND: "post_media_expand";
352
+ readonly LIGHTBOX_NAV: "post_lightbox_nav";
353
+ readonly LIGHTBOX_THUMB_SELECT: "post_lightbox_thumb_select";
354
+ readonly VIDEO_VIEW: "post_video_view";
355
+ readonly SHARE_MENU_OPEN: "post_share_menu_open";
356
+ readonly LINK_COPIED: "post_link_copied";
357
+ readonly EXTERNAL_SHARE: "post_external_share";
358
+ readonly DM_CLICK: "post_dm_click";
359
+ readonly FOLLOW: "post_creator_follow";
360
+ readonly UNFOLLOW: "post_creator_unfollow";
361
+ readonly VIEW_OWN_ANALYTICS: "post_creator_view_analytics";
362
+ readonly REPORT: "post_report";
363
+ readonly NOT_INTERESTED: "post_not_interested";
364
+ };
365
+ readonly COMMENT: {
366
+ readonly FORM_FOCUS: "comment_form_focus";
367
+ readonly SUBMIT_SUCCESS: "comment_submit_success";
368
+ readonly LIST_LOAD_MORE: "comment_list_load_more";
369
+ readonly ITEM_LIKE: "comment_item_like";
370
+ readonly ITEM_REPLY_CLICK: "comment_item_reply_click";
371
+ readonly ITEM_REPLIES_TOGGLE: "comment_item_replies_toggle";
372
+ readonly ITEM_SHARE: "comment_item_share";
373
+ readonly ITEM_PROFILE_CLICK: "comment_item_profile_click";
374
+ readonly EMPTY_STATE_VIEW: "comment_empty_state_view";
375
+ };
376
+ };
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.NOTIFICATION_TYPES = exports.APPLICATION_STATUS = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
3
+ exports.ANALYTICS_EVENTS = exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.NOTIFICATION_TYPES = exports.APPLICATION_STATUS = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
4
4
  exports.ROLES = {
5
5
  CREATIVE: "CREATIVE",
6
6
  BRAND: "BRAND",
@@ -377,3 +377,37 @@ exports.DEFAULT_DISCIPLINES = [
377
377
  { name: "Web Development (Front-End)", slug: "web_development_frontend" },
378
378
  { name: "Writing & Storytelling", slug: "writing_storytelling" },
379
379
  ];
380
+ exports.ANALYTICS_EVENTS = {
381
+ POST: {
382
+ VIEW_DETAILS: "post_view_details",
383
+ LIKE: "post_like",
384
+ BOOKMARK: "post_bookmark",
385
+ VIEW_LIKES_LIST: "post_view_likes_list",
386
+ TAG_CLICK: "post_tag_click",
387
+ LINK_PREVIEW_CLICK: "post_link_preview_click",
388
+ MEDIA_EXPAND: "post_media_expand",
389
+ LIGHTBOX_NAV: "post_lightbox_nav",
390
+ LIGHTBOX_THUMB_SELECT: "post_lightbox_thumb_select",
391
+ VIDEO_VIEW: "post_video_view",
392
+ SHARE_MENU_OPEN: "post_share_menu_open",
393
+ LINK_COPIED: "post_link_copied",
394
+ EXTERNAL_SHARE: "post_external_share",
395
+ DM_CLICK: "post_dm_click",
396
+ FOLLOW: "post_creator_follow",
397
+ UNFOLLOW: "post_creator_unfollow",
398
+ VIEW_OWN_ANALYTICS: "post_creator_view_analytics",
399
+ REPORT: "post_report",
400
+ NOT_INTERESTED: "post_not_interested",
401
+ },
402
+ COMMENT: {
403
+ FORM_FOCUS: "comment_form_focus",
404
+ SUBMIT_SUCCESS: "comment_submit_success",
405
+ LIST_LOAD_MORE: "comment_list_load_more",
406
+ ITEM_LIKE: "comment_item_like",
407
+ ITEM_REPLY_CLICK: "comment_item_reply_click",
408
+ ITEM_REPLIES_TOGGLE: "comment_item_replies_toggle",
409
+ ITEM_SHARE: "comment_item_share",
410
+ ITEM_PROFILE_CLICK: "comment_item_profile_click",
411
+ EMPTY_STATE_VIEW: "comment_empty_state_view",
412
+ },
413
+ };
@@ -276,6 +276,8 @@ export declare const PostWithLikesEntitySchema: z.ZodObject<{
276
276
  actorId: z.ZodString;
277
277
  actorUsername: z.ZodString;
278
278
  actorImageUrl: z.ZodOptional<z.ZodURL>;
279
+ followsYou: z.ZodOptional<z.ZodBoolean>;
280
+ isFollowing: z.ZodOptional<z.ZodBoolean>;
279
281
  }, z.core.$strip>>;
280
282
  }, z.core.$strip>;
281
283
  export declare const GetPostWithLikesOutputSchema: z.ZodObject<{
@@ -295,6 +297,8 @@ export declare const GetPostWithLikesOutputSchema: z.ZodObject<{
295
297
  actorId: z.ZodString;
296
298
  actorUsername: z.ZodString;
297
299
  actorImageUrl: z.ZodOptional<z.ZodURL>;
300
+ followsYou: z.ZodOptional<z.ZodBoolean>;
301
+ isFollowing: z.ZodOptional<z.ZodBoolean>;
298
302
  }, z.core.$strip>>;
299
303
  totalNo: z.ZodNumber;
300
304
  }, z.core.$strip>;
@@ -158,7 +158,10 @@ exports.MinimalPostSchema = exports.PostEntitySchema.pick({
158
158
  content: true,
159
159
  });
160
160
  exports.PostWithLikesEntitySchema = exports.MinimalPostSchema.extend({
161
- likes: zod_openapi_1.z.array(activity_1.ActivitySchema),
161
+ likes: zod_openapi_1.z.array(activity_1.ActivitySchema.extend({
162
+ followsYou: zod_openapi_1.z.boolean().optional(),
163
+ isFollowing: zod_openapi_1.z.boolean().optional(),
164
+ })),
162
165
  }).openapi({
163
166
  title: "PostWithPostLikesEntity",
164
167
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.67",
3
+ "version": "2.1.69",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -446,3 +446,38 @@ export const DEFAULT_DISCIPLINES = [
446
446
  { name: "Web Development (Front-End)", slug: "web_development_frontend" },
447
447
  { name: "Writing & Storytelling", slug: "writing_storytelling" },
448
448
  ];
449
+
450
+ export const ANALYTICS_EVENTS = {
451
+ POST: {
452
+ VIEW_DETAILS: "post_view_details",
453
+ LIKE: "post_like",
454
+ BOOKMARK: "post_bookmark",
455
+ VIEW_LIKES_LIST: "post_view_likes_list",
456
+ TAG_CLICK: "post_tag_click",
457
+ LINK_PREVIEW_CLICK: "post_link_preview_click",
458
+ MEDIA_EXPAND: "post_media_expand",
459
+ LIGHTBOX_NAV: "post_lightbox_nav",
460
+ LIGHTBOX_THUMB_SELECT: "post_lightbox_thumb_select",
461
+ VIDEO_VIEW: "post_video_view",
462
+ SHARE_MENU_OPEN: "post_share_menu_open",
463
+ LINK_COPIED: "post_link_copied",
464
+ EXTERNAL_SHARE: "post_external_share",
465
+ DM_CLICK: "post_dm_click",
466
+ FOLLOW: "post_creator_follow",
467
+ UNFOLLOW: "post_creator_unfollow",
468
+ VIEW_OWN_ANALYTICS: "post_creator_view_analytics",
469
+ REPORT: "post_report",
470
+ NOT_INTERESTED: "post_not_interested",
471
+ },
472
+ COMMENT: {
473
+ FORM_FOCUS: "comment_form_focus",
474
+ SUBMIT_SUCCESS: "comment_submit_success",
475
+ LIST_LOAD_MORE: "comment_list_load_more",
476
+ ITEM_LIKE: "comment_item_like",
477
+ ITEM_REPLY_CLICK: "comment_item_reply_click",
478
+ ITEM_REPLIES_TOGGLE: "comment_item_replies_toggle",
479
+ ITEM_SHARE: "comment_item_share",
480
+ ITEM_PROFILE_CLICK: "comment_item_profile_click",
481
+ EMPTY_STATE_VIEW: "comment_empty_state_view",
482
+ },
483
+ } as const;
@@ -179,7 +179,12 @@ export const MinimalPostSchema = PostEntitySchema.pick({
179
179
  });
180
180
 
181
181
  export const PostWithLikesEntitySchema = MinimalPostSchema.extend({
182
- likes: z.array(ActivitySchema),
182
+ likes: z.array(
183
+ ActivitySchema.extend({
184
+ followsYou: z.boolean().optional(),
185
+ isFollowing: z.boolean().optional(),
186
+ }),
187
+ ),
183
188
  }).openapi({
184
189
  title: "PostWithPostLikesEntity",
185
190
  });