@pagopa/interop-outbound-models 1.2.0 → 1.3.1
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/CHANGELOG.md +23 -1
- package/dist/delegation/eventsV2.d.ts +85 -1
- package/dist/delegation/eventsV2.d.ts.map +1 -1
- package/dist/delegation/eventsV2.js +37 -1
- package/dist/delegation/index.d.ts +28 -0
- package/dist/delegation/index.d.ts.map +1 -1
- package/dist/eservice/eventsV2.d.ts +85 -1
- package/dist/eservice/eventsV2.d.ts.map +1 -1
- package/dist/eservice/eventsV2.js +37 -1
- package/dist/eservice/index.d.ts +28 -0
- package/dist/eservice/index.d.ts.map +1 -1
- package/dist/gen/v2/agreement/agreement.d.ts +4 -0
- package/dist/gen/v2/agreement/agreement.d.ts.map +1 -1
- package/dist/gen/v2/agreement/agreement.js +8 -1
- package/dist/gen/v2/delegation/events.d.ts +76 -0
- package/dist/gen/v2/delegation/events.d.ts.map +1 -1
- package/dist/gen/v2/delegation/events.js +184 -0
- package/dist/gen/v2/eservice/eservice.d.ts +8 -0
- package/dist/gen/v2/eservice/eservice.d.ts.map +1 -1
- package/dist/gen/v2/eservice/eservice.js +15 -1
- package/dist/gen/v2/eservice/events.d.ts +76 -0
- package/dist/gen/v2/eservice/events.d.ts.map +1 -1
- package/dist/gen/v2/eservice/events.js +184 -0
- package/dist/gen/v2/purpose/purpose.d.ts +4 -0
- package/dist/gen/v2/purpose/purpose.d.ts.map +1 -1
- package/dist/gen/v2/purpose/purpose.js +8 -1
- package/dist/gen/v2/tenant/events.d.ts +38 -0
- package/dist/gen/v2/tenant/events.d.ts.map +1 -1
- package/dist/gen/v2/tenant/events.js +92 -0
- package/dist/gen/v2/tenant/tenant.d.ts +25 -0
- package/dist/gen/v2/tenant/tenant.d.ts.map +1 -1
- package/dist/gen/v2/tenant/tenant.js +58 -1
- package/dist/tenant/eventsV2.d.ts +43 -1
- package/dist/tenant/eventsV2.d.ts.map +1 -1
- package/dist/tenant/eventsV2.js +19 -1
- package/dist/tenant/index.d.ts +14 -0
- package/dist/tenant/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/proto/v2/agreement/agreement.proto +1 -0
- package/proto/v2/delegation/events.proto +16 -0
- package/proto/v2/eservice/eservice.proto +2 -0
- package/proto/v2/eservice/events.proto +15 -0
- package/proto/v2/purpose/purpose.proto +2 -0
- package/proto/v2/tenant/events.proto +8 -0
- package/proto/v2/tenant/tenant.proto +5 -0
- package/src/delegation/eventsV2.ts +48 -0
- package/src/eservice/eventsV2.ts +48 -0
- package/src/tenant/eventsV2.ts +24 -0
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
ProducerDelegationApprovedV2,
|
|
6
6
|
ProducerDelegationRejectedV2,
|
|
7
7
|
ProducerDelegationRevokedV2,
|
|
8
|
+
ConsumerDelegationApprovedV2,
|
|
9
|
+
ConsumerDelegationRejectedV2,
|
|
10
|
+
ConsumerDelegationRevokedV2,
|
|
11
|
+
ConsumerDelegationSubmittedV2,
|
|
8
12
|
} from "../gen/v2/delegation/events.js";
|
|
9
13
|
import { protobufDecoder } from "../utils.js";
|
|
10
14
|
|
|
@@ -24,6 +28,18 @@ export function delegationEventToBinaryDataV2(
|
|
|
24
28
|
.with({ type: "ProducerDelegationRevoked" }, ({ data }) =>
|
|
25
29
|
ProducerDelegationRevokedV2.toBinary(data)
|
|
26
30
|
)
|
|
31
|
+
.with({ type: "ConsumerDelegationSubmitted" }, ({ data }) =>
|
|
32
|
+
ConsumerDelegationSubmittedV2.toBinary(data)
|
|
33
|
+
)
|
|
34
|
+
.with({ type: "ConsumerDelegationApproved" }, ({ data }) =>
|
|
35
|
+
ConsumerDelegationApprovedV2.toBinary(data)
|
|
36
|
+
)
|
|
37
|
+
.with({ type: "ConsumerDelegationRejected" }, ({ data }) =>
|
|
38
|
+
ConsumerDelegationRejectedV2.toBinary(data)
|
|
39
|
+
)
|
|
40
|
+
.with({ type: "ConsumerDelegationRevoked" }, ({ data }) =>
|
|
41
|
+
ConsumerDelegationRevokedV2.toBinary(data)
|
|
42
|
+
)
|
|
27
43
|
.exhaustive();
|
|
28
44
|
}
|
|
29
45
|
|
|
@@ -60,6 +76,38 @@ export const DelegationEventV2 = z.discriminatedUnion("type", [
|
|
|
60
76
|
version: z.number(),
|
|
61
77
|
timestamp: z.coerce.date(),
|
|
62
78
|
}),
|
|
79
|
+
z.object({
|
|
80
|
+
event_version: z.literal(2),
|
|
81
|
+
type: z.literal("ConsumerDelegationSubmitted"),
|
|
82
|
+
data: protobufDecoder(ConsumerDelegationSubmittedV2),
|
|
83
|
+
stream_id: z.string(),
|
|
84
|
+
version: z.number(),
|
|
85
|
+
timestamp: z.coerce.date(),
|
|
86
|
+
}),
|
|
87
|
+
z.object({
|
|
88
|
+
event_version: z.literal(2),
|
|
89
|
+
type: z.literal("ConsumerDelegationApproved"),
|
|
90
|
+
data: protobufDecoder(ConsumerDelegationApprovedV2),
|
|
91
|
+
stream_id: z.string(),
|
|
92
|
+
version: z.number(),
|
|
93
|
+
timestamp: z.coerce.date(),
|
|
94
|
+
}),
|
|
95
|
+
z.object({
|
|
96
|
+
event_version: z.literal(2),
|
|
97
|
+
type: z.literal("ConsumerDelegationRejected"),
|
|
98
|
+
data: protobufDecoder(ConsumerDelegationRejectedV2),
|
|
99
|
+
stream_id: z.string(),
|
|
100
|
+
version: z.number(),
|
|
101
|
+
timestamp: z.coerce.date(),
|
|
102
|
+
}),
|
|
103
|
+
z.object({
|
|
104
|
+
event_version: z.literal(2),
|
|
105
|
+
type: z.literal("ConsumerDelegationRevoked"),
|
|
106
|
+
data: protobufDecoder(ConsumerDelegationRevokedV2),
|
|
107
|
+
stream_id: z.string(),
|
|
108
|
+
version: z.number(),
|
|
109
|
+
timestamp: z.coerce.date(),
|
|
110
|
+
}),
|
|
63
111
|
]);
|
|
64
112
|
|
|
65
113
|
export type DelegationEventV2 = z.infer<typeof DelegationEventV2>;
|
package/src/eservice/eventsV2.ts
CHANGED
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
EServiceDescriptorApprovedByDelegatorV2,
|
|
26
26
|
EServiceDescriptorRejectedByDelegatorV2,
|
|
27
27
|
EServiceDescriptorAttributesUpdatedV2,
|
|
28
|
+
EServiceIsClientAccessDelegableDisabledV2,
|
|
29
|
+
EServiceIsClientAccessDelegableEnabledV2,
|
|
30
|
+
EServiceIsDelegableDisabledV2,
|
|
31
|
+
EServiceIsDelegableEnabledV2,
|
|
28
32
|
EServiceNameUpdatedV2,
|
|
29
33
|
} from "../gen/v2/eservice/events.js";
|
|
30
34
|
|
|
@@ -101,6 +105,18 @@ export function eServiceEventToBinaryDataV2(
|
|
|
101
105
|
.with({ type: "EServiceDescriptorAttributesUpdated" }, ({ data }) =>
|
|
102
106
|
EServiceDescriptorAttributesUpdatedV2.toBinary(data)
|
|
103
107
|
)
|
|
108
|
+
.with({ type: "EServiceIsDelegableEnabled" }, ({ data }) =>
|
|
109
|
+
EServiceIsDelegableEnabledV2.toBinary(data)
|
|
110
|
+
)
|
|
111
|
+
.with({ type: "EServiceIsDelegableDisabled" }, ({ data }) =>
|
|
112
|
+
EServiceIsDelegableDisabledV2.toBinary(data)
|
|
113
|
+
)
|
|
114
|
+
.with({ type: "EServiceIsClientAccessDelegableEnabled" }, ({ data }) =>
|
|
115
|
+
EServiceIsClientAccessDelegableEnabledV2.toBinary(data)
|
|
116
|
+
)
|
|
117
|
+
.with({ type: "EServiceIsClientAccessDelegableDisabled" }, ({ data }) =>
|
|
118
|
+
EServiceIsClientAccessDelegableDisabledV2.toBinary(data)
|
|
119
|
+
)
|
|
104
120
|
.with({ type: "EServiceNameUpdated" }, ({ data }) =>
|
|
105
121
|
EServiceDescriptionUpdatedV2.toBinary(data)
|
|
106
122
|
)
|
|
@@ -292,6 +308,30 @@ export const EServiceEventV2 = z.discriminatedUnion("type", [
|
|
|
292
308
|
version: z.number(),
|
|
293
309
|
timestamp: z.coerce.date(),
|
|
294
310
|
}),
|
|
311
|
+
z.object({
|
|
312
|
+
event_version: z.literal(2),
|
|
313
|
+
type: z.literal("EServiceIsDelegableEnabled"),
|
|
314
|
+
data: protobufDecoder(EServiceIsDelegableEnabledV2),
|
|
315
|
+
stream_id: z.string(),
|
|
316
|
+
version: z.number(),
|
|
317
|
+
timestamp: z.coerce.date(),
|
|
318
|
+
}),
|
|
319
|
+
z.object({
|
|
320
|
+
event_version: z.literal(2),
|
|
321
|
+
type: z.literal("EServiceIsDelegableDisabled"),
|
|
322
|
+
data: protobufDecoder(EServiceIsDelegableDisabledV2),
|
|
323
|
+
stream_id: z.string(),
|
|
324
|
+
version: z.number(),
|
|
325
|
+
timestamp: z.coerce.date(),
|
|
326
|
+
}),
|
|
327
|
+
z.object({
|
|
328
|
+
event_version: z.literal(2),
|
|
329
|
+
type: z.literal("EServiceIsClientAccessDelegableEnabled"),
|
|
330
|
+
data: protobufDecoder(EServiceIsClientAccessDelegableEnabledV2),
|
|
331
|
+
stream_id: z.string(),
|
|
332
|
+
version: z.number(),
|
|
333
|
+
timestamp: z.coerce.date(),
|
|
334
|
+
}),
|
|
295
335
|
z.object({
|
|
296
336
|
event_version: z.literal(2),
|
|
297
337
|
type: z.literal("EServiceNameUpdated"),
|
|
@@ -300,6 +340,14 @@ export const EServiceEventV2 = z.discriminatedUnion("type", [
|
|
|
300
340
|
version: z.number(),
|
|
301
341
|
timestamp: z.coerce.date(),
|
|
302
342
|
}),
|
|
343
|
+
z.object({
|
|
344
|
+
event_version: z.literal(2),
|
|
345
|
+
type: z.literal("EServiceIsClientAccessDelegableDisabled"),
|
|
346
|
+
data: protobufDecoder(EServiceIsClientAccessDelegableDisabledV2),
|
|
347
|
+
stream_id: z.string(),
|
|
348
|
+
version: z.number(),
|
|
349
|
+
timestamp: z.coerce.date(),
|
|
350
|
+
}),
|
|
303
351
|
]);
|
|
304
352
|
|
|
305
353
|
export type EServiceEventV2 = z.infer<typeof EServiceEventV2>;
|
package/src/tenant/eventsV2.ts
CHANGED
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
MaintenanceTenantUpdatedV2,
|
|
18
18
|
TenantDelegatedProducerFeatureAddedV2,
|
|
19
19
|
TenantDelegatedProducerFeatureRemovedV2,
|
|
20
|
+
TenantDelegatedConsumerFeatureAddedV2,
|
|
21
|
+
TenantDelegatedConsumerFeatureRemovedV2,
|
|
20
22
|
} from "../gen/v2/tenant/events.js";
|
|
21
23
|
import { protobufDecoder } from "../utils.js";
|
|
22
24
|
|
|
@@ -70,6 +72,12 @@ export function tenantEventToBinaryDataV2(event: TenantEventV2): Uint8Array {
|
|
|
70
72
|
.with({ type: "TenantDelegatedProducerFeatureRemoved" }, ({ data }) =>
|
|
71
73
|
TenantDelegatedProducerFeatureRemovedV2.toBinary(data)
|
|
72
74
|
)
|
|
75
|
+
.with({ type: "TenantDelegatedConsumerFeatureAdded" }, ({ data }) =>
|
|
76
|
+
TenantDelegatedConsumerFeatureAddedV2.toBinary(data)
|
|
77
|
+
)
|
|
78
|
+
.with({ type: "TenantDelegatedConsumerFeatureRemoved" }, ({ data }) =>
|
|
79
|
+
TenantDelegatedConsumerFeatureRemovedV2.toBinary(data)
|
|
80
|
+
)
|
|
73
81
|
.exhaustive();
|
|
74
82
|
}
|
|
75
83
|
|
|
@@ -202,6 +210,22 @@ export const TenantEventV2 = z.discriminatedUnion("type", [
|
|
|
202
210
|
version: z.number(),
|
|
203
211
|
timestamp: z.coerce.date(),
|
|
204
212
|
}),
|
|
213
|
+
z.object({
|
|
214
|
+
event_version: z.literal(2),
|
|
215
|
+
type: z.literal("TenantDelegatedConsumerFeatureAdded"),
|
|
216
|
+
data: protobufDecoder(TenantDelegatedConsumerFeatureAddedV2),
|
|
217
|
+
stream_id: z.string(),
|
|
218
|
+
version: z.number(),
|
|
219
|
+
timestamp: z.coerce.date(),
|
|
220
|
+
}),
|
|
221
|
+
z.object({
|
|
222
|
+
event_version: z.literal(2),
|
|
223
|
+
type: z.literal("TenantDelegatedConsumerFeatureRemoved"),
|
|
224
|
+
data: protobufDecoder(TenantDelegatedConsumerFeatureRemovedV2),
|
|
225
|
+
stream_id: z.string(),
|
|
226
|
+
version: z.number(),
|
|
227
|
+
timestamp: z.coerce.date(),
|
|
228
|
+
}),
|
|
205
229
|
]);
|
|
206
230
|
|
|
207
231
|
export type TenantEventV2 = z.infer<typeof TenantEventV2>;
|