@amityco/ts-sdk-react-native 7.25.1-144f8feb.0 → 7.25.1-a6eec2f8.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.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The subset of a post payload needed to locate its parent.
3
+ *
4
+ * Both ids are declared non-nullable on {@link Amity.RawPost}, but events
5
+ * arrive from the server with either one missing, so they are optional here.
6
+ */
7
+ declare type ChildPostIds = {
8
+ postId: Amity.RawPost['postId'];
9
+ parentId?: Amity.RawPost['parentId'];
10
+ parentPostId?: Amity.RawPost['parentPostId'];
11
+ };
12
+ /**
13
+ * Resolves the id of the parent post that a child-post payload belongs to.
14
+ *
15
+ * `parentId` and `parentPostId` name the same post, but a payload does not
16
+ * always carry both — and the delete/create child handlers decide *whether* a
17
+ * post is a child from `parentId` while reading the cache with `parentPostId`.
18
+ * When only the former is set that read builds `['post', 'get', undefined]`,
19
+ * which cannot match anything and, when the value is null, breaks key encoding
20
+ * outright. Reading whichever id is present keeps the decision and the lookup
21
+ * on the same post.
22
+ *
23
+ * @param post the child post payload
24
+ * @returns the parent post id, or undefined when the payload carries neither
25
+ *
26
+ * @category Post Events
27
+ * @hidden
28
+ */
29
+ export declare const resolveParentPostId: (post: ChildPostIds) => string | undefined;
30
+ export {};
31
+ //# sourceMappingURL=parentPost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parentPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/parentPost.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,aAAK,YAAY,GAAG;IAClB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,SAAU,YAAY,KAAG,MAAM,GAAG,SAmBjE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parentPost.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parentPost.test.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/events/tests/parentPost.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/utils.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,yBAAyB,UAC7B,MAAM,MAAM,cAAc,YACvB,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAwE7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAClC,MAAM,KAAK,MAAM,eAAe,EAAE,wBAAwB,GAAG,2BAA2B,CAAC,YACtF,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBA8B7C,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/utils.ts"],"names":[],"mappings":"AA2DA,eAAO,MAAM,yBAAyB,UAC7B,MAAM,MAAM,cAAc,YACvB,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAwE7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAClC,MAAM,KAAK,MAAM,eAAe,EAAE,wBAAwB,GAAG,2BAA2B,CAAC,YACtF,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBA8B7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk-react-native",
3
- "version": "7.25.1-144f8feb.0",
3
+ "version": "7.25.1-a6eec2f8.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",