@mymehq/sdk 2.0.1 → 2.1.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ConflictSnapshot, ItemState, CreateItemInput, Item, PaginatedResult, ItemWithMetadata, Version, Edge, Metadata, SearchResult, Thread, CreateEdgeInput, EdgeTypeSchema, TypeSchema, CreateKeyInput, ApiKey, CreateWebhookInput, Webhook, UpdateWebhookInput, WebhookDelivery, TenantConfig } from '@mymehq/shared';
2
- export { ApiKey, ConflictSnapshot, CreateItemInput, CreateKeyInput, Item, ItemState, Metadata, PaginatedResult, SearchResult, Thread, TypeSchema, Version } from '@mymehq/shared';
1
+ import { ConflictSnapshot, ItemState, CreateItemInput, Item, PaginatedResult, ItemWithMetadata, Version, Edge, Metadata, SearchResult, CreateEdgeInput, EdgeTypeSchema, TypeSchema, CreateKeyInput, ApiKey, CreateWebhookInput, Webhook, UpdateWebhookInput, WebhookDelivery, TenantConfig } from '@mymehq/shared';
2
+ export { ApiKey, ConflictSnapshot, CreateItemInput, CreateKeyInput, Item, ItemState, Metadata, PaginatedResult, SearchResult, TypeSchema, Version } from '@mymehq/shared';
3
3
 
4
4
  /**
5
5
  * Conflict resolution strategy for item updates.
@@ -51,13 +51,9 @@ interface ListFilters {
51
51
  state?: ItemState;
52
52
  source?: string;
53
53
  /** Filter to items whose parent-of source is this id. Kept as a
54
- * server-side convenience alias after the parent_id column was
55
- * dropped in Wave 2 PR 4; the server translates it into an
56
- * `edge[parent-of]` existence check. */
54
+ * server-side convenience alias for an `edge[parent-of]` existence
55
+ * check. */
57
56
  parent_id?: string;
58
- /** Filter to items in this thread. Server translates to
59
- * `edge[in-thread]` check after the thread_id column was dropped. */
60
- thread_id?: string;
61
57
  root_only?: boolean;
62
58
  /** When set, restricts the result to library items (true) or ambient
63
59
  * items (false). Per V0 spec, the default unrestricted view returns
@@ -92,8 +88,7 @@ declare class MymeClient {
92
88
  readonly items: {
93
89
  create: (input: CreateItemInput & {
94
90
  /** Atomic edges payload: for each edge type, listed ids become
95
- * targets with the new item as source. Replaces legacy parent_id
96
- * / thread_id / about which were dropped in Wave 2 PR 4. */
91
+ * targets with the new item as source. */
97
92
  edges?: Record<string, string[]>;
98
93
  }) => Promise<Item>;
99
94
  get: (id: string) => Promise<Item>;
@@ -132,19 +127,6 @@ declare class MymeClient {
132
127
  deleteExtension: (itemId: string, namespace: string) => Promise<void>;
133
128
  };
134
129
  search(query: string, filters?: SearchFilters): Promise<SearchResult[]>;
135
- readonly threads: {
136
- create: () => Promise<Thread>;
137
- list: (filters?: {
138
- limit?: number;
139
- cursor?: string;
140
- }) => Promise<PaginatedResult<Thread>>;
141
- get: (id: string) => Promise<{
142
- thread: Thread;
143
- items: Item[];
144
- }>;
145
- addItem: (threadId: string, itemId: string) => Promise<Item>;
146
- removeItem: (threadId: string, itemId: string) => Promise<Item>;
147
- };
148
130
  readonly edges: {
149
131
  /** Create a single edge. Server enforces cardinality / type
150
132
  * constraints / cycle prevention; throws on violation. */
package/dist/index.js CHANGED
@@ -401,44 +401,6 @@ var MymeClient = class {
401
401
  );
402
402
  return res.results;
403
403
  }
404
- // ---- Threads ----
405
- threads = {
406
- create: async () => {
407
- const res = await this.transport.request(
408
- "POST",
409
- "/threads"
410
- );
411
- return res.thread;
412
- },
413
- list: async (filters) => {
414
- return this.transport.request(
415
- "GET",
416
- "/threads",
417
- { query: filters }
418
- );
419
- },
420
- get: async (id) => {
421
- return this.transport.request(
422
- "GET",
423
- `/threads/${id}`
424
- );
425
- },
426
- addItem: async (threadId, itemId) => {
427
- const res = await this.transport.request(
428
- "POST",
429
- `/threads/${threadId}/items`,
430
- { body: { item_id: itemId } }
431
- );
432
- return res.item;
433
- },
434
- removeItem: async (threadId, itemId) => {
435
- const res = await this.transport.request(
436
- "DELETE",
437
- `/threads/${threadId}/items/${itemId}`
438
- );
439
- return res.item;
440
- }
441
- };
442
404
  // ---- Edges ----
443
405
  edges = {
444
406
  /** Create a single edge. Server enforces cardinality / type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mymehq/sdk",
3
- "version": "2.0.1",
3
+ "version": "2.1.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.0.1"
19
+ "@mymehq/shared": "2.1.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.0.0",