@better-giving/endowment 1.0.26 → 1.0.28

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/index.d.mts CHANGED
@@ -1,7 +1,14 @@
1
+ import type { CloudsearchEndow as EndowItem } from "./cloudsearch.mjs";
1
2
  import type { Media } from "./db.mjs";
2
3
  import type { Milestone, Program as ProgramShape } from "./schema.mjs";
3
4
  export type { Allocation, DonateMethodId, EndowDesignation, Endowment as Endow, EndowFields, EndowQueryParams, EndowUpdate, Environment, Increment, MediaQueryParams, MediaQueryParamsObj, MediaType, MediaUpdate, Milestone, MilestoneUpdate, NewMilestone, NewProgram, ProgramUpdate, SocialMediaURLs, UnSdgNum, } from "./schema.mjs";
4
5
  export type { CloudsearchEndow as EndowItem, CloudsearchEndowsQueryParams as EndowsQueryParams, } from "./cloudsearch.mjs";
6
+ /** client responsible on T depending on keys projected */
7
+ export interface EndowsPage<T extends keyof EndowItem = keyof EndowItem> {
8
+ items: Pick<EndowItem, T>[];
9
+ page: number;
10
+ numPages: number;
11
+ }
5
12
  export interface Program extends ProgramShape {
6
13
  milestones: Milestone[];
7
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/endowment",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "peerDependencies": {
5
5
  "@better-giving/schemas": "1.0.1",
6
6
  "@better-giving/types": "1.0.1",
package/src/index.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { CloudsearchEndow as EndowItem } from "./cloudsearch.mjs";
1
2
  import type { Media } from "./db.mjs";
2
3
  import type { Milestone, Program as ProgramShape } from "./schema.mjs";
3
4
  export type {
@@ -27,6 +28,13 @@ export type {
27
28
  CloudsearchEndowsQueryParams as EndowsQueryParams,
28
29
  } from "./cloudsearch.mjs";
29
30
 
31
+ /** client responsible on T depending on keys projected */
32
+ export interface EndowsPage<T extends keyof EndowItem = keyof EndowItem> {
33
+ items: Pick<EndowItem, T>[];
34
+ page: number;
35
+ numPages: number;
36
+ }
37
+
30
38
  export interface Program extends ProgramShape {
31
39
  milestones: Milestone[];
32
40
  }