@lssm/lib.metering 0.0.0-canary-20251217083314 → 0.0.0-canary-20251220002821

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 (165) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/dist/aggregation/index.d.ts +2 -1
  4. package/dist/aggregation/index.d.ts.map +1 -0
  5. package/dist/aggregation/index.js +8 -5
  6. package/dist/aggregation/index.js.map +1 -0
  7. package/dist/contracts/dist/capabilities/openbanking.js +2 -1
  8. package/dist/contracts/dist/capabilities/openbanking.js.map +1 -0
  9. package/dist/contracts/dist/contract-registry/schemas.js +2 -1
  10. package/dist/contracts/dist/contract-registry/schemas.js.map +1 -0
  11. package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
  12. package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  13. package/dist/contracts/dist/docs/index.js +2 -6
  14. package/dist/contracts/dist/docs/meta.docs.js +30 -0
  15. package/dist/contracts/dist/docs/meta.docs.js.map +1 -0
  16. package/dist/contracts/dist/docs/presentations.js +2 -1
  17. package/dist/contracts/dist/docs/presentations.js.map +1 -0
  18. package/dist/contracts/dist/docs/registry.js +2 -1
  19. package/dist/contracts/dist/docs/registry.js.map +1 -0
  20. package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
  21. package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  22. package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
  23. package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  24. package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
  25. package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  26. package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
  27. package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  28. package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
  29. package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  30. package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
  31. package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  32. package/dist/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
  33. package/dist/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  34. package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
  35. package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  36. package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
  37. package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  38. package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
  39. package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  40. package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
  41. package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  42. package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
  43. package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  44. package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
  45. package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  46. package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
  47. package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  48. package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
  49. package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  50. package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
  51. package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  52. package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
  53. package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  54. package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
  55. package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  56. package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
  57. package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  58. package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
  59. package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  60. package/dist/contracts/dist/docs/tech-contracts.docs.js +97 -0
  61. package/dist/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  62. package/dist/contracts/dist/events.js +2 -1
  63. package/dist/contracts/dist/events.js.map +1 -0
  64. package/dist/contracts/dist/index.js +2 -1
  65. package/dist/contracts/dist/integrations/contracts.js +65 -66
  66. package/dist/contracts/dist/integrations/contracts.js.map +1 -0
  67. package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
  68. package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
  69. package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
  70. package/dist/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
  71. package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
  72. package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
  73. package/dist/contracts/dist/integrations/openbanking/models.js +60 -61
  74. package/dist/contracts/dist/integrations/openbanking/models.js.map +1 -0
  75. package/dist/contracts/dist/integrations/openbanking/telemetry.js +2 -1
  76. package/dist/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
  77. package/dist/contracts/dist/integrations/providers/elevenlabs.js +2 -1
  78. package/dist/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
  79. package/dist/contracts/dist/integrations/providers/gcs-storage.js +2 -1
  80. package/dist/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
  81. package/dist/contracts/dist/integrations/providers/gmail.js +2 -1
  82. package/dist/contracts/dist/integrations/providers/gmail.js.map +1 -0
  83. package/dist/contracts/dist/integrations/providers/google-calendar.js +2 -1
  84. package/dist/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
  85. package/dist/contracts/dist/integrations/providers/mistral.js +2 -1
  86. package/dist/contracts/dist/integrations/providers/mistral.js.map +1 -0
  87. package/dist/contracts/dist/integrations/providers/postmark.js +2 -1
  88. package/dist/contracts/dist/integrations/providers/postmark.js.map +1 -0
  89. package/dist/contracts/dist/integrations/providers/powens.js +2 -1
  90. package/dist/contracts/dist/integrations/providers/powens.js.map +1 -0
  91. package/dist/contracts/dist/integrations/providers/qdrant.js +2 -1
  92. package/dist/contracts/dist/integrations/providers/qdrant.js.map +1 -0
  93. package/dist/contracts/dist/integrations/providers/stripe.js +2 -1
  94. package/dist/contracts/dist/integrations/providers/stripe.js.map +1 -0
  95. package/dist/contracts/dist/integrations/providers/twilio-sms.js +2 -1
  96. package/dist/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
  97. package/dist/contracts/dist/knowledge/contracts.js +44 -45
  98. package/dist/contracts/dist/knowledge/contracts.js.map +1 -0
  99. package/dist/contracts/dist/knowledge/spaces/email-threads.js +2 -1
  100. package/dist/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
  101. package/dist/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
  102. package/dist/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
  103. package/dist/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
  104. package/dist/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
  105. package/dist/contracts/dist/knowledge/spaces/product-canon.js +2 -1
  106. package/dist/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
  107. package/dist/contracts/dist/knowledge/spaces/support-faq.js +2 -1
  108. package/dist/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
  109. package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
  110. package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
  111. package/dist/contracts/dist/llm/exporters.js +2 -1
  112. package/dist/contracts/dist/llm/exporters.js.map +1 -0
  113. package/dist/contracts/dist/onboarding-base.js +22 -23
  114. package/dist/contracts/dist/onboarding-base.js.map +1 -0
  115. package/dist/contracts/dist/ownership.js +4 -2
  116. package/dist/contracts/dist/ownership.js.map +1 -0
  117. package/dist/contracts/dist/presentations.v2.js +2 -1
  118. package/dist/contracts/dist/presentations.v2.js.map +1 -0
  119. package/dist/contracts/dist/regenerator/service.js +2 -1
  120. package/dist/contracts/dist/regenerator/service.js.map +1 -0
  121. package/dist/contracts/dist/schema/dist/index.js +3873 -6
  122. package/dist/contracts/dist/schema/dist/index.js.map +1 -0
  123. package/dist/contracts/dist/spec.js +2 -1
  124. package/dist/contracts/dist/spec.js.map +1 -0
  125. package/dist/contracts/index.d.ts +292 -291
  126. package/dist/contracts/index.d.ts.map +1 -0
  127. package/dist/contracts/index.js +151 -152
  128. package/dist/contracts/index.js.map +1 -0
  129. package/dist/docs/metering.docblock.js +2 -1
  130. package/dist/docs/metering.docblock.js.map +1 -0
  131. package/dist/entities/index.d.ts +187 -186
  132. package/dist/entities/index.d.ts.map +1 -0
  133. package/dist/entities/index.js +114 -114
  134. package/dist/entities/index.js.map +1 -0
  135. package/dist/events.d.ts +137 -136
  136. package/dist/events.d.ts.map +1 -0
  137. package/dist/events.js +70 -71
  138. package/dist/events.js.map +1 -0
  139. package/dist/metering.feature.d.ts +2 -1
  140. package/dist/metering.feature.d.ts.map +1 -0
  141. package/dist/metering.feature.js +2 -1
  142. package/dist/metering.feature.js.map +1 -0
  143. package/dist/schema/dist/index.js +4889 -6
  144. package/dist/schema/dist/index.js.map +1 -0
  145. package/package.json +13 -6
  146. package/dist/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  147. package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  148. package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  149. package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  150. package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  151. package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  152. package/dist/contracts/dist/schema/dist/EnumType.js +0 -2
  153. package/dist/contracts/dist/schema/dist/FieldType.js +0 -49
  154. package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  155. package/dist/contracts/dist/schema/dist/SchemaModel.js +0 -34
  156. package/dist/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  157. package/dist/contracts/dist/schema/dist/entity/index.js +0 -2
  158. package/dist/contracts/dist/schema/dist/entity/types.js +0 -1
  159. package/dist/schema/dist/EnumType.js +0 -2
  160. package/dist/schema/dist/FieldType.js +0 -49
  161. package/dist/schema/dist/ScalarTypeEnum.js +0 -236
  162. package/dist/schema/dist/SchemaModel.js +0 -39
  163. package/dist/schema/dist/entity/defineEntity.js +0 -236
  164. package/dist/schema/dist/entity/index.js +0 -2
  165. package/dist/schema/dist/entity/types.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"sourcesContent":[],"mappings":";;;;;;;cAsIa,oBAAkB,oBAAA,CAAA,8BAAA;EAAlB,QAAA,EAAA;IAKX,IAAA,EAAA,mBAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;qBAL6B;EAAA,CAAA;EAAA,IAAA,EAAA;IAUlB,IAAA,+BAKX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;IAL6B,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IA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AAA"}
package/dist/events.js CHANGED
@@ -1,290 +1,288 @@
1
- import { ScalarTypeEnum } from "./schema/dist/ScalarTypeEnum.js";
2
- import { defineSchemaModel } from "./schema/dist/SchemaModel.js";
3
- import "./schema/dist/index.js";
1
+ import { E5, K5 } from "./schema/dist/index.js";
4
2
  import { defineEvent } from "./contracts/dist/events.js";
5
3
  import "./contracts/dist/index.js";
6
4
 
7
5
  //#region src/events.ts
8
- const MetricDefinedPayload = defineSchemaModel({
6
+ const MetricDefinedPayload = K5({
9
7
  name: "MetricDefinedEventPayload",
10
8
  description: "Payload when a metric is defined",
11
9
  fields: {
12
10
  metricId: {
13
- type: ScalarTypeEnum.String_unsecure(),
11
+ type: E5.String_unsecure(),
14
12
  isOptional: false
15
13
  },
16
14
  key: {
17
- type: ScalarTypeEnum.String_unsecure(),
15
+ type: E5.String_unsecure(),
18
16
  isOptional: false
19
17
  },
20
18
  name: {
21
- type: ScalarTypeEnum.String_unsecure(),
19
+ type: E5.String_unsecure(),
22
20
  isOptional: false
23
21
  },
24
22
  unit: {
25
- type: ScalarTypeEnum.String_unsecure(),
23
+ type: E5.String_unsecure(),
26
24
  isOptional: false
27
25
  },
28
26
  aggregationType: {
29
- type: ScalarTypeEnum.String_unsecure(),
27
+ type: E5.String_unsecure(),
30
28
  isOptional: false
31
29
  },
32
30
  orgId: {
33
- type: ScalarTypeEnum.String_unsecure(),
31
+ type: E5.String_unsecure(),
34
32
  isOptional: true
35
33
  },
36
34
  createdBy: {
37
- type: ScalarTypeEnum.String_unsecure(),
35
+ type: E5.String_unsecure(),
38
36
  isOptional: true
39
37
  },
40
38
  createdAt: {
41
- type: ScalarTypeEnum.DateTime(),
39
+ type: E5.DateTime(),
42
40
  isOptional: false
43
41
  }
44
42
  }
45
43
  });
46
- const MetricUpdatedPayload = defineSchemaModel({
44
+ const MetricUpdatedPayload = K5({
47
45
  name: "MetricUpdatedEventPayload",
48
46
  description: "Payload when a metric is updated",
49
47
  fields: {
50
48
  metricId: {
51
- type: ScalarTypeEnum.String_unsecure(),
49
+ type: E5.String_unsecure(),
52
50
  isOptional: false
53
51
  },
54
52
  key: {
55
- type: ScalarTypeEnum.String_unsecure(),
53
+ type: E5.String_unsecure(),
56
54
  isOptional: false
57
55
  },
58
56
  changes: {
59
- type: ScalarTypeEnum.JSON(),
57
+ type: E5.JSON(),
60
58
  isOptional: false
61
59
  },
62
60
  updatedBy: {
63
- type: ScalarTypeEnum.String_unsecure(),
61
+ type: E5.String_unsecure(),
64
62
  isOptional: true
65
63
  },
66
64
  updatedAt: {
67
- type: ScalarTypeEnum.DateTime(),
65
+ type: E5.DateTime(),
68
66
  isOptional: false
69
67
  }
70
68
  }
71
69
  });
72
- const UsageRecordedPayload = defineSchemaModel({
70
+ const UsageRecordedPayload = K5({
73
71
  name: "UsageRecordedEventPayload",
74
72
  description: "Payload when usage is recorded",
75
73
  fields: {
76
74
  recordId: {
77
- type: ScalarTypeEnum.String_unsecure(),
75
+ type: E5.String_unsecure(),
78
76
  isOptional: false
79
77
  },
80
78
  metricKey: {
81
- type: ScalarTypeEnum.String_unsecure(),
79
+ type: E5.String_unsecure(),
82
80
  isOptional: false
83
81
  },
84
82
  subjectType: {
85
- type: ScalarTypeEnum.String_unsecure(),
83
+ type: E5.String_unsecure(),
86
84
  isOptional: false
87
85
  },
88
86
  subjectId: {
89
- type: ScalarTypeEnum.String_unsecure(),
87
+ type: E5.String_unsecure(),
90
88
  isOptional: false
91
89
  },
92
90
  quantity: {
93
- type: ScalarTypeEnum.Float_unsecure(),
91
+ type: E5.Float_unsecure(),
94
92
  isOptional: false
95
93
  },
96
94
  source: {
97
- type: ScalarTypeEnum.String_unsecure(),
95
+ type: E5.String_unsecure(),
98
96
  isOptional: true
99
97
  },
100
98
  timestamp: {
101
- type: ScalarTypeEnum.DateTime(),
99
+ type: E5.DateTime(),
102
100
  isOptional: false
103
101
  }
104
102
  }
105
103
  });
106
- const UsageBatchRecordedPayload = defineSchemaModel({
104
+ const UsageBatchRecordedPayload = K5({
107
105
  name: "UsageBatchRecordedEventPayload",
108
106
  description: "Payload when a batch of usage is recorded",
109
107
  fields: {
110
108
  recordCount: {
111
- type: ScalarTypeEnum.Int_unsecure(),
109
+ type: E5.Int_unsecure(),
112
110
  isOptional: false
113
111
  },
114
112
  metricKeys: {
115
- type: ScalarTypeEnum.JSON(),
113
+ type: E5.JSON(),
116
114
  isOptional: false
117
115
  },
118
116
  totalQuantity: {
119
- type: ScalarTypeEnum.Float_unsecure(),
117
+ type: E5.Float_unsecure(),
120
118
  isOptional: false
121
119
  },
122
120
  timestamp: {
123
- type: ScalarTypeEnum.DateTime(),
121
+ type: E5.DateTime(),
124
122
  isOptional: false
125
123
  }
126
124
  }
127
125
  });
128
- const UsageAggregatedPayload = defineSchemaModel({
126
+ const UsageAggregatedPayload = K5({
129
127
  name: "UsageAggregatedEventPayload",
130
128
  description: "Payload when usage is aggregated",
131
129
  fields: {
132
130
  summaryId: {
133
- type: ScalarTypeEnum.String_unsecure(),
131
+ type: E5.String_unsecure(),
134
132
  isOptional: false
135
133
  },
136
134
  metricKey: {
137
- type: ScalarTypeEnum.String_unsecure(),
135
+ type: E5.String_unsecure(),
138
136
  isOptional: false
139
137
  },
140
138
  subjectType: {
141
- type: ScalarTypeEnum.String_unsecure(),
139
+ type: E5.String_unsecure(),
142
140
  isOptional: false
143
141
  },
144
142
  subjectId: {
145
- type: ScalarTypeEnum.String_unsecure(),
143
+ type: E5.String_unsecure(),
146
144
  isOptional: false
147
145
  },
148
146
  periodType: {
149
- type: ScalarTypeEnum.String_unsecure(),
147
+ type: E5.String_unsecure(),
150
148
  isOptional: false
151
149
  },
152
150
  periodStart: {
153
- type: ScalarTypeEnum.DateTime(),
151
+ type: E5.DateTime(),
154
152
  isOptional: false
155
153
  },
156
154
  periodEnd: {
157
- type: ScalarTypeEnum.DateTime(),
155
+ type: E5.DateTime(),
158
156
  isOptional: false
159
157
  },
160
158
  totalQuantity: {
161
- type: ScalarTypeEnum.Float_unsecure(),
159
+ type: E5.Float_unsecure(),
162
160
  isOptional: false
163
161
  },
164
162
  recordCount: {
165
- type: ScalarTypeEnum.Int_unsecure(),
163
+ type: E5.Int_unsecure(),
166
164
  isOptional: false
167
165
  },
168
166
  aggregatedAt: {
169
- type: ScalarTypeEnum.DateTime(),
167
+ type: E5.DateTime(),
170
168
  isOptional: false
171
169
  }
172
170
  }
173
171
  });
174
- const ThresholdCreatedPayload = defineSchemaModel({
172
+ const ThresholdCreatedPayload = K5({
175
173
  name: "ThresholdCreatedEventPayload",
176
174
  description: "Payload when a threshold is created",
177
175
  fields: {
178
176
  thresholdId: {
179
- type: ScalarTypeEnum.String_unsecure(),
177
+ type: E5.String_unsecure(),
180
178
  isOptional: false
181
179
  },
182
180
  metricKey: {
183
- type: ScalarTypeEnum.String_unsecure(),
181
+ type: E5.String_unsecure(),
184
182
  isOptional: false
185
183
  },
186
184
  subjectType: {
187
- type: ScalarTypeEnum.String_unsecure(),
185
+ type: E5.String_unsecure(),
188
186
  isOptional: true
189
187
  },
190
188
  subjectId: {
191
- type: ScalarTypeEnum.String_unsecure(),
189
+ type: E5.String_unsecure(),
192
190
  isOptional: true
193
191
  },
194
192
  threshold: {
195
- type: ScalarTypeEnum.Float_unsecure(),
193
+ type: E5.Float_unsecure(),
196
194
  isOptional: false
197
195
  },
198
196
  action: {
199
- type: ScalarTypeEnum.String_unsecure(),
197
+ type: E5.String_unsecure(),
200
198
  isOptional: false
201
199
  },
202
200
  createdAt: {
203
- type: ScalarTypeEnum.DateTime(),
201
+ type: E5.DateTime(),
204
202
  isOptional: false
205
203
  }
206
204
  }
207
205
  });
208
- const ThresholdExceededPayload = defineSchemaModel({
206
+ const ThresholdExceededPayload = K5({
209
207
  name: "ThresholdExceededEventPayload",
210
208
  description: "Payload when a threshold is exceeded",
211
209
  fields: {
212
210
  alertId: {
213
- type: ScalarTypeEnum.String_unsecure(),
211
+ type: E5.String_unsecure(),
214
212
  isOptional: false
215
213
  },
216
214
  thresholdId: {
217
- type: ScalarTypeEnum.String_unsecure(),
215
+ type: E5.String_unsecure(),
218
216
  isOptional: false
219
217
  },
220
218
  metricKey: {
221
- type: ScalarTypeEnum.String_unsecure(),
219
+ type: E5.String_unsecure(),
222
220
  isOptional: false
223
221
  },
224
222
  subjectType: {
225
- type: ScalarTypeEnum.String_unsecure(),
223
+ type: E5.String_unsecure(),
226
224
  isOptional: true
227
225
  },
228
226
  subjectId: {
229
- type: ScalarTypeEnum.String_unsecure(),
227
+ type: E5.String_unsecure(),
230
228
  isOptional: true
231
229
  },
232
230
  threshold: {
233
- type: ScalarTypeEnum.Float_unsecure(),
231
+ type: E5.Float_unsecure(),
234
232
  isOptional: false
235
233
  },
236
234
  actualValue: {
237
- type: ScalarTypeEnum.Float_unsecure(),
235
+ type: E5.Float_unsecure(),
238
236
  isOptional: false
239
237
  },
240
238
  percentageUsed: {
241
- type: ScalarTypeEnum.Float_unsecure(),
239
+ type: E5.Float_unsecure(),
242
240
  isOptional: false
243
241
  },
244
242
  action: {
245
- type: ScalarTypeEnum.String_unsecure(),
243
+ type: E5.String_unsecure(),
246
244
  isOptional: false
247
245
  },
248
246
  triggeredAt: {
249
- type: ScalarTypeEnum.DateTime(),
247
+ type: E5.DateTime(),
250
248
  isOptional: false
251
249
  }
252
250
  }
253
251
  });
254
- const ThresholdApproachingPayload = defineSchemaModel({
252
+ const ThresholdApproachingPayload = K5({
255
253
  name: "ThresholdApproachingEventPayload",
256
254
  description: "Payload when usage is approaching a threshold",
257
255
  fields: {
258
256
  thresholdId: {
259
- type: ScalarTypeEnum.String_unsecure(),
257
+ type: E5.String_unsecure(),
260
258
  isOptional: false
261
259
  },
262
260
  metricKey: {
263
- type: ScalarTypeEnum.String_unsecure(),
261
+ type: E5.String_unsecure(),
264
262
  isOptional: false
265
263
  },
266
264
  subjectType: {
267
- type: ScalarTypeEnum.String_unsecure(),
265
+ type: E5.String_unsecure(),
268
266
  isOptional: true
269
267
  },
270
268
  subjectId: {
271
- type: ScalarTypeEnum.String_unsecure(),
269
+ type: E5.String_unsecure(),
272
270
  isOptional: true
273
271
  },
274
272
  threshold: {
275
- type: ScalarTypeEnum.Float_unsecure(),
273
+ type: E5.Float_unsecure(),
276
274
  isOptional: false
277
275
  },
278
276
  currentValue: {
279
- type: ScalarTypeEnum.Float_unsecure(),
277
+ type: E5.Float_unsecure(),
280
278
  isOptional: false
281
279
  },
282
280
  percentageUsed: {
283
- type: ScalarTypeEnum.Float_unsecure(),
281
+ type: E5.Float_unsecure(),
284
282
  isOptional: false
285
283
  },
286
284
  triggeredAt: {
287
- type: ScalarTypeEnum.DateTime(),
285
+ type: E5.DateTime(),
288
286
  isOptional: false
289
287
  }
290
288
  }
@@ -376,4 +374,5 @@ const MeteringEvents = {
376
374
  };
377
375
 
378
376
  //#endregion
379
- export { MeteringEvents, MetricDefinedEvent, MetricUpdatedEvent, ThresholdApproachingEvent, ThresholdCreatedEvent, ThresholdExceededEvent, UsageAggregatedEvent, UsageBatchRecordedEvent, UsageRecordedEvent };
377
+ export { MeteringEvents, MetricDefinedEvent, MetricUpdatedEvent, ThresholdApproachingEvent, ThresholdCreatedEvent, ThresholdExceededEvent, UsageAggregatedEvent, UsageBatchRecordedEvent, UsageRecordedEvent };
378
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@lssm/lib.schema';\nimport { defineEvent } from '@lssm/lib.contracts';\n\n// ============ Event Payloads ============\n\nconst MetricDefinedPayload = defineSchemaModel({\n name: 'MetricDefinedEventPayload',\n description: 'Payload when a metric is defined',\n fields: {\n metricId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n unit: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n aggregationType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst MetricUpdatedPayload = defineSchemaModel({\n name: 'MetricUpdatedEventPayload',\n description: 'Payload when a metric is updated',\n fields: {\n metricId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changes: { type: ScalarTypeEnum.JSON(), isOptional: false },\n updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UsageRecordedPayload = defineSchemaModel({\n name: 'UsageRecordedEventPayload',\n description: 'Payload when usage is recorded',\n fields: {\n recordId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n metricKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quantity: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n source: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UsageBatchRecordedPayload = defineSchemaModel({\n name: 'UsageBatchRecordedEventPayload',\n description: 'Payload when a batch of usage is recorded',\n fields: {\n recordCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n metricKeys: { type: ScalarTypeEnum.JSON(), isOptional: false },\n totalQuantity: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UsageAggregatedPayload = defineSchemaModel({\n name: 'UsageAggregatedEventPayload',\n description: 'Payload when usage is aggregated',\n fields: {\n summaryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n metricKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n periodType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n periodStart: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n periodEnd: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n totalQuantity: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n recordCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n aggregatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ThresholdCreatedPayload = defineSchemaModel({\n name: 'ThresholdCreatedEventPayload',\n description: 'Payload when a threshold is created',\n fields: {\n thresholdId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n metricKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n subjectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n threshold: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n action: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ThresholdExceededPayload = defineSchemaModel({\n name: 'ThresholdExceededEventPayload',\n description: 'Payload when a threshold is exceeded',\n fields: {\n alertId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n thresholdId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n metricKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n subjectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n threshold: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n actualValue: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n percentageUsed: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n action: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n triggeredAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ThresholdApproachingPayload = defineSchemaModel({\n name: 'ThresholdApproachingEventPayload',\n description: 'Payload when usage is approaching a threshold',\n fields: {\n thresholdId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n metricKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n subjectType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n subjectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n threshold: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currentValue: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n percentageUsed: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n triggeredAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n// ============ Events ============\n\n/**\n * Emitted when a metric is defined.\n */\nexport const MetricDefinedEvent = defineEvent({\n name: 'metric.defined',\n version: 1,\n description: 'A metric has been defined.',\n payload: MetricDefinedPayload,\n});\n\n/**\n * Emitted when a metric is updated.\n */\nexport const MetricUpdatedEvent = defineEvent({\n name: 'metric.updated',\n version: 1,\n description: 'A metric has been updated.',\n payload: MetricUpdatedPayload,\n});\n\n/**\n * Emitted when usage is recorded.\n */\nexport const UsageRecordedEvent = defineEvent({\n name: 'usage.recorded',\n version: 1,\n description: 'Usage has been recorded.',\n payload: UsageRecordedPayload,\n});\n\n/**\n * Emitted when a batch of usage is recorded.\n */\nexport const UsageBatchRecordedEvent = defineEvent({\n name: 'usage.batch_recorded',\n version: 1,\n description: 'A batch of usage has been recorded.',\n payload: UsageBatchRecordedPayload,\n});\n\n/**\n * Emitted when usage is aggregated.\n */\nexport const UsageAggregatedEvent = defineEvent({\n name: 'usage.aggregated',\n version: 1,\n description: 'Usage has been aggregated into a summary.',\n payload: UsageAggregatedPayload,\n});\n\n/**\n * Emitted when a threshold is created.\n */\nexport const ThresholdCreatedEvent = defineEvent({\n name: 'threshold.created',\n version: 1,\n description: 'A usage threshold has been created.',\n payload: ThresholdCreatedPayload,\n});\n\n/**\n * Emitted when a threshold is exceeded.\n */\nexport const ThresholdExceededEvent = defineEvent({\n name: 'threshold.exceeded',\n version: 1,\n description: 'Usage has exceeded a threshold.',\n payload: ThresholdExceededPayload,\n});\n\n/**\n * Emitted when usage is approaching a threshold.\n */\nexport const ThresholdApproachingEvent = defineEvent({\n name: 'threshold.approaching',\n version: 1,\n description: 'Usage is approaching a threshold.',\n payload: ThresholdApproachingPayload,\n});\n\n/**\n * All metering events.\n */\nexport const MeteringEvents = {\n MetricDefinedEvent,\n MetricUpdatedEvent,\n UsageRecordedEvent,\n UsageBatchRecordedEvent,\n UsageAggregatedEvent,\n ThresholdCreatedEvent,\n ThresholdExceededEvent,\n ThresholdApproachingEvent,\n};\n"],"mappings":";;;;;AAKA,MAAM,uBAAuBA,GAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,KAAK;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAClE,MAAM;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,iBAAiB;GACf,MAAMA,GAAe,iBAAiB;GACtC,YAAY;GACb;EACD,OAAO;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE,WAAW;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,WAAW;GAAE,MAAMA,GAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,uBAAuBD,GAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAMC,GAAe,iBAAiB;GAA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,aAAa;CACb,SAAS;CACV,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;;;;AAKF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;;;;AAKF,MAAa,yBAAyB,YAAY;CAChD,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;;;;AAKF,MAAa,4BAA4B,YAAY;CACnD,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;;;;AAKF,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -8,4 +8,5 @@ import { FeatureModuleSpec } from "@lssm/lib.contracts";
8
8
  */
9
9
  declare const MeteringFeature: FeatureModuleSpec;
10
10
  //#endregion
11
- export { MeteringFeature };
11
+ export { MeteringFeature };
12
+ //# sourceMappingURL=metering.feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metering.feature.d.ts","names":[],"sources":["../src/metering.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAWa,iBAAiB"}
@@ -122,4 +122,5 @@ const MeteringFeature = {
122
122
  };
123
123
 
124
124
  //#endregion
125
- export { MeteringFeature };
125
+ export { MeteringFeature };
126
+ //# sourceMappingURL=metering.feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metering.feature.js","names":["MeteringFeature: FeatureModuleSpec"],"sources":["../src/metering.feature.ts"],"sourcesContent":["/**\n * Metering Feature Module Specification\n *\n * Defines the feature module for usage metering and threshold management.\n */\nimport type { FeatureModuleSpec } from '@lssm/lib.contracts';\n\n/**\n * Metering feature module that bundles metric definitions,\n * usage tracking, and threshold alerting capabilities.\n */\nexport const MeteringFeature: FeatureModuleSpec = {\n meta: {\n key: 'metering',\n title: 'Usage Metering',\n description: 'Usage metering, metric definitions, and threshold alerting',\n domain: 'platform',\n owners: ['@platform.metering'],\n tags: ['metering', 'usage', 'billing', 'thresholds'],\n stability: 'stable',\n },\n\n // All contract operations included in this feature\n operations: [\n // Metric operations\n { name: 'metric.define', version: 1 },\n { name: 'metric.update', version: 1 },\n { name: 'metric.delete', version: 1 },\n { name: 'metric.get', version: 1 },\n { name: 'metric.list', version: 1 },\n\n // Usage operations\n { name: 'usage.record', version: 1 },\n { name: 'usage.recordBatch', version: 1 },\n { name: 'usage.get', version: 1 },\n { name: 'usage.getSummary', version: 1 },\n\n // Threshold operations\n { name: 'threshold.create', version: 1 },\n { name: 'threshold.update', version: 1 },\n { name: 'threshold.delete', version: 1 },\n { name: 'threshold.list', version: 1 },\n ],\n\n // Events emitted by this feature\n events: [\n // Metric events\n { name: 'metric.defined', version: 1 },\n { name: 'metric.updated', version: 1 },\n\n // Usage events\n { name: 'usage.recorded', version: 1 },\n { name: 'usage.batch_recorded', version: 1 },\n { name: 'usage.aggregated', version: 1 },\n\n // Threshold events\n { name: 'threshold.created', version: 1 },\n { name: 'threshold.exceeded', version: 1 },\n { name: 'threshold.approaching', version: 1 },\n ],\n\n // No presentations for this library feature\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [\n { key: 'metering', version: 1 },\n { key: 'thresholds', version: 1 },\n ],\n requires: [],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,kBAAqC;CAChD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,qBAAqB;EAC9B,MAAM;GAAC;GAAY;GAAS;GAAW;GAAa;EACpD,WAAW;EACZ;CAGD,YAAY;EAEV;GAAE,MAAM;GAAiB,SAAS;GAAG;EACrC;GAAE,MAAM;GAAiB,SAAS;GAAG;EACrC;GAAE,MAAM;GAAiB,SAAS;GAAG;EACrC;GAAE,MAAM;GAAc,SAAS;GAAG;EAClC;GAAE,MAAM;GAAe,SAAS;GAAG;EAGnC;GAAE,MAAM;GAAgB,S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