@agentworkforce/events 0.1.0 → 4.1.19
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/LICENSE +190 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema.d.ts +6 -0
- package/dist/json-schema.d.ts.map +1 -0
- package/dist/json-schema.js +51 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/parse.d.ts +22 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +145 -0
- package/dist/parse.js.map +1 -0
- package/dist/redact.d.ts +6 -0
- package/dist/redact.d.ts.map +1 -0
- package/dist/redact.js +53 -0
- package/dist/redact.js.map +1 -0
- package/dist/registry.d.ts +12 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +180 -0
- package/dist/registry.js.map +1 -0
- package/dist/registry.test.d.ts +2 -0
- package/dist/registry.test.d.ts.map +1 -0
- package/dist/registry.test.js +113 -0
- package/dist/registry.test.js.map +1 -0
- package/dist/schemas.d.ts +157 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +84 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +104 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +9 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +22 -0
- package/dist/validate.js.map +1 -0
- package/package.json +6 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2025 Agent Workforce Incorporated
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { DecodedEventFrame, EventCompatibilityInfo, EventContract, EventFrameV1, EventSummary, JsonSchema, LegacyRawGatewayEnvelope, ValidationIssue, ValidationResult } from './types.js';
|
|
2
|
+
export { EVENT_FRAME_V1_FIELDS, EVENT_FRAME_V1_SCHEMA, EVENT_SUMMARY_SCHEMA } from './schemas.js';
|
|
3
|
+
export { EVENT_CONTRACTS, EVENT_CONTRACT_JSON_SCHEMAS, getEventContract, requireEventContract } from './registry.js';
|
|
4
|
+
export { decodeEventFrame, decodeLegacyRawGatewayEnvelope, LEGACY_EVENT_TYPE_ALIASES, LEGACY_RAW_GATEWAY_ENVELOPE_FIELDS, parseEventFrame, safeParseEventFrame, validateRegisteredEventFrame } from './parse.js';
|
|
5
|
+
export { redactEventValue, type RedactOptions } from './redact.js';
|
|
6
|
+
export { assertEventFrameV1, EventValidationError, validateEventFrameV1 } from './validate.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,yBAAyB,EACzB,kCAAkC,EAClC,eAAe,EACf,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { EVENT_FRAME_V1_FIELDS, EVENT_FRAME_V1_SCHEMA, EVENT_SUMMARY_SCHEMA } from './schemas.js';
|
|
2
|
+
export { EVENT_CONTRACTS, EVENT_CONTRACT_JSON_SCHEMAS, getEventContract, requireEventContract } from './registry.js';
|
|
3
|
+
export { decodeEventFrame, decodeLegacyRawGatewayEnvelope, LEGACY_EVENT_TYPE_ALIASES, LEGACY_RAW_GATEWAY_ENVELOPE_FIELDS, parseEventFrame, safeParseEventFrame, validateRegisteredEventFrame } from './parse.js';
|
|
4
|
+
export { redactEventValue } from './redact.js';
|
|
5
|
+
export { assertEventFrameV1, EventValidationError, validateEventFrameV1 } from './validate.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,yBAAyB,EACzB,kCAAkC,EAClC,eAAe,EACf,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JsonSchema, ValidationResult } from './types.js';
|
|
2
|
+
/** Validate against the same JSON Schema objects exported to consumers. */
|
|
3
|
+
export declare function validateJsonSchema(schema: JsonSchema, value: unknown, path?: string): ValidationResult;
|
|
4
|
+
/** Remove registration identifiers when a schema is embedded or compiled in a shared catalog. */
|
|
5
|
+
export declare function withoutSchemaIdentifiers(schema: JsonSchema): JsonSchema;
|
|
6
|
+
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAmB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAOhF,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,SAAM,GAAG,gBAAgB,CASnG;AAED,iGAAiG;AACjG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAEvE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import addFormatsModule from 'ajv-formats';
|
|
2
|
+
import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
3
|
+
const ajv = new Ajv2020({ allErrors: true, strict: true });
|
|
4
|
+
addFormatsModule(ajv);
|
|
5
|
+
const validators = new WeakMap();
|
|
6
|
+
/** Validate against the same JSON Schema objects exported to consumers. */
|
|
7
|
+
export function validateJsonSchema(schema, value, path = '$') {
|
|
8
|
+
const cached = validators.get(schema);
|
|
9
|
+
const validator = cached ?? ajv.compile(withoutSchemaIdentifiers(schema));
|
|
10
|
+
if (!cached)
|
|
11
|
+
validators.set(schema, validator);
|
|
12
|
+
if (validator(value))
|
|
13
|
+
return { valid: true, errors: [] };
|
|
14
|
+
return {
|
|
15
|
+
valid: false,
|
|
16
|
+
errors: (validator.errors ?? []).map((issue) => toValidationIssue(issue, path))
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Remove registration identifiers when a schema is embedded or compiled in a shared catalog. */
|
|
20
|
+
export function withoutSchemaIdentifiers(schema) {
|
|
21
|
+
return stripIdentifiers(schema);
|
|
22
|
+
}
|
|
23
|
+
function stripIdentifiers(value) {
|
|
24
|
+
if (Array.isArray(value))
|
|
25
|
+
return value.map(stripIdentifiers);
|
|
26
|
+
if (typeof value !== 'object' || value === null)
|
|
27
|
+
return value;
|
|
28
|
+
return Object.fromEntries(Object.entries(value)
|
|
29
|
+
.filter(([key]) => key !== '$id' && key !== '$schema')
|
|
30
|
+
.map(([key, child]) => [key, stripIdentifiers(child)]));
|
|
31
|
+
}
|
|
32
|
+
function toValidationIssue(issue, root) {
|
|
33
|
+
const pointer = issue.instancePath
|
|
34
|
+
.split('/')
|
|
35
|
+
.slice(1)
|
|
36
|
+
.map(unescapePointer)
|
|
37
|
+
.map((part) => /^\d+$/.test(part) ? `[${part}]` : `.${part}`)
|
|
38
|
+
.join('');
|
|
39
|
+
const additional = issue.keyword === 'additionalProperties'
|
|
40
|
+
? `.${String(issue.params.additionalProperty ?? '')}`
|
|
41
|
+
: '';
|
|
42
|
+
return {
|
|
43
|
+
path: `${root}${pointer}${additional}`,
|
|
44
|
+
message: issue.message ?? 'is invalid',
|
|
45
|
+
keyword: issue.keyword
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function unescapePointer(value) {
|
|
49
|
+
return value.replaceAll('~1', '/').replaceAll('~0', '~');
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=json-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,OAAO,EAA2C,MAAM,kBAAkB,CAAC;AAGpF,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1D,gBAA8D,CAAC,GAAG,CAAC,CAAC;AAErE,MAAM,UAAU,GAAG,IAAI,OAAO,EAA4B,CAAC;AAE3D,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAAC,MAAkB,EAAE,KAAc,EAAE,IAAI,GAAG,GAAG;IAC/E,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,MAAM,IAAI,GAAG,CAAC,OAAO,CAA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C;SACV,KAAK,CAAC,CAAC,CAAC;SACR,GAAG,CAAC,eAAe,CAAC;SACpB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;SAC5D,IAAI,CAAC,EAAE,CAAC,CAAC;IACZ,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,KAAK,sBAAsB;QACzD,CAAC,CAAC,IAAI,MAAM,CAAE,KAAK,CAAC,MAA2C,CAAC,kBAAkB,IAAI,EAAE,CAAC,EAAE;QAC3F,CAAC,CAAC,EAAE,CAAC;IACP,OAAO;QACL,IAAI,EAAE,GAAG,IAAI,GAAG,OAAO,GAAG,UAAU,EAAE;QACtC,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,YAAY;QACtC,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/parse.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DecodedEventFrame, EventFrameV1, ValidationResult } from './types.js';
|
|
2
|
+
import { EventValidationError } from './validate.js';
|
|
3
|
+
export declare const LEGACY_RAW_GATEWAY_ENVELOPE_FIELDS: readonly ["id", "workspace", "type", "occurredAt", "attempt", "resource", "summary", "expand", "digest", "name", "cron", "provider", "eventType", "deliveryId", "paths", "resumeContext", "harnessSession", "channel", "messageId", "threadId"];
|
|
4
|
+
export declare const LEGACY_EVENT_TYPE_ALIASES: Readonly<{
|
|
5
|
+
readonly 'github.issue.labeled': "github.issues.labeled";
|
|
6
|
+
readonly 'github.pull_request.open': "github.pull_request.opened";
|
|
7
|
+
readonly 'slack.message': "slack.message.created";
|
|
8
|
+
readonly 'linear.issue.create': "linear.issue.created";
|
|
9
|
+
readonly user_reply: "relaycast.message";
|
|
10
|
+
}>;
|
|
11
|
+
export declare function parseEventFrame(input: unknown): EventFrameV1;
|
|
12
|
+
export declare function safeParseEventFrame(input: unknown): {
|
|
13
|
+
success: true;
|
|
14
|
+
data: EventFrameV1;
|
|
15
|
+
} | {
|
|
16
|
+
success: false;
|
|
17
|
+
error: EventValidationError;
|
|
18
|
+
};
|
|
19
|
+
export declare function validateRegisteredEventFrame(input: unknown): ValidationResult;
|
|
20
|
+
export declare function decodeEventFrame(input: unknown): DecodedEventFrame;
|
|
21
|
+
export declare function decodeLegacyRawGatewayEnvelope(input: unknown): DecodedEventFrame;
|
|
22
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAA0B,YAAY,EAA4B,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACtI,OAAO,EAAE,oBAAoB,EAAsD,MAAM,eAAe,CAAC;AAEzG,eAAO,MAAM,kCAAkC,iPAIpC,CAAC;AAGZ,eAAO,MAAM,yBAAyB;;;;;;EAM3B,CAAC;AAEZ,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAO5D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,oBAAoB,CAAA;CAAE,CAM3I;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAM7E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAGlE;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAwDhF"}
|
package/dist/parse.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { getEventContract } from './registry.js';
|
|
2
|
+
import { EventValidationError, assertEventFrameV1, isRecord, validateEventFrameV1 } from './validate.js';
|
|
3
|
+
export const LEGACY_RAW_GATEWAY_ENVELOPE_FIELDS = Object.freeze([
|
|
4
|
+
'id', 'workspace', 'type', 'occurredAt', 'attempt', 'resource', 'summary', 'expand',
|
|
5
|
+
'digest', 'name', 'cron', 'provider', 'eventType', 'deliveryId', 'paths',
|
|
6
|
+
'resumeContext', 'harnessSession', 'channel', 'messageId', 'threadId'
|
|
7
|
+
]);
|
|
8
|
+
const LEGACY_FIELDS = new Set(LEGACY_RAW_GATEWAY_ENVELOPE_FIELDS);
|
|
9
|
+
export const LEGACY_EVENT_TYPE_ALIASES = Object.freeze({
|
|
10
|
+
'github.issue.labeled': 'github.issues.labeled',
|
|
11
|
+
'github.pull_request.open': 'github.pull_request.opened',
|
|
12
|
+
'slack.message': 'slack.message.created',
|
|
13
|
+
'linear.issue.create': 'linear.issue.created',
|
|
14
|
+
user_reply: 'relaycast.message'
|
|
15
|
+
});
|
|
16
|
+
export function parseEventFrame(input) {
|
|
17
|
+
assertEventFrameV1(input);
|
|
18
|
+
const contract = getEventContract(input.type, input.contractVersion);
|
|
19
|
+
if (!contract)
|
|
20
|
+
throw new EventValidationError([{ path: '$.type', message: `unknown Event contract ${input.type}@${input.contractVersion}`, keyword: 'contract' }]);
|
|
21
|
+
const result = contract.validate(input);
|
|
22
|
+
if (!result.valid)
|
|
23
|
+
throw new EventValidationError(result.errors);
|
|
24
|
+
return input;
|
|
25
|
+
}
|
|
26
|
+
export function safeParseEventFrame(input) {
|
|
27
|
+
try {
|
|
28
|
+
return { success: true, data: parseEventFrame(input) };
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
return { success: false, error: error instanceof EventValidationError ? error : new EventValidationError([{ path: '$', message: error instanceof Error ? error.message : String(error) }]) };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export function validateRegisteredEventFrame(input) {
|
|
35
|
+
const base = validateEventFrameV1(input);
|
|
36
|
+
if (!base.valid || !isRecord(input))
|
|
37
|
+
return base;
|
|
38
|
+
const contract = getEventContract(String(input.type), Number(input.contractVersion));
|
|
39
|
+
if (!contract)
|
|
40
|
+
return { valid: false, errors: [{ path: '$.type', message: `unknown Event contract ${String(input.type)}@${String(input.contractVersion)}`, keyword: 'contract' }] };
|
|
41
|
+
return contract.validate(input);
|
|
42
|
+
}
|
|
43
|
+
export function decodeEventFrame(input) {
|
|
44
|
+
if (isRecord(input) && 'schemaVersion' in input)
|
|
45
|
+
return { frame: parseEventFrame(input) };
|
|
46
|
+
return decodeLegacyRawGatewayEnvelope(input);
|
|
47
|
+
}
|
|
48
|
+
export function decodeLegacyRawGatewayEnvelope(input) {
|
|
49
|
+
if (!isRecord(input))
|
|
50
|
+
throw new EventValidationError([{ path: '$', message: 'legacy gateway envelope must be an object', keyword: 'type' }]);
|
|
51
|
+
const legacy = input;
|
|
52
|
+
requireString(legacy.id, '$.id');
|
|
53
|
+
requireString(legacy.workspace, '$.workspace');
|
|
54
|
+
requireString(legacy.type, '$.type');
|
|
55
|
+
requireString(legacy.occurredAt, '$.occurredAt');
|
|
56
|
+
const originalType = legacy.type;
|
|
57
|
+
const aliased = LEGACY_EVENT_TYPE_ALIASES[originalType];
|
|
58
|
+
const type = aliased ?? originalType;
|
|
59
|
+
const contract = getEventContract(type, 1);
|
|
60
|
+
if (!contract)
|
|
61
|
+
throw new EventValidationError([{ path: '$.type', message: `unknown legacy Event contract ${type}@1`, keyword: 'contract' }]);
|
|
62
|
+
const provider = nonEmpty(legacy.provider) ?? contract.provider;
|
|
63
|
+
const canonicalResource = isCanonicalResource(legacy.resource) ? legacy.resource : undefined;
|
|
64
|
+
const messageId = nonEmpty(legacy.messageId) ?? nestedString(legacy.resource, 'messageId') ?? nestedString(legacy.resource, 'message', 'id');
|
|
65
|
+
const channel = nonEmpty(legacy.channel) ?? nestedString(legacy.resource, 'channel');
|
|
66
|
+
const threadId = nonEmpty(legacy.threadId) ?? nestedString(legacy.resource, 'threadId') ?? nestedString(legacy.resumeContext, 'threadId');
|
|
67
|
+
const resourceId = canonicalResource?.id ?? messageId ?? nonEmpty(legacy.deliveryId) ?? (type === 'cron.tick' ? nonEmpty(legacy.name) : undefined) ?? legacy.id;
|
|
68
|
+
const path = canonicalResource?.path ?? firstPath(legacy.paths) ?? deriveLegacyPath(type, provider, contract.resourceKind, resourceId, channel);
|
|
69
|
+
const preserved = Object.keys(input).filter((key) => !LEGACY_FIELDS.has(key));
|
|
70
|
+
const aliasesApplied = aliased ? [`${originalType} -> ${type}`] : [];
|
|
71
|
+
const compatibility = {
|
|
72
|
+
source: 'legacy-raw-gateway-envelope',
|
|
73
|
+
originalType,
|
|
74
|
+
aliasesApplied,
|
|
75
|
+
preservedFields: preserved,
|
|
76
|
+
...(Object.hasOwn(input, 'compatibility') ? { originalCompatibility: input.compatibility } : {})
|
|
77
|
+
};
|
|
78
|
+
const legacyExtensions = {};
|
|
79
|
+
for (const key of preserved)
|
|
80
|
+
defineDataProperty(legacyExtensions, key, input[key]);
|
|
81
|
+
for (const key of ['expand', 'resumeContext', 'harnessSession', 'eventType']) {
|
|
82
|
+
if (legacy[key] !== undefined)
|
|
83
|
+
defineDataProperty(legacyExtensions, key, legacy[key]);
|
|
84
|
+
}
|
|
85
|
+
defineDataProperty(legacyExtensions, 'compatibility', compatibility);
|
|
86
|
+
const frame = {
|
|
87
|
+
schemaVersion: 1,
|
|
88
|
+
id: legacy.id,
|
|
89
|
+
workspace: legacy.workspace,
|
|
90
|
+
type,
|
|
91
|
+
contractVersion: 1,
|
|
92
|
+
occurredAt: legacy.occurredAt,
|
|
93
|
+
attempt: Number.isInteger(legacy.attempt) && legacy.attempt > 0 ? legacy.attempt : 1,
|
|
94
|
+
resource: canonicalResource ?? { path, kind: contract.resourceKind, id: resourceId, provider },
|
|
95
|
+
summary: isRecord(legacy.summary) ? legacy.summary : {},
|
|
96
|
+
...(legacy.deliveryId ? { delivery: { id: legacy.deliveryId } } : {}),
|
|
97
|
+
...(!canonicalResource && legacy.resource !== undefined ? { payload: legacy.resource } : {}),
|
|
98
|
+
...(Array.isArray(legacy.paths) ? { paths: legacy.paths.filter((item) => typeof item === 'string') } : {}),
|
|
99
|
+
...(typeof legacy.digest === 'string' ? { digest: legacy.digest } : {}),
|
|
100
|
+
...(type === 'cron.tick' ? { schedule: { name: nonEmpty(legacy.name) ?? resourceId, ...(nonEmpty(legacy.cron) ? { cron: legacy.cron } : {}) } } : {}),
|
|
101
|
+
...((channel || messageId || threadId) ? { message: { ...(channel ? { channel } : {}), ...(messageId ? { messageId } : {}), ...(threadId ? { threadId } : {}) } } : {}),
|
|
102
|
+
extensions: legacyExtensions
|
|
103
|
+
};
|
|
104
|
+
return { frame: parseEventFrame(frame), compatibility };
|
|
105
|
+
}
|
|
106
|
+
function isCanonicalResource(value) {
|
|
107
|
+
if (!isRecord(value))
|
|
108
|
+
return false;
|
|
109
|
+
const keys = ['path', 'kind', 'id', 'provider'];
|
|
110
|
+
return Object.keys(value).length === keys.length && keys.every((key) => typeof value[key] === 'string');
|
|
111
|
+
}
|
|
112
|
+
function deriveLegacyPath(type, provider, kind, id, channel) {
|
|
113
|
+
if (type === 'cron.tick')
|
|
114
|
+
return `/cron/schedules/${encodeURIComponent(id)}`;
|
|
115
|
+
if (type === 'relaycast.message')
|
|
116
|
+
return `/relaycast/${encodeURIComponent(channel ?? 'dm')}/messages/${encodeURIComponent(id)}`;
|
|
117
|
+
const kindSegments = kind.split('.').filter(Boolean);
|
|
118
|
+
if (kindSegments[0] === provider)
|
|
119
|
+
kindSegments.shift();
|
|
120
|
+
const resourceSegments = kindSegments.length > 0 ? kindSegments : ['resources'];
|
|
121
|
+
return `/${encodeURIComponent(provider)}/${resourceSegments.map(encodeURIComponent).join('/')}/${encodeURIComponent(id)}`;
|
|
122
|
+
}
|
|
123
|
+
function defineDataProperty(target, key, value) {
|
|
124
|
+
Object.defineProperty(target, key, { value, enumerable: true, configurable: true, writable: true });
|
|
125
|
+
}
|
|
126
|
+
function firstPath(value) {
|
|
127
|
+
return Array.isArray(value) ? value.find((item) => typeof item === 'string') : undefined;
|
|
128
|
+
}
|
|
129
|
+
function nestedString(value, ...path) {
|
|
130
|
+
let cursor = value;
|
|
131
|
+
for (const part of path) {
|
|
132
|
+
if (!isRecord(cursor))
|
|
133
|
+
return undefined;
|
|
134
|
+
cursor = cursor[part];
|
|
135
|
+
}
|
|
136
|
+
return nonEmpty(cursor);
|
|
137
|
+
}
|
|
138
|
+
function nonEmpty(value) {
|
|
139
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
140
|
+
}
|
|
141
|
+
function requireString(value, path) {
|
|
142
|
+
if (!nonEmpty(value))
|
|
143
|
+
throw new EventValidationError([{ path, message: 'must be a non-empty string', keyword: 'minLength' }]);
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=parse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEzG,MAAM,CAAC,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9D,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ;IACnF,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO;IACxE,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,E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EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;AAChI,CAAC"}
|
package/dist/redact.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface RedactOptions {
|
|
2
|
+
additionalSensitiveKeys?: readonly (string | RegExp)[];
|
|
3
|
+
}
|
|
4
|
+
/** Clone and redact a JSON-like value without mutating the provider payload. */
|
|
5
|
+
export declare function redactEventValue<T>(value: T, options?: RedactOptions): T;
|
|
6
|
+
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,uBAAuB,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACxD;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,GAAE,aAAkB,GAAG,CAAC,CAE5E"}
|
package/dist/redact.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const REDACTED = '[REDACTED]';
|
|
2
|
+
const SENSITIVE_KEY = /(?:authorization|cookie|password|passwd|secret|token|api[-_]?key|private[-_]?key)/i;
|
|
3
|
+
const BEARER = /\bBearer\s+[A-Za-z0-9._~+\/-]+=*/gi;
|
|
4
|
+
/** Clone and redact a JSON-like value without mutating the provider payload. */
|
|
5
|
+
export function redactEventValue(value, options = {}) {
|
|
6
|
+
return visit(value, options, new WeakMap());
|
|
7
|
+
}
|
|
8
|
+
function visit(value, options, seen) {
|
|
9
|
+
if (typeof value === 'string')
|
|
10
|
+
return value.replace(BEARER, REDACTED);
|
|
11
|
+
if (value === null || typeof value !== 'object')
|
|
12
|
+
return value;
|
|
13
|
+
const cached = seen.get(value);
|
|
14
|
+
if (cached !== undefined)
|
|
15
|
+
return cached;
|
|
16
|
+
if (Array.isArray(value)) {
|
|
17
|
+
const out = [];
|
|
18
|
+
seen.set(value, out);
|
|
19
|
+
for (const item of value)
|
|
20
|
+
out.push(visit(item, options, seen));
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
if (!isPlainObject(value))
|
|
24
|
+
return value;
|
|
25
|
+
const out = {};
|
|
26
|
+
seen.set(value, out);
|
|
27
|
+
for (const [key, child] of Object.entries(value)) {
|
|
28
|
+
Object.defineProperty(out, key, {
|
|
29
|
+
value: isSensitiveKey(key, options.additionalSensitiveKeys) ? REDACTED : visit(child, options, seen),
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
function isSensitiveKey(key, additional) {
|
|
38
|
+
if (SENSITIVE_KEY.test(key))
|
|
39
|
+
return true;
|
|
40
|
+
return additional?.some((matcher) => {
|
|
41
|
+
if (typeof matcher === 'string')
|
|
42
|
+
return matcher.toLowerCase() === key.toLowerCase();
|
|
43
|
+
matcher.lastIndex = 0;
|
|
44
|
+
const matches = matcher.test(key);
|
|
45
|
+
matcher.lastIndex = 0;
|
|
46
|
+
return matches;
|
|
47
|
+
}) ?? false;
|
|
48
|
+
}
|
|
49
|
+
function isPlainObject(value) {
|
|
50
|
+
const prototype = Object.getPrototypeOf(value);
|
|
51
|
+
return prototype === Object.prototype || prototype === null;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=redact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,YAAY,CAAC;AAC9B,MAAM,aAAa,GAAG,oFAAoF,CAAC;AAC3G,MAAM,MAAM,GAAG,oCAAoC,CAAC;AAMpD,gFAAgF;AAChF,MAAM,UAAU,gBAAgB,CAAI,KAAQ,EAAE,UAAyB,EAAE;IACvE,OAAO,KAAK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AAI,CAAC;YACpG,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,cAAc,CAAC,GAAW,EAAE,UAAoD;IACvF,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,UAAU,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;QAClC,IAAI,OAAO,OAAO,KAAK,QAAQ;YAAE,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC;QACpF,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,IAAI,KAAK,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EventContract } from './types.js';
|
|
2
|
+
export declare const EVENT_CONTRACTS: readonly [EventContract<unknown>, EventContract<unknown>, EventContract<unknown>, EventContract<unknown>, EventContract<unknown>, EventContract<unknown>, EventContract<unknown>];
|
|
3
|
+
export declare function getEventContract(id: string, version?: number): EventContract | undefined;
|
|
4
|
+
export declare function requireEventContract(id: string, version?: number): EventContract;
|
|
5
|
+
export declare const EVENT_CONTRACT_JSON_SCHEMAS: Readonly<{
|
|
6
|
+
[k: string]: {
|
|
7
|
+
$schema: string;
|
|
8
|
+
$id: string;
|
|
9
|
+
allOf: Readonly<Record<string, unknown>>[];
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAA+D,MAAM,YAAY,CAAC;AAqE7G,eAAO,MAAM,eAAe,mLAiFkB,CAAC;AAI/C,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,aAAa,GAAG,SAAS,CAEnF;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,aAAa,CAI3E;AAED,eAAO,MAAM,2BAA2B;;;;;;EA2BtC,CAAC"}
|