graze-client 0.6.0 → 0.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graze-client",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "A Typescript Graze API client.",
package/src/builder.ts CHANGED
@@ -109,11 +109,11 @@ const embedDoesNotContain = (type: EmbedType["embed_type"][1]): Filter => ({
109
109
  embed_type: ["!=", type],
110
110
  });
111
111
 
112
- const postTypeIs = (type: PostTypeFilter["post_type"][1]): Filter => ({
113
- post_type: ["in", type],
112
+ const postTypeIs = (...types: PostTypeFilter["post_type"][1]): Filter => ({
113
+ post_type: ["in", types],
114
114
  });
115
- const postTypeIsNot = (type: PostTypeFilter["post_type"][1]): Filter => ({
116
- post_type: ["not_in", type],
115
+ const postTypeIsNot = (...types: PostTypeFilter["post_type"][1]): Filter => ({
116
+ post_type: ["not_in", types],
117
117
  });
118
118
 
119
119
  const hasVideo: Filter = embedContains("video");
@@ -51,7 +51,7 @@ export type Filter =
51
51
  export type And = Readonly<{ and: ReadonlyArray<Filter> }>;
52
52
  export type Or = Readonly<{ or: ReadonlyArray<Filter> }>;
53
53
  export type PostTypeFilter = Readonly<{
54
- post_type: readonly ["in" | "not_in", PostType];
54
+ post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
55
55
  }>;
56
56
  export type ListMemberFilter = Readonly<{
57
57
  list_member: readonly [ListUri, "in" | "not_in"];
@@ -110,7 +110,7 @@ export const Filter = S.Union(
110
110
  export const Or = S.Struct({ or: S.Array(Filter) });
111
111
  export const And = S.Struct({ and: S.Array(Filter) });
112
112
  export const PostTypeFilter = S.Struct({
113
- post_type: S.Tuple(S.Literal("in", "not_in"), PostType),
113
+ post_type: S.Tuple(S.Literal("in", "not_in"), S.Array(PostType)),
114
114
  });
115
115
  export const ListMemberFilter = S.Struct({
116
116
  list_member: S.Tuple(ListUri, S.Literal("in", "not_in")),