@lssm/lib.contracts 0.0.0-canary-20251221114240 → 0.0.0-canary-20251221132705

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.
@@ -1,140 +1,140 @@
1
1
  import { AnyOperationSpec, OperationSpec } from "../../../operation.js";
2
2
  import { OperationSpecRegistry } from "../../../registry.js";
3
3
  import "../../../index.js";
4
- import * as _lssm_lib_schema187 from "@lssm/lib.schema";
4
+ import * as _lssm_lib_schema151 from "@lssm/lib.schema";
5
5
  import { SchemaModel } from "@lssm/lib.schema";
6
6
 
7
7
  //#region src/integrations/openbanking/contracts/transactions.d.ts
8
8
  declare const OpenBankingListTransactions: OperationSpec<SchemaModel<{
9
9
  tenantId: {
10
- type: _lssm_lib_schema187.FieldType<string, string>;
10
+ type: _lssm_lib_schema151.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  accountId: {
14
- type: _lssm_lib_schema187.FieldType<string, string>;
14
+ type: _lssm_lib_schema151.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  from: {
18
- type: _lssm_lib_schema187.FieldType<Date, string>;
18
+ type: _lssm_lib_schema151.FieldType<Date, string>;
19
19
  isOptional: true;
20
20
  };
21
21
  to: {
22
- type: _lssm_lib_schema187.FieldType<Date, string>;
22
+ type: _lssm_lib_schema151.FieldType<Date, string>;
23
23
  isOptional: true;
24
24
  };
25
25
  cursor: {
26
- type: _lssm_lib_schema187.FieldType<string, string>;
26
+ type: _lssm_lib_schema151.FieldType<string, string>;
27
27
  isOptional: true;
28
28
  };
29
29
  pageSize: {
30
- type: _lssm_lib_schema187.FieldType<number, number>;
30
+ type: _lssm_lib_schema151.FieldType<number, number>;
31
31
  isOptional: true;
32
32
  };
33
33
  direction: {
34
- type: _lssm_lib_schema187.FieldType<string, string>;
34
+ type: _lssm_lib_schema151.FieldType<string, string>;
35
35
  isOptional: true;
36
36
  };
37
37
  minimumAmount: {
38
- type: _lssm_lib_schema187.FieldType<number, number>;
38
+ type: _lssm_lib_schema151.FieldType<number, number>;
39
39
  isOptional: true;
40
40
  };
41
41
  maximumAmount: {
42
- type: _lssm_lib_schema187.FieldType<number, number>;
42
+ type: _lssm_lib_schema151.FieldType<number, number>;
43
43
  isOptional: true;
44
44
  };
45
45
  category: {
46
- type: _lssm_lib_schema187.FieldType<string, string>;
46
+ type: _lssm_lib_schema151.FieldType<string, string>;
47
47
  isOptional: true;
48
48
  };
49
49
  }>, SchemaModel<{
50
50
  transactions: {
51
51
  type: SchemaModel<{
52
52
  id: {
53
- type: _lssm_lib_schema187.FieldType<string, string>;
53
+ type: _lssm_lib_schema151.FieldType<string, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  accountId: {
57
- type: _lssm_lib_schema187.FieldType<string, string>;
57
+ type: _lssm_lib_schema151.FieldType<string, string>;
58
58
  isOptional: false;
59
59
  };
60
60
  tenantId: {
61
- type: _lssm_lib_schema187.FieldType<string, string>;
61
+ type: _lssm_lib_schema151.FieldType<string, string>;
62
62
  isOptional: false;
63
63
  };
64
64
  connectionId: {
65
- type: _lssm_lib_schema187.FieldType<string, string>;
65
+ type: _lssm_lib_schema151.FieldType<string, string>;
66
66
  isOptional: false;
67
67
  };
68
68
  externalId: {
69
- type: _lssm_lib_schema187.FieldType<string, string>;
69
+ type: _lssm_lib_schema151.FieldType<string, string>;
70
70
  isOptional: false;
71
71
  };
72
72
  amount: {
73
- type: _lssm_lib_schema187.FieldType<number, number>;
73
+ type: _lssm_lib_schema151.FieldType<number, number>;
74
74
  isOptional: false;
75
75
  };
76
76
  currency: {
77
- type: _lssm_lib_schema187.FieldType<string, string>;
77
+ type: _lssm_lib_schema151.FieldType<string, string>;
78
78
  isOptional: false;
79
79
  };
80
80
  date: {
81
- type: _lssm_lib_schema187.FieldType<Date, string>;
81
+ type: _lssm_lib_schema151.FieldType<Date, string>;
82
82
  isOptional: false;
83
83
  };
84
84
  bookingDate: {
85
- type: _lssm_lib_schema187.FieldType<Date, string>;
85
+ type: _lssm_lib_schema151.FieldType<Date, string>;
86
86
  isOptional: true;
87
87
  };
88
88
  valueDate: {
89
- type: _lssm_lib_schema187.FieldType<Date, string>;
89
+ type: _lssm_lib_schema151.FieldType<Date, string>;
90
90
  isOptional: true;
91
91
  };
92
92
  description: {
93
- type: _lssm_lib_schema187.FieldType<string, string>;
93
+ type: _lssm_lib_schema151.FieldType<string, string>;
94
94
  isOptional: true;
95
95
  };
96
96
  counterpartyName: {
97
- type: _lssm_lib_schema187.FieldType<string, string>;
97
+ type: _lssm_lib_schema151.FieldType<string, string>;
98
98
  isOptional: true;
99
99
  };
100
100
  counterpartyAccount: {
101
- type: _lssm_lib_schema187.FieldType<string, string>;
101
+ type: _lssm_lib_schema151.FieldType<string, string>;
102
102
  isOptional: true;
103
103
  };
104
104
  merchantCategoryCode: {
105
- type: _lssm_lib_schema187.FieldType<string, string>;
105
+ type: _lssm_lib_schema151.FieldType<string, string>;
106
106
  isOptional: true;
107
107
  };
108
108
  rawCategory: {
109
- type: _lssm_lib_schema187.FieldType<string, string>;
109
+ type: _lssm_lib_schema151.FieldType<string, string>;
110
110
  isOptional: true;
111
111
  };
112
112
  standardizedCategory: {
113
- type: _lssm_lib_schema187.FieldType<string, string>;
113
+ type: _lssm_lib_schema151.FieldType<string, string>;
114
114
  isOptional: true;
115
115
  };
116
116
  transactionType: {
117
- type: _lssm_lib_schema187.FieldType<string, string>;
117
+ type: _lssm_lib_schema151.FieldType<string, string>;
118
118
  isOptional: false;
119
119
  };
120
120
  status: {
121
- type: _lssm_lib_schema187.FieldType<string, string>;
121
+ type: _lssm_lib_schema151.FieldType<string, string>;
122
122
  isOptional: false;
123
123
  };
124
124
  runningBalance: {
125
- type: _lssm_lib_schema187.FieldType<number, number>;
125
+ type: _lssm_lib_schema151.FieldType<number, number>;
126
126
  isOptional: true;
127
127
  };
128
128
  metadata: {
129
- type: _lssm_lib_schema187.FieldType<Record<string, unknown>, Record<string, unknown>>;
129
+ type: _lssm_lib_schema151.FieldType<Record<string, unknown>, Record<string, unknown>>;
130
130
  isOptional: true;
131
131
  };
132
132
  createdAt: {
133
- type: _lssm_lib_schema187.FieldType<Date, string>;
133
+ type: _lssm_lib_schema151.FieldType<Date, string>;
134
134
  isOptional: false;
135
135
  };
136
136
  updatedAt: {
137
- type: _lssm_lib_schema187.FieldType<Date, string>;
137
+ type: _lssm_lib_schema151.FieldType<Date, string>;
138
138
  isOptional: false;
139
139
  };
140
140
  }>;
@@ -142,66 +142,66 @@ declare const OpenBankingListTransactions: OperationSpec<SchemaModel<{
142
142
  isArray: true;
143
143
  };
144
144
  nextCursor: {
145
- type: _lssm_lib_schema187.FieldType<string, string>;
145
+ type: _lssm_lib_schema151.FieldType<string, string>;
146
146
  isOptional: true;
147
147
  };
148
148
  hasMore: {
149
- type: _lssm_lib_schema187.FieldType<boolean, boolean>;
149
+ type: _lssm_lib_schema151.FieldType<boolean, boolean>;
150
150
  isOptional: true;
151
151
  };
152
152
  }>, undefined>;
153
153
  declare const OpenBankingSyncTransactions: OperationSpec<SchemaModel<{
154
154
  tenantId: {
155
- type: _lssm_lib_schema187.FieldType<string, string>;
155
+ type: _lssm_lib_schema151.FieldType<string, string>;
156
156
  isOptional: false;
157
157
  };
158
158
  accountId: {
159
- type: _lssm_lib_schema187.FieldType<string, string>;
159
+ type: _lssm_lib_schema151.FieldType<string, string>;
160
160
  isOptional: false;
161
161
  };
162
162
  from: {
163
- type: _lssm_lib_schema187.FieldType<Date, string>;
163
+ type: _lssm_lib_schema151.FieldType<Date, string>;
164
164
  isOptional: true;
165
165
  };
166
166
  to: {
167
- type: _lssm_lib_schema187.FieldType<Date, string>;
167
+ type: _lssm_lib_schema151.FieldType<Date, string>;
168
168
  isOptional: true;
169
169
  };
170
170
  connectionId: {
171
- type: _lssm_lib_schema187.FieldType<string, string>;
171
+ type: _lssm_lib_schema151.FieldType<string, string>;
172
172
  isOptional: true;
173
173
  };
174
174
  includePending: {
175
- type: _lssm_lib_schema187.FieldType<boolean, boolean>;
175
+ type: _lssm_lib_schema151.FieldType<boolean, boolean>;
176
176
  isOptional: true;
177
177
  };
178
178
  backfillDays: {
179
- type: _lssm_lib_schema187.FieldType<number, number>;
179
+ type: _lssm_lib_schema151.FieldType<number, number>;
180
180
  isOptional: true;
181
181
  };
182
182
  }>, SchemaModel<{
183
183
  synced: {
184
- type: _lssm_lib_schema187.FieldType<number, number>;
184
+ type: _lssm_lib_schema151.FieldType<number, number>;
185
185
  isOptional: false;
186
186
  };
187
187
  failed: {
188
- type: _lssm_lib_schema187.FieldType<number, number>;
188
+ type: _lssm_lib_schema151.FieldType<number, number>;
189
189
  isOptional: false;
190
190
  };
191
191
  earliestSyncedAt: {
192
- type: _lssm_lib_schema187.FieldType<Date, string>;
192
+ type: _lssm_lib_schema151.FieldType<Date, string>;
193
193
  isOptional: true;
194
194
  };
195
195
  latestSyncedAt: {
196
- type: _lssm_lib_schema187.FieldType<Date, string>;
196
+ type: _lssm_lib_schema151.FieldType<Date, string>;
197
197
  isOptional: true;
198
198
  };
199
199
  nextSinceToken: {
200
- type: _lssm_lib_schema187.FieldType<string, string>;
200
+ type: _lssm_lib_schema151.FieldType<string, string>;
201
201
  isOptional: true;
202
202
  };
203
203
  errors: {
204
- type: _lssm_lib_schema187.FieldType<string, string>;
204
+ type: _lssm_lib_schema151.FieldType<string, string>;
205
205
  isArray: true;
206
206
  isOptional: true;
207
207
  };
@@ -1,13 +1,13 @@
1
1
  import { Stability, Tag } from "./ownership.js";
2
2
  import { OpKind, OperationSpec } from "./operation.js";
3
3
  import z from "zod";
4
- import * as _lssm_lib_schema53 from "@lssm/lib.schema";
4
+ import * as _lssm_lib_schema198 from "@lssm/lib.schema";
5
5
  import { AnySchemaModel } from "@lssm/lib.schema";
6
6
 
7
7
  //#region src/jsonschema.d.ts
8
8
  declare function jsonSchemaForSpec(spec: OperationSpec<AnySchemaModel, AnySchemaModel>): {
9
- input: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema53.TopLevelZodFromModel<_lssm_lib_schema53.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema53.AnyFieldType | _lssm_lib_schema53.AnyEnumType>>> | null;
10
- output: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema53.TopLevelZodFromModel<_lssm_lib_schema53.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema53.AnyFieldType | _lssm_lib_schema53.AnyEnumType>>> | null;
9
+ input: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema198.TopLevelZodFromModel<_lssm_lib_schema198.SchemaModelFieldsAnyConfig<_lssm_lib_schema198.AnyFieldType | _lssm_lib_schema198.AnyEnumType | AnySchemaModel>>> | null;
10
+ output: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema198.TopLevelZodFromModel<_lssm_lib_schema198.SchemaModelFieldsAnyConfig<_lssm_lib_schema198.AnyFieldType | _lssm_lib_schema198.AnyEnumType | AnySchemaModel>>> | null;
11
11
  meta: {
12
12
  name: string;
13
13
  version: number;
@@ -1,135 +1,135 @@
1
1
  import { OperationSpec } from "./operation.js";
2
- import * as _lssm_lib_schema61 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_schema206 from "@lssm/lib.schema";
3
3
  import { SchemaModel } from "@lssm/lib.schema";
4
4
 
5
5
  //#region src/onboarding-base.d.ts
6
6
  /** Save/update onboarding draft (auto-save during flow) */
7
7
  declare const SaveOnboardingDraftInput: SchemaModel<{
8
8
  data: {
9
- type: _lssm_lib_schema61.FieldType<unknown, unknown>;
9
+ type: _lssm_lib_schema206.FieldType<unknown, unknown>;
10
10
  isOptional: false;
11
11
  };
12
12
  }>;
13
13
  declare const SaveOnboardingDraftOutput: SchemaModel<{
14
14
  id: {
15
- type: _lssm_lib_schema61.FieldType<string, string>;
15
+ type: _lssm_lib_schema206.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  organizationId: {
19
- type: _lssm_lib_schema61.FieldType<string, string>;
19
+ type: _lssm_lib_schema206.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  }>;
23
23
  declare const SaveOnboardingDraftBaseSpec: OperationSpec<SchemaModel<{
24
24
  data: {
25
- type: _lssm_lib_schema61.FieldType<unknown, unknown>;
25
+ type: _lssm_lib_schema206.FieldType<unknown, unknown>;
26
26
  isOptional: false;
27
27
  };
28
28
  }>, SchemaModel<{
29
29
  id: {
30
- type: _lssm_lib_schema61.FieldType<string, string>;
30
+ type: _lssm_lib_schema206.FieldType<string, string>;
31
31
  isOptional: false;
32
32
  };
33
33
  organizationId: {
34
- type: _lssm_lib_schema61.FieldType<string, string>;
34
+ type: _lssm_lib_schema206.FieldType<string, string>;
35
35
  isOptional: false;
36
36
  };
37
37
  }>, undefined>;
38
38
  /** Get current onboarding draft (on mount/restore) */
39
39
  declare const GetOnboardingDraftOutput: SchemaModel<{
40
40
  id: {
41
- type: _lssm_lib_schema61.FieldType<string, string>;
41
+ type: _lssm_lib_schema206.FieldType<string, string>;
42
42
  isOptional: true;
43
43
  };
44
44
  organizationId: {
45
- type: _lssm_lib_schema61.FieldType<string, string>;
45
+ type: _lssm_lib_schema206.FieldType<string, string>;
46
46
  isOptional: true;
47
47
  };
48
48
  data: {
49
- type: _lssm_lib_schema61.FieldType<unknown, unknown>;
49
+ type: _lssm_lib_schema206.FieldType<unknown, unknown>;
50
50
  isOptional: true;
51
51
  };
52
52
  createdAt: {
53
- type: _lssm_lib_schema61.FieldType<Date, string>;
53
+ type: _lssm_lib_schema206.FieldType<Date, string>;
54
54
  isOptional: true;
55
55
  };
56
56
  updatedAt: {
57
- type: _lssm_lib_schema61.FieldType<Date, string>;
57
+ type: _lssm_lib_schema206.FieldType<Date, string>;
58
58
  isOptional: true;
59
59
  };
60
60
  }>;
61
- declare const GetOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema61.AnySchemaModel, SchemaModel<{
61
+ declare const GetOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema206.AnySchemaModel, SchemaModel<{
62
62
  id: {
63
- type: _lssm_lib_schema61.FieldType<string, string>;
63
+ type: _lssm_lib_schema206.FieldType<string, string>;
64
64
  isOptional: true;
65
65
  };
66
66
  organizationId: {
67
- type: _lssm_lib_schema61.FieldType<string, string>;
67
+ type: _lssm_lib_schema206.FieldType<string, string>;
68
68
  isOptional: true;
69
69
  };
70
70
  data: {
71
- type: _lssm_lib_schema61.FieldType<unknown, unknown>;
71
+ type: _lssm_lib_schema206.FieldType<unknown, unknown>;
72
72
  isOptional: true;
73
73
  };
74
74
  createdAt: {
75
- type: _lssm_lib_schema61.FieldType<Date, string>;
75
+ type: _lssm_lib_schema206.FieldType<Date, string>;
76
76
  isOptional: true;
77
77
  };
78
78
  updatedAt: {
79
- type: _lssm_lib_schema61.FieldType<Date, string>;
79
+ type: _lssm_lib_schema206.FieldType<Date, string>;
80
80
  isOptional: true;
81
81
  };
82
82
  }>, undefined>;
83
83
  /** Delete onboarding draft (cleanup after completion or cancel) */
84
84
  declare const DeleteOnboardingDraftOutput: SchemaModel<{
85
85
  ok: {
86
- type: _lssm_lib_schema61.FieldType<boolean, boolean>;
86
+ type: _lssm_lib_schema206.FieldType<boolean, boolean>;
87
87
  isOptional: false;
88
88
  };
89
89
  }>;
90
- declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema61.AnySchemaModel, SchemaModel<{
90
+ declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema206.AnySchemaModel, SchemaModel<{
91
91
  ok: {
92
- type: _lssm_lib_schema61.FieldType<boolean, boolean>;
92
+ type: _lssm_lib_schema206.FieldType<boolean, boolean>;
93
93
  isOptional: false;
94
94
  };
95
95
  }>, undefined>;
96
96
  /** Complete onboarding (final submit, creates entities) */
97
97
  declare const CompleteOnboardingBaseInput: SchemaModel<{
98
98
  data: {
99
- type: _lssm_lib_schema61.FieldType<unknown, unknown>;
99
+ type: _lssm_lib_schema206.FieldType<unknown, unknown>;
100
100
  isOptional: false;
101
101
  };
102
102
  }>;
103
103
  declare const CompleteOnboardingBaseOutput: SchemaModel<{
104
104
  success: {
105
- type: _lssm_lib_schema61.FieldType<boolean, boolean>;
105
+ type: _lssm_lib_schema206.FieldType<boolean, boolean>;
106
106
  isOptional: false;
107
107
  };
108
108
  userId: {
109
- type: _lssm_lib_schema61.FieldType<string, string>;
109
+ type: _lssm_lib_schema206.FieldType<string, string>;
110
110
  isOptional: true;
111
111
  };
112
112
  organizationId: {
113
- type: _lssm_lib_schema61.FieldType<string, string>;
113
+ type: _lssm_lib_schema206.FieldType<string, string>;
114
114
  isOptional: true;
115
115
  };
116
116
  }>;
117
117
  declare const CompleteOnboardingBaseSpec: OperationSpec<SchemaModel<{
118
118
  data: {
119
- type: _lssm_lib_schema61.FieldType<unknown, unknown>;
119
+ type: _lssm_lib_schema206.FieldType<unknown, unknown>;
120
120
  isOptional: false;
121
121
  };
122
122
  }>, SchemaModel<{
123
123
  success: {
124
- type: _lssm_lib_schema61.FieldType<boolean, boolean>;
124
+ type: _lssm_lib_schema206.FieldType<boolean, boolean>;
125
125
  isOptional: false;
126
126
  };
127
127
  userId: {
128
- type: _lssm_lib_schema61.FieldType<string, string>;
128
+ type: _lssm_lib_schema206.FieldType<string, string>;
129
129
  isOptional: true;
130
130
  };
131
131
  organizationId: {
132
- type: _lssm_lib_schema61.FieldType<string, string>;
132
+ type: _lssm_lib_schema206.FieldType<string, string>;
133
133
  isOptional: true;
134
134
  };
135
135
  }>, undefined>;
@@ -1,4 +1,5 @@
1
1
  import { Stability } from "./ownership.js";
2
+ import { GroupKeyFn, RegistryFilter } from "./registry-utils.js";
2
3
  import z from "zod";
3
4
  import * as _lssm_lib_schema234 from "@lssm/lib.schema";
4
5
  import { AnySchemaModel } from "@lssm/lib.schema";
@@ -58,11 +59,21 @@ declare class PresentationRegistry {
58
59
  register(p: PresentationSpec): this;
59
60
  list(): PresentationSpec[];
60
61
  get(name: string, version?: number): PresentationSpec | undefined;
62
+ /** Filter presentations by criteria. */
63
+ filter(criteria: RegistryFilter): PresentationSpec[];
64
+ /** List presentations with specific tag. */
65
+ listByTag(tag: string): PresentationSpec[];
66
+ /** List presentations by owner. */
67
+ listByOwner(owner: string): PresentationSpec[];
68
+ /** Group presentations by key function. */
69
+ groupBy(keyFn: GroupKeyFn<PresentationSpec>): Map<string, PresentationSpec[]>;
70
+ /** Get unique tags from all presentations. */
71
+ getUniqueTags(): string[];
61
72
  }
62
73
  declare function jsonSchemaForPresentation(p: PresentationSpec): {
63
74
  framework: "react";
64
75
  componentKey: string;
65
- props: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema234.TopLevelZodFromModel<_lssm_lib_schema234.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema234.AnyFieldType | _lssm_lib_schema234.AnyEnumType>>>;
76
+ props: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema234.TopLevelZodFromModel<_lssm_lib_schema234.SchemaModelFieldsAnyConfig<_lssm_lib_schema234.AnyFieldType | _lssm_lib_schema234.AnyEnumType | AnySchemaModel>>>;
66
77
  meta: {
67
78
  readonly name: string;
68
79
  readonly version: number;
@@ -84,7 +95,7 @@ declare function jsonSchemaForPresentation(p: PresentationSpec): {
84
95
  kind: PresentationKind;
85
96
  } | {
86
97
  mimeType: string;
87
- model: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema234.TopLevelZodFromModel<_lssm_lib_schema234.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema234.AnyFieldType | _lssm_lib_schema234.AnyEnumType>>>;
98
+ model: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema234.TopLevelZodFromModel<_lssm_lib_schema234.SchemaModelFieldsAnyConfig<_lssm_lib_schema234.AnyFieldType | _lssm_lib_schema234.AnyEnumType | AnySchemaModel>>>;
88
99
  meta: {
89
100
  readonly name: string;
90
101
  readonly version: number;
@@ -1,3 +1,5 @@
1
+ import { __toCommonJS } from "./_virtual/rolldown_runtime.js";
2
+ import { init_registry_utils, registry_utils_exports } from "./registry-utils.js";
1
3
  import z from "zod";
2
4
 
3
5
  //#region src/presentations.ts
@@ -32,6 +34,29 @@ var PresentationRegistry = class {
32
34
  }
33
35
  return candidate;
34
36
  }
37
+ /** Filter presentations by criteria. */
38
+ filter(criteria) {
39
+ const { filterBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
40
+ return filterBy(this.list(), criteria);
41
+ }
42
+ /** List presentations with specific tag. */
43
+ listByTag(tag) {
44
+ return this.list().filter((p) => p.meta.tags?.includes(tag));
45
+ }
46
+ /** List presentations by owner. */
47
+ listByOwner(owner) {
48
+ return this.list().filter((p) => p.meta.owners?.includes(owner));
49
+ }
50
+ /** Group presentations by key function. */
51
+ groupBy(keyFn) {
52
+ const { groupBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
53
+ return groupBy(this.list(), keyFn);
54
+ }
55
+ /** Get unique tags from all presentations. */
56
+ getUniqueTags() {
57
+ const { getUniqueTags } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
58
+ return getUniqueTags(this.list());
59
+ }
35
60
  };
36
61
  function jsonSchemaForPresentation(p) {
37
62
  const base = {
@@ -0,0 +1,107 @@
1
+ import { Stability } from "./ownership.js";
2
+
3
+ //#region src/registry-utils.d.ts
4
+
5
+ /**
6
+ * Filter criteria for registry items.
7
+ * All criteria are optional and combined with AND logic.
8
+ */
9
+ interface RegistryFilter {
10
+ /** Filter by tags (item must have at least one matching tag) */
11
+ tags?: string[];
12
+ /** Filter by owners (item must have at least one matching owner) */
13
+ owners?: string[];
14
+ /** Filter by stability levels */
15
+ stability?: Stability[];
16
+ /** Filter by domain (first segment of name) */
17
+ domain?: string;
18
+ /** Filter by name pattern (glob or regex) */
19
+ namePattern?: string;
20
+ }
21
+ /**
22
+ * Item with standard metadata for filtering.
23
+ */
24
+ interface FilterableItem {
25
+ meta: {
26
+ name?: string;
27
+ key?: string;
28
+ tags?: string[];
29
+ owners?: string[];
30
+ stability?: Stability;
31
+ domain?: string;
32
+ };
33
+ }
34
+ /**
35
+ * Grouping key function type.
36
+ */
37
+ type GroupKeyFn<T> = (item: T) => string;
38
+ /**
39
+ * Grouped items result.
40
+ */
41
+ interface GroupedItems<T> {
42
+ key: string;
43
+ items: T[];
44
+ }
45
+ /**
46
+ * Pre-built grouping strategies for common use cases.
47
+ */
48
+ declare const GroupingStrategies: {
49
+ /**
50
+ * Group by first tag.
51
+ */
52
+ byTag: <T extends FilterableItem>(item: T) => string;
53
+ /**
54
+ * Group by all tags (item appears in multiple groups).
55
+ */
56
+ byAllTags: <T extends FilterableItem>(item: T) => string[];
57
+ /**
58
+ * Group by first owner.
59
+ */
60
+ byOwner: <T extends FilterableItem>(item: T) => string;
61
+ /**
62
+ * Group by domain (first segment of name).
63
+ */
64
+ byDomain: <T extends FilterableItem>(item: T) => string;
65
+ /**
66
+ * Group by stability level.
67
+ */
68
+ byStability: <T extends FilterableItem>(item: T) => string;
69
+ /**
70
+ * Create URL path grouping strategy with configurable depth.
71
+ */
72
+ byUrlPath: (level: number) => (item: {
73
+ path?: string;
74
+ }) => string;
75
+ };
76
+ /**
77
+ * Filter items by criteria.
78
+ * All criteria are combined with AND logic.
79
+ */
80
+ declare function filterBy<T extends FilterableItem>(items: T[], filter: RegistryFilter): T[];
81
+ /**
82
+ * Group items by key function.
83
+ */
84
+ declare function groupBy<T>(items: T[], keyFn: GroupKeyFn<T>): Map<string, T[]>;
85
+ /**
86
+ * Group items by key function, returning array format.
87
+ */
88
+ declare function groupByToArray<T>(items: T[], keyFn: GroupKeyFn<T>): GroupedItems<T>[];
89
+ /**
90
+ * Group items where one item can belong to multiple groups.
91
+ * Useful for byAllTags grouping.
92
+ */
93
+ declare function groupByMultiple<T>(items: T[], keysFn: (item: T) => string[]): Map<string, T[]>;
94
+ /**
95
+ * Get unique tags from a collection of items.
96
+ */
97
+ declare function getUniqueTags<T extends FilterableItem>(items: T[]): string[];
98
+ /**
99
+ * Get unique owners from a collection of items.
100
+ */
101
+ declare function getUniqueOwners<T extends FilterableItem>(items: T[]): string[];
102
+ /**
103
+ * Get unique domains from a collection of items.
104
+ */
105
+ declare function getUniqueDomains<T extends FilterableItem>(items: T[]): string[];
106
+ //#endregion
107
+ export { FilterableItem, GroupKeyFn, GroupedItems, GroupingStrategies, RegistryFilter, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray };