@microsoft/ccf-app 4.0.3 → 4.0.5

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/endpoints.d.ts CHANGED
@@ -120,6 +120,12 @@ export interface UserCertAuthnIdentity extends UserMemberAuthnIdentityCommon {
120
120
  export interface MemberCertAuthnIdentity extends UserMemberAuthnIdentityCommon {
121
121
  policy: "member_cert";
122
122
  }
123
+ export interface MemberCOSESign1AuthnIdentity extends UserMemberAuthnIdentityCommon {
124
+ policy: "member_cose_sign1";
125
+ }
126
+ export interface UserCOSESign1AuthnIdentity extends UserMemberAuthnIdentityCommon {
127
+ policy: "user_cose_sign1";
128
+ }
123
129
  export interface JwtAuthnIdentity extends AuthnIdentityCommon {
124
130
  policy: "jwt";
125
131
  jwt: {
@@ -146,7 +152,7 @@ export interface JwtAuthnIdentity extends AuthnIdentityCommon {
146
152
  * Each identity corresponds to a matching {@linkcode AuthnIdentityCommon.policy | policy}.
147
153
  * Policies have to be declared for each endpoint in ``app.json``.
148
154
  */
149
- export type AuthnIdentity = EmptyAuthnIdentity | UserCertAuthnIdentity | MemberCertAuthnIdentity | JwtAuthnIdentity;
155
+ export type AuthnIdentity = EmptyAuthnIdentity | UserCertAuthnIdentity | MemberCertAuthnIdentity | JwtAuthnIdentity | MemberCOSESign1AuthnIdentity | UserCOSESign1AuthnIdentity;
150
156
  /** See {@linkcode Response.body}. */
151
157
  export type ResponseBodyType<T> = string | ArrayBuffer | JsonCompatible<T>;
152
158
  /**
package/kv.d.ts CHANGED
@@ -42,6 +42,7 @@ export declare class TypedKvMap<K, V> {
42
42
  constructor(kv: KvMap, kt: DataConverter<K>, vt: DataConverter<V>);
43
43
  has(key: K): boolean;
44
44
  get(key: K): V | undefined;
45
+ getVersionOfPreviousWrite(key: K): number | undefined;
45
46
  set(key: K, value: V): TypedKvMap<K, V>;
46
47
  delete(key: K): void;
47
48
  clear(): void;
package/kv.js CHANGED
@@ -49,6 +49,9 @@ export class TypedKvMap {
49
49
  const v = this.kv.get(this.kt.encode(key));
50
50
  return v === undefined ? undefined : this.vt.decode(v);
51
51
  }
52
+ getVersionOfPreviousWrite(key) {
53
+ return this.kv.getVersionOfPreviousWrite(this.kt.encode(key));
54
+ }
52
55
  set(key, value) {
53
56
  this.kv.set(this.kt.encode(key), this.vt.encode(value));
54
57
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/ccf-app",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "CCF app support package",
5
5
  "main": "index.js",
6
6
  "files": [