@pagopa/interop-outbound-models 1.8.20-manual-archiving.0 → 1.8.21

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 (32) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/gen/v2/agreement/agreement.d.ts +45 -2
  3. package/dist/gen/v2/agreement/agreement.d.ts.map +1 -1
  4. package/dist/gen/v2/agreement/agreement.js +100 -6
  5. package/dist/gen/v2/eservice/eservice.d.ts +60 -0
  6. package/dist/gen/v2/eservice/eservice.d.ts.map +1 -1
  7. package/dist/gen/v2/eservice/eservice.js +97 -1
  8. package/dist/gen/v2/eservice-template/eservice-template.d.ts +5 -0
  9. package/dist/gen/v2/eservice-template/eservice-template.d.ts.map +1 -1
  10. package/dist/gen/v2/eservice-template/eservice-template.js +9 -1
  11. package/dist/gen/v2/tenant/events.d.ts +107 -0
  12. package/dist/gen/v2/tenant/events.d.ts.map +1 -1
  13. package/dist/gen/v2/tenant/events.js +254 -0
  14. package/dist/gen/v2/tenant/tenant.d.ts +68 -0
  15. package/dist/gen/v2/tenant/tenant.d.ts.map +1 -1
  16. package/dist/gen/v2/tenant/tenant.js +153 -2
  17. package/dist/tenant/eventsV2.d.ts +106 -1
  18. package/dist/tenant/eventsV2.d.ts.map +1 -1
  19. package/dist/tenant/eventsV2.js +46 -1
  20. package/dist/tenant/index.d.ts +35 -0
  21. package/dist/tenant/index.d.ts.map +1 -1
  22. package/package.json +2 -2
  23. package/proto/v2/agreement/agreement.proto +11 -1
  24. package/proto/v2/eservice/eservice.proto +16 -0
  25. package/proto/v2/eservice-template/eservice-template.proto +1 -0
  26. package/proto/v2/tenant/events.proto +23 -0
  27. package/proto/v2/tenant/tenant.proto +15 -0
  28. package/src/tenant/eventsV2.ts +60 -0
  29. package/tests/agreement.test.ts +30 -1
  30. package/tests/eservice.test.ts +6 -0
  31. package/tests/template.test.ts +6 -0
  32. package/tests/tenant.test.ts +49 -1
@@ -53,7 +53,8 @@ class TenantV2$Type extends MessageType {
53
53
  { no: 9, name: "kind", kind: "enum", opt: true, T: () => ["tenant.v2.TenantKindV2", TenantKindV2] },
54
54
  { no: 10, name: "onboardedAt", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
55
55
  { no: 11, name: "subUnitType", kind: "enum", opt: true, T: () => ["tenant.v2.TenantUnitTypeV2", TenantUnitTypeV2] },
56
- { no: 12, name: "selfcareInstitutionType", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
56
+ { no: 12, name: "selfcareInstitutionType", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
57
+ { no: 14, name: "remoteIds", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TenantRemoteIdV2 }
57
58
  ]);
58
59
  }
59
60
  create(value) {
@@ -65,6 +66,7 @@ class TenantV2$Type extends MessageType {
65
66
  message.createdAt = 0n;
66
67
  message.name = "";
67
68
  message.onboardedAt = 0n;
69
+ message.remoteIds = [];
68
70
  if (value !== undefined)
69
71
  reflectionMergePartial(this, message, value);
70
72
  return message;
@@ -110,6 +112,9 @@ class TenantV2$Type extends MessageType {
110
112
  case /* optional string selfcareInstitutionType */ 12:
111
113
  message.selfcareInstitutionType = reader.string();
112
114
  break;
115
+ case /* repeated tenant.v2.TenantRemoteIdV2 remoteIds */ 14:
116
+ message.remoteIds.push(TenantRemoteIdV2.internalBinaryRead(reader, reader.uint32(), options));
117
+ break;
113
118
  default:
114
119
  let u = options.readUnknownField;
115
120
  if (u === "throw")
@@ -158,6 +163,9 @@ class TenantV2$Type extends MessageType {
158
163
  /* optional string selfcareInstitutionType = 12; */
159
164
  if (message.selfcareInstitutionType !== undefined)
160
165
  writer.tag(12, WireType.LengthDelimited).string(message.selfcareInstitutionType);
166
+ /* repeated tenant.v2.TenantRemoteIdV2 remoteIds = 14; */
167
+ for (let i = 0; i < message.remoteIds.length; i++)
168
+ TenantRemoteIdV2.internalBinaryWrite(message.remoteIds[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
161
169
  let u = options.writeUnknownFields;
162
170
  if (u !== false)
163
171
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -643,6 +651,76 @@ class TenantCertifiedAttributeV2$Type extends MessageType {
643
651
  */
644
652
  export const TenantCertifiedAttributeV2 = new TenantCertifiedAttributeV2$Type();
645
653
  // @generated message type with reflection information, may provide speed optimized methods
654
+ class TenantCertifiedDiscreteAttributeV2$Type extends MessageType {
655
+ constructor() {
656
+ super("tenant.v2.TenantCertifiedDiscreteAttributeV2", [
657
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
658
+ { no: 2, name: "assignmentTimestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
659
+ { no: 3, name: "revocationTimestamp", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
660
+ { no: 4, name: "discreteValue", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
661
+ ]);
662
+ }
663
+ create(value) {
664
+ const message = globalThis.Object.create((this.messagePrototype));
665
+ message.id = "";
666
+ message.assignmentTimestamp = 0n;
667
+ message.discreteValue = 0;
668
+ if (value !== undefined)
669
+ reflectionMergePartial(this, message, value);
670
+ return message;
671
+ }
672
+ internalBinaryRead(reader, length, options, target) {
673
+ let message = target ?? this.create(), end = reader.pos + length;
674
+ while (reader.pos < end) {
675
+ let [fieldNo, wireType] = reader.tag();
676
+ switch (fieldNo) {
677
+ case /* string id */ 1:
678
+ message.id = reader.string();
679
+ break;
680
+ case /* int64 assignmentTimestamp */ 2:
681
+ message.assignmentTimestamp = reader.int64().toBigInt();
682
+ break;
683
+ case /* optional int64 revocationTimestamp */ 3:
684
+ message.revocationTimestamp = reader.int64().toBigInt();
685
+ break;
686
+ case /* int32 discreteValue */ 4:
687
+ message.discreteValue = reader.int32();
688
+ break;
689
+ default:
690
+ let u = options.readUnknownField;
691
+ if (u === "throw")
692
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
693
+ let d = reader.skip(wireType);
694
+ if (u !== false)
695
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
696
+ }
697
+ }
698
+ return message;
699
+ }
700
+ internalBinaryWrite(message, writer, options) {
701
+ /* string id = 1; */
702
+ if (message.id !== "")
703
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
704
+ /* int64 assignmentTimestamp = 2; */
705
+ if (message.assignmentTimestamp !== 0n)
706
+ writer.tag(2, WireType.Varint).int64(message.assignmentTimestamp);
707
+ /* optional int64 revocationTimestamp = 3; */
708
+ if (message.revocationTimestamp !== undefined)
709
+ writer.tag(3, WireType.Varint).int64(message.revocationTimestamp);
710
+ /* int32 discreteValue = 4; */
711
+ if (message.discreteValue !== 0)
712
+ writer.tag(4, WireType.Varint).int32(message.discreteValue);
713
+ let u = options.writeUnknownFields;
714
+ if (u !== false)
715
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
716
+ return writer;
717
+ }
718
+ }
719
+ /**
720
+ * @generated MessageType for protobuf message tenant.v2.TenantCertifiedDiscreteAttributeV2
721
+ */
722
+ export const TenantCertifiedDiscreteAttributeV2 = new TenantCertifiedDiscreteAttributeV2$Type();
723
+ // @generated message type with reflection information, may provide speed optimized methods
646
724
  class TenantDeclaredAttributeV2$Type extends MessageType {
647
725
  constructor() {
648
726
  super("tenant.v2.TenantDeclaredAttributeV2", [
@@ -776,12 +854,76 @@ class TenantVerifiedAttributeV2$Type extends MessageType {
776
854
  */
777
855
  export const TenantVerifiedAttributeV2 = new TenantVerifiedAttributeV2$Type();
778
856
  // @generated message type with reflection information, may provide speed optimized methods
857
+ class TenantRemoteIdV2$Type extends MessageType {
858
+ constructor() {
859
+ super("tenant.v2.TenantRemoteIdV2", [
860
+ { no: 1, name: "origin", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
861
+ { no: 2, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
862
+ { no: 3, name: "assignmentTimestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
863
+ ]);
864
+ }
865
+ create(value) {
866
+ const message = globalThis.Object.create((this.messagePrototype));
867
+ message.origin = "";
868
+ message.value = "";
869
+ message.assignmentTimestamp = 0n;
870
+ if (value !== undefined)
871
+ reflectionMergePartial(this, message, value);
872
+ return message;
873
+ }
874
+ internalBinaryRead(reader, length, options, target) {
875
+ let message = target ?? this.create(), end = reader.pos + length;
876
+ while (reader.pos < end) {
877
+ let [fieldNo, wireType] = reader.tag();
878
+ switch (fieldNo) {
879
+ case /* string origin */ 1:
880
+ message.origin = reader.string();
881
+ break;
882
+ case /* string value */ 2:
883
+ message.value = reader.string();
884
+ break;
885
+ case /* int64 assignmentTimestamp */ 3:
886
+ message.assignmentTimestamp = reader.int64().toBigInt();
887
+ break;
888
+ default:
889
+ let u = options.readUnknownField;
890
+ if (u === "throw")
891
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
892
+ let d = reader.skip(wireType);
893
+ if (u !== false)
894
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
895
+ }
896
+ }
897
+ return message;
898
+ }
899
+ internalBinaryWrite(message, writer, options) {
900
+ /* string origin = 1; */
901
+ if (message.origin !== "")
902
+ writer.tag(1, WireType.LengthDelimited).string(message.origin);
903
+ /* string value = 2; */
904
+ if (message.value !== "")
905
+ writer.tag(2, WireType.LengthDelimited).string(message.value);
906
+ /* int64 assignmentTimestamp = 3; */
907
+ if (message.assignmentTimestamp !== 0n)
908
+ writer.tag(3, WireType.Varint).int64(message.assignmentTimestamp);
909
+ let u = options.writeUnknownFields;
910
+ if (u !== false)
911
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
912
+ return writer;
913
+ }
914
+ }
915
+ /**
916
+ * @generated MessageType for protobuf message tenant.v2.TenantRemoteIdV2
917
+ */
918
+ export const TenantRemoteIdV2 = new TenantRemoteIdV2$Type();
919
+ // @generated message type with reflection information, may provide speed optimized methods
779
920
  class TenantAttributeV2$Type extends MessageType {
780
921
  constructor() {
781
922
  super("tenant.v2.TenantAttributeV2", [
782
923
  { no: 1, name: "certifiedAttribute", kind: "message", oneof: "sealedValue", T: () => TenantCertifiedAttributeV2 },
783
924
  { no: 2, name: "declaredAttribute", kind: "message", oneof: "sealedValue", T: () => TenantDeclaredAttributeV2 },
784
- { no: 3, name: "verifiedAttribute", kind: "message", oneof: "sealedValue", T: () => TenantVerifiedAttributeV2 }
925
+ { no: 3, name: "verifiedAttribute", kind: "message", oneof: "sealedValue", T: () => TenantVerifiedAttributeV2 },
926
+ { no: 4, name: "certifiedDiscreteAttribute", kind: "message", oneof: "sealedValue", T: () => TenantCertifiedDiscreteAttributeV2 }
785
927
  ]);
786
928
  }
787
929
  create(value) {
@@ -814,6 +956,12 @@ class TenantAttributeV2$Type extends MessageType {
814
956
  verifiedAttribute: TenantVerifiedAttributeV2.internalBinaryRead(reader, reader.uint32(), options, message.sealedValue.verifiedAttribute)
815
957
  };
816
958
  break;
959
+ case /* tenant.v2.TenantCertifiedDiscreteAttributeV2 certifiedDiscreteAttribute */ 4:
960
+ message.sealedValue = {
961
+ oneofKind: "certifiedDiscreteAttribute",
962
+ certifiedDiscreteAttribute: TenantCertifiedDiscreteAttributeV2.internalBinaryRead(reader, reader.uint32(), options, message.sealedValue.certifiedDiscreteAttribute)
963
+ };
964
+ break;
817
965
  default:
818
966
  let u = options.readUnknownField;
819
967
  if (u === "throw")
@@ -835,6 +983,9 @@ class TenantAttributeV2$Type extends MessageType {
835
983
  /* tenant.v2.TenantVerifiedAttributeV2 verifiedAttribute = 3; */
836
984
  if (message.sealedValue.oneofKind === "verifiedAttribute")
837
985
  TenantVerifiedAttributeV2.internalBinaryWrite(message.sealedValue.verifiedAttribute, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
986
+ /* tenant.v2.TenantCertifiedDiscreteAttributeV2 certifiedDiscreteAttribute = 4; */
987
+ if (message.sealedValue.oneofKind === "certifiedDiscreteAttribute")
988
+ TenantCertifiedDiscreteAttributeV2.internalBinaryWrite(message.sealedValue.certifiedDiscreteAttribute, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
838
989
  let u = options.writeUnknownFields;
839
990
  if (u !== false)
840
991
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { TenantOnboardedV2, TenantOnboardDetailsUpdatedV2, TenantCertifiedAttributeAssignedV2, TenantCertifiedAttributeRevokedV2, TenantDeclaredAttributeAssignedV2, TenantDeclaredAttributeRevokedV2, TenantVerifiedAttributeAssignedV2, TenantVerifiedAttributeRevokedV2, TenantVerifiedAttributeExpirationUpdatedV2, MaintenanceTenantDeletedV2, TenantVerifiedAttributeExtensionUpdatedV2, TenantKindUpdatedV2, MaintenanceTenantPromotedToCertifierV2, MaintenanceTenantUpdatedV2, TenantDelegatedProducerFeatureAddedV2, TenantDelegatedProducerFeatureRemovedV2, TenantDelegatedConsumerFeatureAddedV2, TenantDelegatedConsumerFeatureRemovedV2 } from "../gen/v2/tenant/events.js";
2
+ import { TenantOnboardedV2, TenantOnboardDetailsUpdatedV2, TenantCertifiedAttributeAssignedV2, TenantCertifiedAttributeRevokedV2, TenantDeclaredAttributeAssignedV2, TenantDeclaredAttributeRevokedV2, TenantVerifiedAttributeAssignedV2, TenantVerifiedAttributeRevokedV2, TenantVerifiedAttributeExpirationUpdatedV2, MaintenanceTenantDeletedV2, TenantVerifiedAttributeExtensionUpdatedV2, TenantKindUpdatedV2, MaintenanceTenantPromotedToCertifierV2, MaintenanceTenantUpdatedV2, TenantDelegatedProducerFeatureAddedV2, TenantDelegatedProducerFeatureRemovedV2, TenantDelegatedConsumerFeatureAddedV2, TenantDelegatedConsumerFeatureRemovedV2, TenantCertifiedDiscreteAttributeAssignedV2, TenantCertifiedDiscreteAttributeRevokedV2, TenantCertifiedDiscreteAttributeUpdatedV2, TenantRemoteIdAssignedV2, MaintenanceTenantRemoteIdDeletedV2 } from "../gen/v2/tenant/events.js";
3
3
  export declare function tenantEventToBinaryDataV2(event: TenantEventV2): Uint8Array;
4
4
  export declare const TenantEventV2: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5
5
  event_version: z.ZodLiteral<2>;
@@ -379,6 +379,111 @@ export declare const TenantEventV2: z.ZodDiscriminatedUnion<"type", [z.ZodObject
379
379
  stream_id: string;
380
380
  timestamp: Date;
381
381
  data?: any;
382
+ }>, z.ZodObject<{
383
+ event_version: z.ZodLiteral<2>;
384
+ type: z.ZodLiteral<"TenantCertifiedDiscreteAttributeAssigned">;
385
+ data: z.ZodEffects<z.ZodAny, TenantCertifiedDiscreteAttributeAssignedV2, any>;
386
+ stream_id: z.ZodString;
387
+ version: z.ZodNumber;
388
+ timestamp: z.ZodDate;
389
+ }, "strip", z.ZodTypeAny, {
390
+ event_version: 2;
391
+ type: "TenantCertifiedDiscreteAttributeAssigned";
392
+ version: number;
393
+ data: TenantCertifiedDiscreteAttributeAssignedV2;
394
+ stream_id: string;
395
+ timestamp: Date;
396
+ }, {
397
+ event_version: 2;
398
+ type: "TenantCertifiedDiscreteAttributeAssigned";
399
+ version: number;
400
+ stream_id: string;
401
+ timestamp: Date;
402
+ data?: any;
403
+ }>, z.ZodObject<{
404
+ event_version: z.ZodLiteral<2>;
405
+ type: z.ZodLiteral<"TenantCertifiedDiscreteAttributeRevoked">;
406
+ data: z.ZodEffects<z.ZodAny, TenantCertifiedDiscreteAttributeRevokedV2, any>;
407
+ stream_id: z.ZodString;
408
+ version: z.ZodNumber;
409
+ timestamp: z.ZodDate;
410
+ }, "strip", z.ZodTypeAny, {
411
+ event_version: 2;
412
+ type: "TenantCertifiedDiscreteAttributeRevoked";
413
+ version: number;
414
+ data: TenantCertifiedDiscreteAttributeRevokedV2;
415
+ stream_id: string;
416
+ timestamp: Date;
417
+ }, {
418
+ event_version: 2;
419
+ type: "TenantCertifiedDiscreteAttributeRevoked";
420
+ version: number;
421
+ stream_id: string;
422
+ timestamp: Date;
423
+ data?: any;
424
+ }>, z.ZodObject<{
425
+ event_version: z.ZodLiteral<2>;
426
+ type: z.ZodLiteral<"TenantCertifiedDiscreteAttributeUpdated">;
427
+ data: z.ZodEffects<z.ZodAny, TenantCertifiedDiscreteAttributeUpdatedV2, any>;
428
+ stream_id: z.ZodString;
429
+ version: z.ZodNumber;
430
+ timestamp: z.ZodDate;
431
+ }, "strip", z.ZodTypeAny, {
432
+ event_version: 2;
433
+ type: "TenantCertifiedDiscreteAttributeUpdated";
434
+ version: number;
435
+ data: TenantCertifiedDiscreteAttributeUpdatedV2;
436
+ stream_id: string;
437
+ timestamp: Date;
438
+ }, {
439
+ event_version: 2;
440
+ type: "TenantCertifiedDiscreteAttributeUpdated";
441
+ version: number;
442
+ stream_id: string;
443
+ timestamp: Date;
444
+ data?: any;
445
+ }>, z.ZodObject<{
446
+ event_version: z.ZodLiteral<2>;
447
+ type: z.ZodLiteral<"TenantRemoteIdAssigned">;
448
+ data: z.ZodEffects<z.ZodAny, TenantRemoteIdAssignedV2, any>;
449
+ stream_id: z.ZodString;
450
+ version: z.ZodNumber;
451
+ timestamp: z.ZodDate;
452
+ }, "strip", z.ZodTypeAny, {
453
+ event_version: 2;
454
+ type: "TenantRemoteIdAssigned";
455
+ version: number;
456
+ data: TenantRemoteIdAssignedV2;
457
+ stream_id: string;
458
+ timestamp: Date;
459
+ }, {
460
+ event_version: 2;
461
+ type: "TenantRemoteIdAssigned";
462
+ version: number;
463
+ stream_id: string;
464
+ timestamp: Date;
465
+ data?: any;
466
+ }>, z.ZodObject<{
467
+ event_version: z.ZodLiteral<2>;
468
+ type: z.ZodLiteral<"MaintenanceTenantRemoteIdDeleted">;
469
+ data: z.ZodEffects<z.ZodAny, MaintenanceTenantRemoteIdDeletedV2, any>;
470
+ stream_id: z.ZodString;
471
+ version: z.ZodNumber;
472
+ timestamp: z.ZodDate;
473
+ }, "strip", z.ZodTypeAny, {
474
+ event_version: 2;
475
+ type: "MaintenanceTenantRemoteIdDeleted";
476
+ version: number;
477
+ data: MaintenanceTenantRemoteIdDeletedV2;
478
+ stream_id: string;
479
+ timestamp: Date;
480
+ }, {
481
+ event_version: 2;
482
+ type: "MaintenanceTenantRemoteIdDeleted";
483
+ version: number;
484
+ stream_id: string;
485
+ timestamp: Date;
486
+ data?: any;
382
487
  }>]>;
383
488
  export type TenantEventV2 = z.infer<typeof TenantEventV2>;
384
489
  //# sourceMappingURL=eventsV2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventsV2.d.ts","sourceRoot":"","sources":["../../src/tenant/eventsV2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,kCAAkC,EAClC,iCAAiC,EACjC,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EACjC,gCAAgC,EAChC,0CAA0C,EAC1C,0BAA0B,EAC1B,yCAAyC,EACzC,mBAAmB,EACnB,sCAAsC,EACtC,0BAA0B,EAC1B,qCAAqC,EACrC,uCAAuC,EACvC,qCAAqC,EACrC,uCAAuC,EACxC,MAAM,4BAA4B,CAAC;AAGpC,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAyD1E;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiJxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"eventsV2.d.ts","sourceRoot":"","sources":["../../src/tenant/eventsV2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,kCAAkC,EAClC,iCAAiC,EACjC,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EACjC,gCAAgC,EAChC,0CAA0C,EAC1C,0BAA0B,EAC1B,yCAAyC,EACzC,mBAAmB,EACnB,sCAAsC,EACtC,0BAA0B,EAC1B,qCAAqC,EACrC,uCAAuC,EACvC,qCAAqC,EACrC,uCAAuC,EACvC,0CAA0C,EAC1C,yCAAyC,EACzC,yCAAyC,EACzC,wBAAwB,EACxB,kCAAkC,EACnC,MAAM,4BAA4B,CAAC;AAGpC,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAwE1E;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyLxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { match } from "ts-pattern";
2
2
  import { z } from "zod";
3
- import { TenantOnboardedV2, TenantOnboardDetailsUpdatedV2, TenantCertifiedAttributeAssignedV2, TenantCertifiedAttributeRevokedV2, TenantDeclaredAttributeAssignedV2, TenantDeclaredAttributeRevokedV2, TenantVerifiedAttributeAssignedV2, TenantVerifiedAttributeRevokedV2, TenantVerifiedAttributeExpirationUpdatedV2, MaintenanceTenantDeletedV2, TenantVerifiedAttributeExtensionUpdatedV2, TenantKindUpdatedV2, MaintenanceTenantPromotedToCertifierV2, MaintenanceTenantUpdatedV2, TenantDelegatedProducerFeatureAddedV2, TenantDelegatedProducerFeatureRemovedV2, TenantDelegatedConsumerFeatureAddedV2, TenantDelegatedConsumerFeatureRemovedV2, } from "../gen/v2/tenant/events.js";
3
+ import { TenantOnboardedV2, TenantOnboardDetailsUpdatedV2, TenantCertifiedAttributeAssignedV2, TenantCertifiedAttributeRevokedV2, TenantDeclaredAttributeAssignedV2, TenantDeclaredAttributeRevokedV2, TenantVerifiedAttributeAssignedV2, TenantVerifiedAttributeRevokedV2, TenantVerifiedAttributeExpirationUpdatedV2, MaintenanceTenantDeletedV2, TenantVerifiedAttributeExtensionUpdatedV2, TenantKindUpdatedV2, MaintenanceTenantPromotedToCertifierV2, MaintenanceTenantUpdatedV2, TenantDelegatedProducerFeatureAddedV2, TenantDelegatedProducerFeatureRemovedV2, TenantDelegatedConsumerFeatureAddedV2, TenantDelegatedConsumerFeatureRemovedV2, TenantCertifiedDiscreteAttributeAssignedV2, TenantCertifiedDiscreteAttributeRevokedV2, TenantCertifiedDiscreteAttributeUpdatedV2, TenantRemoteIdAssignedV2, MaintenanceTenantRemoteIdDeletedV2, } from "../gen/v2/tenant/events.js";
4
4
  import { protobufDecoder } from "../utils.js";
5
5
  export function tenantEventToBinaryDataV2(event) {
6
6
  return match(event)
@@ -22,6 +22,11 @@ export function tenantEventToBinaryDataV2(event) {
22
22
  .with({ type: "TenantDelegatedProducerFeatureRemoved" }, ({ data }) => TenantDelegatedProducerFeatureRemovedV2.toBinary(data))
23
23
  .with({ type: "TenantDelegatedConsumerFeatureAdded" }, ({ data }) => TenantDelegatedConsumerFeatureAddedV2.toBinary(data))
24
24
  .with({ type: "TenantDelegatedConsumerFeatureRemoved" }, ({ data }) => TenantDelegatedConsumerFeatureRemovedV2.toBinary(data))
25
+ .with({ type: "TenantCertifiedDiscreteAttributeAssigned" }, ({ data }) => TenantCertifiedDiscreteAttributeAssignedV2.toBinary(data))
26
+ .with({ type: "TenantCertifiedDiscreteAttributeRevoked" }, ({ data }) => TenantCertifiedDiscreteAttributeRevokedV2.toBinary(data))
27
+ .with({ type: "TenantCertifiedDiscreteAttributeUpdated" }, ({ data }) => TenantCertifiedDiscreteAttributeUpdatedV2.toBinary(data))
28
+ .with({ type: "TenantRemoteIdAssigned" }, ({ data }) => TenantRemoteIdAssignedV2.toBinary(data))
29
+ .with({ type: "MaintenanceTenantRemoteIdDeleted" }, ({ data }) => MaintenanceTenantRemoteIdDeletedV2.toBinary(data))
25
30
  .exhaustive();
26
31
  }
27
32
  export const TenantEventV2 = z.discriminatedUnion("type", [
@@ -169,4 +174,44 @@ export const TenantEventV2 = z.discriminatedUnion("type", [
169
174
  version: z.number(),
170
175
  timestamp: z.coerce.date(),
171
176
  }),
177
+ z.object({
178
+ event_version: z.literal(2),
179
+ type: z.literal("TenantCertifiedDiscreteAttributeAssigned"),
180
+ data: protobufDecoder(TenantCertifiedDiscreteAttributeAssignedV2),
181
+ stream_id: z.string(),
182
+ version: z.number(),
183
+ timestamp: z.coerce.date(),
184
+ }),
185
+ z.object({
186
+ event_version: z.literal(2),
187
+ type: z.literal("TenantCertifiedDiscreteAttributeRevoked"),
188
+ data: protobufDecoder(TenantCertifiedDiscreteAttributeRevokedV2),
189
+ stream_id: z.string(),
190
+ version: z.number(),
191
+ timestamp: z.coerce.date(),
192
+ }),
193
+ z.object({
194
+ event_version: z.literal(2),
195
+ type: z.literal("TenantCertifiedDiscreteAttributeUpdated"),
196
+ data: protobufDecoder(TenantCertifiedDiscreteAttributeUpdatedV2),
197
+ stream_id: z.string(),
198
+ version: z.number(),
199
+ timestamp: z.coerce.date(),
200
+ }),
201
+ z.object({
202
+ event_version: z.literal(2),
203
+ type: z.literal("TenantRemoteIdAssigned"),
204
+ data: protobufDecoder(TenantRemoteIdAssignedV2),
205
+ stream_id: z.string(),
206
+ version: z.number(),
207
+ timestamp: z.coerce.date(),
208
+ }),
209
+ z.object({
210
+ event_version: z.literal(2),
211
+ type: z.literal("MaintenanceTenantRemoteIdDeleted"),
212
+ data: protobufDecoder(MaintenanceTenantRemoteIdDeletedV2),
213
+ stream_id: z.string(),
214
+ version: z.number(),
215
+ timestamp: z.coerce.date(),
216
+ }),
172
217
  ]);
@@ -162,6 +162,41 @@ export declare const TenantEvent: z.ZodEffects<z.ZodDiscriminatedUnion<"event_ve
162
162
  data: import("../index.js").TenantDelegatedConsumerFeatureRemovedV2;
163
163
  stream_id: string;
164
164
  timestamp: Date;
165
+ } | {
166
+ event_version: 2;
167
+ type: "TenantCertifiedDiscreteAttributeAssigned";
168
+ version: number;
169
+ data: import("../index.js").TenantCertifiedDiscreteAttributeAssignedV2;
170
+ stream_id: string;
171
+ timestamp: Date;
172
+ } | {
173
+ event_version: 2;
174
+ type: "TenantCertifiedDiscreteAttributeRevoked";
175
+ version: number;
176
+ data: import("../index.js").TenantCertifiedDiscreteAttributeRevokedV2;
177
+ stream_id: string;
178
+ timestamp: Date;
179
+ } | {
180
+ event_version: 2;
181
+ type: "TenantCertifiedDiscreteAttributeUpdated";
182
+ version: number;
183
+ data: import("../index.js").TenantCertifiedDiscreteAttributeUpdatedV2;
184
+ stream_id: string;
185
+ timestamp: Date;
186
+ } | {
187
+ event_version: 2;
188
+ type: "TenantRemoteIdAssigned";
189
+ version: number;
190
+ data: import("../index.js").TenantRemoteIdAssignedV2;
191
+ stream_id: string;
192
+ timestamp: Date;
193
+ } | {
194
+ event_version: 2;
195
+ type: "MaintenanceTenantRemoteIdDeleted";
196
+ version: number;
197
+ data: import("../index.js").MaintenanceTenantRemoteIdDeletedV2;
198
+ stream_id: string;
199
+ timestamp: Date;
165
200
  }, z.objectInputType<{
166
201
  event_version: z.ZodLiteral<1>;
167
202
  }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenant/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAA6B,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,aAAa,EAA6B,MAAM,eAAe,CAAC;AASzE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CASpE;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,CAE3E;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAWtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenant/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAA6B,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,aAAa,EAA6B,MAAM,eAAe,CAAC;AASzE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CASpE;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,CAE3E;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAWtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/interop-outbound-models",
3
- "version": "1.8.20-manual-archiving.0",
3
+ "version": "1.8.21",
4
4
  "description": "PagoPA Interoperability outbound models",
5
5
  "main": "dist",
6
6
  "type": "module",
@@ -45,4 +45,4 @@
45
45
  "protocVersion": "26.1"
46
46
  },
47
47
  "packageManager": "pnpm@9.12.3"
48
- }
48
+ }
@@ -23,7 +23,17 @@ message AgreementV2 {
23
23
  optional AgreementStampsV2 stamps = 18;
24
24
  optional string rejectionReason = 19;
25
25
  optional int64 suspendedAt = 20;
26
- optional string signedContract = 21;
26
+ optional AgreementSignedContractV2 signedContract = 21;
27
+ repeated CertifiedAttributeV2 certifiedDiscreteAttributes = 22;
28
+ }
29
+
30
+ message AgreementSignedContractV2 {
31
+ string id = 1;
32
+ string name = 2;
33
+ string prettyName = 3;
34
+ string contentType = 4;
35
+ int64 createdAt = 5;
36
+ optional int64 signedAt = 6;
27
37
  }
28
38
 
29
39
  message VerifiedAttributeV2 {
@@ -21,10 +21,26 @@ message EServiceV2 {
21
21
  optional string archivingReason = 17;
22
22
  }
23
23
 
24
+ enum AttributeCertifiedDiscreteComparatorV2 {
25
+ UNSPECIFIED = 0;
26
+ GT = 1;
27
+ LT = 2;
28
+ EQ = 3;
29
+ GTE = 4;
30
+ LTE = 5;
31
+ NE = 6;
32
+ }
33
+
34
+ message EServiceAttributeCertifiedDiscreteConfigV2 {
35
+ int32 threshold = 1;
36
+ AttributeCertifiedDiscreteComparatorV2 comparator = 2;
37
+ }
38
+
24
39
  message EServiceAttributeValueV2 {
25
40
  string id = 1;
26
41
  bool explicitAttributeVerification = 2;
27
42
  optional int32 dailyCallsPerConsumer = 3;
43
+ optional EServiceAttributeCertifiedDiscreteConfigV2 discreteConfig = 4;
28
44
  }
29
45
 
30
46
  message EServiceAttributeV2 {
@@ -14,6 +14,7 @@ enum EServiceTemplateVersionStateV2 {
14
14
  message EServiceTemplateAttributeValueV2 {
15
15
  string id = 1;
16
16
  bool explicitAttributeVerification = 2;
17
+ optional eservice.v2.EServiceAttributeCertifiedDiscreteConfigV2 discreteConfig = 3;
17
18
  }
18
19
 
19
20
  message EServiceTemplateAttributeV2 {
@@ -85,3 +85,26 @@ message TenantDelegatedConsumerFeatureAddedV2 {
85
85
  message TenantDelegatedConsumerFeatureRemovedV2 {
86
86
  TenantV2 tenant = 1;
87
87
  }
88
+
89
+ message TenantCertifiedDiscreteAttributeAssignedV2 {
90
+ string attributeId = 1;
91
+ TenantV2 tenant = 2;
92
+ }
93
+
94
+ message TenantCertifiedDiscreteAttributeRevokedV2 {
95
+ string attributeId = 1;
96
+ TenantV2 tenant = 2;
97
+ }
98
+
99
+ message TenantCertifiedDiscreteAttributeUpdatedV2 {
100
+ string attributeId = 1;
101
+ TenantV2 tenant = 2;
102
+ }
103
+
104
+ message TenantRemoteIdAssignedV2 {
105
+ TenantV2 tenant = 1;
106
+ }
107
+
108
+ message MaintenanceTenantRemoteIdDeletedV2 {
109
+ TenantV2 tenant = 1;
110
+ }
@@ -15,6 +15,7 @@ message TenantV2 {
15
15
  int64 onboardedAt = 10;
16
16
  optional TenantUnitTypeV2 subUnitType = 11;
17
17
  optional string selfcareInstitutionType = 12;
18
+ repeated TenantRemoteIdV2 remoteIds = 14;
18
19
  }
19
20
 
20
21
  enum TenantKindV2 {
@@ -75,6 +76,13 @@ message TenantCertifiedAttributeV2 {
75
76
  optional int64 revocationTimestamp = 3;
76
77
  }
77
78
 
79
+ message TenantCertifiedDiscreteAttributeV2 {
80
+ string id = 1;
81
+ int64 assignmentTimestamp = 2;
82
+ optional int64 revocationTimestamp = 3;
83
+ int32 discreteValue = 4;
84
+ }
85
+
78
86
  message TenantDeclaredAttributeV2 {
79
87
  string id = 1;
80
88
  int64 assignmentTimestamp = 2;
@@ -88,10 +96,17 @@ message TenantVerifiedAttributeV2 {
88
96
  repeated TenantRevokerV2 revokedBy = 4;
89
97
  }
90
98
 
99
+ message TenantRemoteIdV2 {
100
+ string origin = 1;
101
+ string value = 2;
102
+ int64 assignmentTimestamp = 3;
103
+ }
104
+
91
105
  message TenantAttributeV2 {
92
106
  oneof sealed_value {
93
107
  TenantCertifiedAttributeV2 certifiedAttribute = 1;
94
108
  TenantDeclaredAttributeV2 declaredAttribute = 2;
95
109
  TenantVerifiedAttributeV2 verifiedAttribute = 3;
110
+ TenantCertifiedDiscreteAttributeV2 certifiedDiscreteAttribute = 4;
96
111
  }
97
112
  }