@mereb/app-feed 0.0.5 → 0.0.6

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.
@@ -1,22 +1,8 @@
1
- import type { FeedQuery } from '@mereb/shared-graphql';
2
- export { FeedDocument } from '@mereb/shared-graphql';
1
+ import type { CreatePostMutation, CreatePostMutationVariables, FeedQuery } from '@mereb/shared-graphql';
2
+ export { FeedDocument, CreatePostDocument } from '@mereb/shared-graphql';
3
3
  export type FeedNode = FeedQuery['feedHome']['edges'][number]['node'];
4
- export type CreatePostResponse = {
5
- createPost: {
6
- id: string;
7
- body: string;
8
- createdAt: string;
9
- author: {
10
- id: string;
11
- handle: string;
12
- };
13
- };
14
- };
15
- export type CreatePostVariables = {
16
- body: string;
17
- mediaKeys?: string[];
18
- };
19
- export declare const CreatePostDocument: import("@apollo/client").DocumentNode;
4
+ export type CreatePostResponse = CreatePostMutation;
5
+ export type CreatePostVariables = CreatePostMutationVariables;
20
6
  export declare const FEED_PAGE_SIZE = 20;
21
7
  export declare function parseFeedTimestamp(value?: string | null): Date | null;
22
8
  export declare function formatRelativeFeedTimestamp(value?: string | null, now?: number): string;
package/dist/headless.js CHANGED
@@ -1,18 +1,4 @@
1
- import { gql } from '@apollo/client';
2
- export { FeedDocument } from '@mereb/shared-graphql';
3
- export const CreatePostDocument = gql `
4
- mutation CreatePost($body: String!, $mediaKeys: [String!]) {
5
- createPost(body: $body, mediaKeys: $mediaKeys) {
6
- id
7
- body
8
- createdAt
9
- author {
10
- id
11
- handle
12
- }
13
- }
14
- }
15
- `;
1
+ export { FeedDocument, CreatePostDocument } from '@mereb/shared-graphql';
16
2
  export const FEED_PAGE_SIZE = 20;
17
3
  const MINUTE = 60 * 1000;
18
4
  const HOUR = 60 * MINUTE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mereb/app-feed",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Feed experience building blocks for Mereb apps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "package.json"
28
28
  ],
29
29
  "dependencies": {
30
- "@mereb/shared-graphql": "^0.0.11",
30
+ "@mereb/shared-graphql": "^0.0.12",
31
31
  "@mereb/ui-shared": "^0.0.3",
32
32
  "@mereb/tokens": "^0.0.4"
33
33
  },