@mymehq/sdk 2.1.0 → 3.0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +22 -10
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -50,18 +50,14 @@ interface ListFilters {
50
50
  type?: string;
51
51
  state?: ItemState;
52
52
  source?: string;
53
- /** Filter to items whose parent-of source is this id. Kept as a
54
- * server-side convenience alias for an `edge[parent-of]` existence
55
- * check. */
56
- parent_id?: string;
57
- root_only?: boolean;
58
- /** When set, restricts the result to library items (true) or ambient
59
- * items (false). Per V0 spec, the default unrestricted view returns
60
- * library items only on a fresh /items query — the explicit filter
61
- * here lets callers opt into the ambient slice or be explicit about
62
- * the library slice. */
53
+ /** Tri-value library filter. `true` restricts to library items; `false`
54
+ * restricts to ambient items; omitting the field returns both (the V0
55
+ * default). */
63
56
  library?: boolean;
64
57
  tags?: string[];
58
+ /** Filter-language expression, e.g. `edge[parent-of] eq "<id>"` or
59
+ * `edge[parent-of] not_exists`. The filter language replaces the
60
+ * previously-exposed `parent_id` and `root_only` convenience params. */
65
61
  filter?: string;
66
62
  sort?: "created_at" | "updated_at" | "timestamp";
67
63
  direction?: "asc" | "desc";
@@ -73,6 +69,8 @@ interface ListFilters {
73
69
  interface SearchFilters {
74
70
  type?: string;
75
71
  state?: ItemState;
72
+ /** Tri-value library filter, matching `ListFilters.library`. */
73
+ library?: boolean;
76
74
  filter?: string;
77
75
  limit?: number;
78
76
  }
@@ -211,6 +209,20 @@ declare class MymeClient {
211
209
  private throwRawError;
212
210
  }
213
211
 
212
+ /**
213
+ * Base error thrown from every SDK HTTP failure path. Consumers catch on
214
+ * this class or one of its typed subclasses (`NotFoundError`,
215
+ * `ValidationError`, `UnauthorizedError`, `ForbiddenError`, `ConflictError`).
216
+ *
217
+ * Deliberately distinct from the `MymeError` in `@mymehq/shared`. The
218
+ * shared version is constructed server-side from an `ErrorCode` enum and
219
+ * derives its HTTP status through an internal map; this SDK version is
220
+ * constructed from an error response on the wire, so `code` is an opaque
221
+ * string (forward-compatible with server codes the SDK hasn't been
222
+ * regenerated against yet) and `status` is the HTTP status the server
223
+ * actually returned. The two classes serve symmetrical but distinct
224
+ * roles; do not try to unify them.
225
+ */
214
226
  declare class MymeError extends Error {
215
227
  readonly code: string;
216
228
  readonly status: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mymehq/sdk",
3
- "version": "2.1.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",
@@ -16,7 +16,7 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@mymehq/shared": "2.1.0"
19
+ "@mymehq/shared": "3.0.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.0.0",