@azure/attestation 1.0.1-alpha.20250123.1 → 1.0.1-alpha.20250128.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.
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
1
+ {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
@@ -1,5 +1,3 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
1
  import * as Mappers from "../generated/models/mappers.js";
4
2
  import { TypeDeserializer } from "../utils/typeDeserializer.js";
5
3
  import { _attestationSignerFromGenerated } from "./attestationSigner.js";
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAwBzE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,gBAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,+BAA+B,CAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
1
+ {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAwBzE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,gBAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,+BAA+B,CAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
1
+ {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
@@ -1,10 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- /*
4
- * Copyright (c) Microsoft Corporation.
5
- * Licensed under the MIT License.
6
- *
7
- */
8
3
  import { stringToBytes } from "../utils/utf8.js";
9
4
  import { TypeDeserializer } from "../utils/typeDeserializer.js";
10
5
  import * as Mappers from "../generated/models/mappers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,gBAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,gBAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
1
+ {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,gBAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,gBAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
1
+ {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  exports._policyResultFromGenerated = _policyResultFromGenerated;
6
4
  const tslib_1 = require("tslib");
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6ClC,gEAcC;;AAlDD,gFAA0D;AAI1D,sEAAgE;AAEhE,iEAAyE;AAwBzE;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,sCAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,IAAA,sDAA+B,EAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
1
+ {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":";;AAuCA,gEAcC;;AAlDD,gFAA0D;AAI1D,sEAAgE;AAEhE,iEAAyE;AAwBzE;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,sCAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,IAAA,sDAA+B,EAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
1
+ {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
@@ -1,14 +1,9 @@
1
1
  "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  exports.StoredAttestationPolicy = void 0;
6
4
  const tslib_1 = require("tslib");
7
- /*
8
- * Copyright (c) Microsoft Corporation.
9
- * Licensed under the MIT License.
10
- *
11
- */
5
+ // Copyright (c) Microsoft Corporation.
6
+ // Licensed under the MIT License.
12
7
  const utf8_js_1 = require("../utils/utf8.js");
13
8
  const typeDeserializer_js_1 = require("../utils/typeDeserializer.js");
14
9
  const Mappers = tslib_1.__importStar(require("../generated/models/mappers.js"));
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;;;GAIG;AAEH,8CAAiD;AACjD,sEAAgE;AAEhE,gFAA0D;AAE1D;;GAEG;AACH,MAAa,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,IAAA,uBAAa,EAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,sCAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,sCAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF;AApCD,0DAoCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
1
+ {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,8CAAiD;AACjD,sEAAgE;AAEhE,gFAA0D;AAE1D;;GAEG;AACH,MAAa,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,IAAA,uBAAa,EAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,sCAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,sCAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF;AApCD,0DAoCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
1
+ {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
@@ -1,5 +1,3 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
1
  import * as Mappers from "../generated/models/mappers.js";
4
2
  import { TypeDeserializer } from "../utils/typeDeserializer.js";
5
3
  import { _attestationSignerFromGenerated } from "./attestationSigner.js";
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAwBzE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,gBAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,+BAA+B,CAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
1
+ {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAwBzE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,gBAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,+BAA+B,CAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
1
+ {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
@@ -1,10 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- /*
4
- * Copyright (c) Microsoft Corporation.
5
- * Licensed under the MIT License.
6
- *
7
- */
8
3
  import { stringToBytes } from "../utils/utf8.js";
9
4
  import { TypeDeserializer } from "../utils/typeDeserializer.js";
10
5
  import * as Mappers from "../generated/models/mappers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,gBAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,gBAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
1
+ {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,gBAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,gBAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
1
+ {"version":3,"file":"policyResult.d.ts","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAczE"}
@@ -1,5 +1,3 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
1
  import * as Mappers from "../generated/models/mappers.js";
4
2
  import { TypeDeserializer } from "../utils/typeDeserializer.js";
5
3
  import { _attestationSignerFromGenerated } from "./attestationSigner.js";
@@ -1 +1 @@
1
- {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAwBzE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,gBAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,+BAA+B,CAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
1
+ {"version":3,"file":"policyResult.js","sourceRoot":"","sources":["../../../src/models/policyResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAwBzE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,MAAM,YAAY,GAA0B,gBAAgB,CAAC,WAAW,CACtE,OAAO,EACP,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EACtE,cAAc,CACU,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,eAAe,EAAE,YAAY,CAAC,eAAe;QAC7C,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,YAAY,EAAE,YAAY,CAAC,YAAY;YACrC,CAAC,CAAC,+BAA+B,CAAC,YAAY,CAAC,YAAY,CAAC;YAC5D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { PolicyModification } from \"./index.js\";\nimport * as Mappers from \"../generated/models/mappers.js\";\n\nimport type { PolicyResult as GeneratedPolicyResult } from \"../generated/models/index.js\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\nimport type { AttestationSigner } from \"./attestationSigner.js\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner.js\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
1
+ {"version":3,"file":"storedAttestationPolicy.d.ts","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,uBAAuB;gBACtB,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAQnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB;IAQ3D;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;CAC/B"}
@@ -1,10 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- /*
4
- * Copyright (c) Microsoft Corporation.
5
- * Licensed under the MIT License.
6
- *
7
- */
8
3
  import { stringToBytes } from "../utils/utf8.js";
9
4
  import { TypeDeserializer } from "../utils/typeDeserializer.js";
10
5
  import * as Mappers from "../generated/models/mappers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,gBAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,gBAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
1
+ {"version":3,"file":"storedAttestationPolicy.js","sourceRoot":"","sources":["../../../src/models/storedAttestationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAClC,YAAY,KAAa;QACvB,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,gBAAgB,CAAC,SAAS,CAC/B,IAAI,EACJ,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,OAAO,CAAC,uBAAuB,CAChC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,KAAc;QAC/B,OAAO,gBAAgB,CAAC,WAAW,CACjC,KAAK,EACL,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE,EAC5D,yBAAyB,CACC,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { stringToBytes } from \"../utils/utf8.js\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer.js\";\n\nimport * as Mappers from \"../generated/models/mappers.js\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/attestation",
3
- "version": "1.0.1-alpha.20250123.1",
3
+ "version": "1.0.1-alpha.20250128.1",
4
4
  "description": "Javascript/Typescript client implementation for the Microsoft Azure Attestation service.",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",