@hautechai/sdk 0.0.7 → 0.0.8
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.
- package/dist/sdk/transformers.js +3 -2
- package/dist/types.d.ts +3 -3
- package/dist/types.js +2 -1
- package/package.json +1 -1
package/dist/sdk/transformers.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ListResponse } from '../types';
|
|
1
2
|
export const transformToListResponse = (response) => {
|
|
2
|
-
const array =
|
|
3
|
-
array
|
|
3
|
+
const array = new ListResponse(...response.data);
|
|
4
|
+
array.nextCursor = response.pageInfo.nextCursor;
|
|
4
5
|
return array;
|
|
5
6
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export type ListProps = {
|
|
|
7
7
|
limit?: number;
|
|
8
8
|
orderBy?: 'createdAt_ASC' | 'createdAt_DESC' | 'updatedAt_ASC' | 'updatedAt_DESC';
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
nextCursor
|
|
12
|
-
}
|
|
10
|
+
export declare class ListResponse<T> extends Array<T> {
|
|
11
|
+
nextCursor?: string;
|
|
12
|
+
}
|
|
13
13
|
type Add = {
|
|
14
14
|
add: boolean;
|
|
15
15
|
};
|
package/dist/types.js
CHANGED