@learncard/types 5.14.0 → 5.15.0

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.
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ export declare const BITSTRING_STATUS_PURPOSES: readonly ["revocation", "suspension"];
3
+ export declare const DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
4
+ export declare const BitstringStatusPurposeValidator: z.ZodEnum<{
5
+ revocation: "revocation";
6
+ suspension: "suspension";
7
+ }>;
8
+ export type BitstringStatusPurpose = z.infer<typeof BitstringStatusPurposeValidator>;
9
+ export declare const BitstringStatusListEntryValidator: z.ZodObject<{
10
+ id: z.ZodOptional<z.ZodString>;
11
+ type: z.ZodLiteral<"BitstringStatusListEntry">;
12
+ statusPurpose: z.ZodEnum<{
13
+ revocation: "revocation";
14
+ suspension: "suspension";
15
+ }>;
16
+ statusListIndex: z.ZodString;
17
+ statusListCredential: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export type BitstringStatusListEntry = z.infer<typeof BitstringStatusListEntryValidator>;
20
+ export declare const AllocatedBitstringStatusListEntryValidator: z.ZodObject<{
21
+ type: z.ZodLiteral<"BitstringStatusListEntry">;
22
+ statusPurpose: z.ZodEnum<{
23
+ revocation: "revocation";
24
+ suspension: "suspension";
25
+ }>;
26
+ statusListIndex: z.ZodString;
27
+ statusListCredential: z.ZodString;
28
+ id: z.ZodString;
29
+ }, z.core.$strip>;
30
+ export type AllocatedBitstringStatusListEntry = z.infer<typeof AllocatedBitstringStatusListEntryValidator>;
31
+ export declare const BitstringStatusListCredentialSubjectValidator: z.ZodObject<{
32
+ id: z.ZodOptional<z.ZodString>;
33
+ type: z.ZodLiteral<"BitstringStatusList">;
34
+ statusPurpose: z.ZodEnum<{
35
+ revocation: "revocation";
36
+ suspension: "suspension";
37
+ }>;
38
+ encodedList: z.ZodString;
39
+ }, z.core.$strip>;
40
+ export type BitstringStatusListCredentialSubject = z.infer<typeof BitstringStatusListCredentialSubjectValidator>;
41
+ export declare const AllocateCredentialStatusInputValidator: z.ZodDefault<z.ZodObject<{
42
+ statusPurposes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
43
+ revocation: "revocation";
44
+ suspension: "suspension";
45
+ }>>>;
46
+ listSize: z.ZodOptional<z.ZodNumber>;
47
+ }, z.core.$strip>>;
48
+ export type AllocateCredentialStatusInput = z.infer<typeof AllocateCredentialStatusInputValidator>;
49
+ export type BitstringCredentialStatusPurpose = BitstringStatusPurpose;
50
+ export type BitstringCredentialStatusEntry = AllocatedBitstringStatusListEntry;
51
+ //# sourceMappingURL=bitstring-status-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitstring-status-list.d.ts","sourceRoot":"","sources":["../src/bitstring-status-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB,uCAAwC,CAAC;AAC/E,eAAO,MAAM,kCAAkC,SAAU,CAAC;AAE1D,eAAO,MAAM,+BAA+B;;;EAAoC,CAAC;AACjF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAErF,eAAO,MAAM,iCAAiC;;;;;;;;;iBAM5C,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAEzF,eAAO,MAAM,0CAA0C;;;;;;;;;iBAErD,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,0CAA0C,CACpD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;iBAKxD,CAAC;AACH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,6CAA6C,CACvD,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;;;kBAKnC,CAAC;AACjB,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEnG,MAAM,MAAM,gCAAgC,GAAG,sBAAsB,CAAC;AACtE,MAAM,MAAM,8BAA8B,GAAG,iCAAiC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -11,4 +11,5 @@ export * from './wasm';
11
11
  export * from './helpers';
12
12
  export * from './queries';
13
13
  export * from './auth';
14
+ export * from './bitstring-status-list';
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,MAAM,CAAC;AACrB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,MAAM,CAAC;AACrB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC"}
@@ -1,8 +1,23 @@
1
1
  import { z } from 'zod';
2
+ export declare const StatusCheckEntryValidator: z.ZodObject<{
3
+ entryType: z.ZodString;
4
+ statusPurpose: z.ZodString;
5
+ isSet: z.ZodBoolean;
6
+ statusListCredential: z.ZodOptional<z.ZodString>;
7
+ statusListIndex: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ export type StatusCheckEntry = z.infer<typeof StatusCheckEntryValidator>;
2
10
  export declare const VerificationCheckValidator: z.ZodObject<{
3
11
  checks: z.ZodArray<z.ZodString>;
4
12
  warnings: z.ZodArray<z.ZodString>;
5
13
  errors: z.ZodArray<z.ZodString>;
14
+ status: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ entryType: z.ZodString;
16
+ statusPurpose: z.ZodString;
17
+ isSet: z.ZodBoolean;
18
+ statusListCredential: z.ZodOptional<z.ZodString>;
19
+ statusListIndex: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>>>;
6
21
  }, z.core.$strip>;
7
22
  export type VerificationCheck = z.infer<typeof VerificationCheckValidator>;
8
23
  export declare const VerificationStatusValidator: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"learncard.d.ts","sourceRoot":"","sources":["../src/learncard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B;;;;iBAIrC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE3E,eAAO,MAAM,2BAA2B;;;;EAAyC,CAAC;AAClF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC7E,eAAO,MAAM,sBAAsB;;;;CAAmC,CAAC;AAEvE,eAAO,MAAM,yBAAyB;;;;;;;;;iBAKpC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMlC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAErE,MAAM,MAAM,gBAAgB,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI;IACxF,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,GAAG,QAAQ,CAAC;AAEb,eAAO,MAAM,yBAAyB;;;8BAEsB,CAAC"}
@@ -32,6 +32,8 @@ __export(index_exports, {
32
32
  AgeRatingValidator: () => AgeRatingValidator,
33
33
  AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator,
34
34
  AlignmentValidator: () => AlignmentValidator,
35
+ AllocateCredentialStatusInputValidator: () => AllocateCredentialStatusInputValidator,
36
+ AllocatedBitstringStatusListEntryValidator: () => AllocatedBitstringStatusListEntryValidator,
35
37
  AllowConnectionRequestsEnum: () => AllowConnectionRequestsEnum,
36
38
  AppBoostValidator: () => AppBoostValidator,
37
39
  AppEventInputValidator: () => AppEventInputValidator,
@@ -49,6 +51,10 @@ __export(index_exports, {
49
51
  AuthGrantValidator: () => AuthGrantValidator,
50
52
  AuthSessionError: () => AuthSessionError,
51
53
  AutoBoostConfigValidator: () => AutoBoostConfigValidator,
54
+ BITSTRING_STATUS_PURPOSES: () => BITSTRING_STATUS_PURPOSES,
55
+ BitstringStatusListCredentialSubjectValidator: () => BitstringStatusListCredentialSubjectValidator,
56
+ BitstringStatusListEntryValidator: () => BitstringStatusListEntryValidator,
57
+ BitstringStatusPurposeValidator: () => BitstringStatusPurposeValidator,
52
58
  BoostPermissionsQueryValidator: () => BoostPermissionsQueryValidator,
53
59
  BoostPermissionsValidator: () => BoostPermissionsValidator,
54
60
  BoostQueryValidator: () => BoostQueryValidator,
@@ -110,6 +116,7 @@ __export(index_exports, {
110
116
  CredentialStatusValidator: () => CredentialStatusValidator,
111
117
  CredentialSubjectValidator: () => CredentialSubjectValidator,
112
118
  CriteriaValidator: () => CriteriaValidator,
119
+ DEFAULT_BITSTRING_STATUS_LIST_SIZE: () => DEFAULT_BITSTRING_STATUS_LIST_SIZE,
113
120
  DeleteFrameworkInputValidator: () => DeleteFrameworkInputValidator,
114
121
  DeleteSkillInputValidator: () => DeleteSkillInputValidator,
115
122
  DidDocumentValidator: () => DidDocumentValidator,
@@ -245,6 +252,7 @@ __export(index_exports, {
245
252
  SkillTreeNodeInputValidator: () => SkillTreeNodeInputValidator,
246
253
  SkillTreeNodeValidator: () => SkillTreeNodeValidator,
247
254
  SkillValidator: () => SkillValidator,
255
+ StatusCheckEntryValidator: () => StatusCheckEntryValidator,
248
256
  StringQuery: () => StringQuery,
249
257
  SummaryCredentialDataValidator: () => SummaryCredentialDataValidator,
250
258
  SummaryCredentialKeywordValidator: () => SummaryCredentialKeywordValidator,
@@ -13790,10 +13798,18 @@ var ClrCredentialValidator = UnsignedClrCredentialValidator.extend({
13790
13798
  });
13791
13799
 
13792
13800
  // src/learncard.ts
13801
+ var StatusCheckEntryValidator = external_exports.object({
13802
+ entryType: external_exports.string(),
13803
+ statusPurpose: external_exports.string(),
13804
+ isSet: external_exports.boolean(),
13805
+ statusListCredential: external_exports.string().optional(),
13806
+ statusListIndex: external_exports.string().optional()
13807
+ });
13793
13808
  var VerificationCheckValidator = external_exports.object({
13794
13809
  checks: external_exports.string().array(),
13795
13810
  warnings: external_exports.string().array(),
13796
- errors: external_exports.string().array()
13811
+ errors: external_exports.string().array(),
13812
+ status: StatusCheckEntryValidator.array().optional()
13797
13813
  });
13798
13814
  var VerificationStatusValidator = external_exports.enum(["Success", "Failed", "Error"]);
13799
13815
  var VerificationStatusEnum = VerificationStatusValidator.enum;
@@ -15208,3 +15224,28 @@ var AuthSessionError = class extends Error {
15208
15224
  __name(this, "AuthSessionError");
15209
15225
  }
15210
15226
  };
15227
+
15228
+ // src/bitstring-status-list.ts
15229
+ var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
15230
+ var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
15231
+ var BitstringStatusPurposeValidator = external_exports.enum(BITSTRING_STATUS_PURPOSES);
15232
+ var BitstringStatusListEntryValidator = external_exports.object({
15233
+ id: external_exports.string().optional(),
15234
+ type: external_exports.literal("BitstringStatusListEntry"),
15235
+ statusPurpose: BitstringStatusPurposeValidator,
15236
+ statusListIndex: external_exports.string(),
15237
+ statusListCredential: external_exports.string()
15238
+ });
15239
+ var AllocatedBitstringStatusListEntryValidator = BitstringStatusListEntryValidator.extend({
15240
+ id: external_exports.string()
15241
+ });
15242
+ var BitstringStatusListCredentialSubjectValidator = external_exports.object({
15243
+ id: external_exports.string().optional(),
15244
+ type: external_exports.literal("BitstringStatusList"),
15245
+ statusPurpose: BitstringStatusPurposeValidator,
15246
+ encodedList: external_exports.string()
15247
+ });
15248
+ var AllocateCredentialStatusInputValidator = external_exports.object({
15249
+ statusPurposes: external_exports.array(BitstringStatusPurposeValidator).optional(),
15250
+ listSize: external_exports.number().int().positive().optional()
15251
+ }).default({});