@bdking71/spsignature 1.0.5 → 1.2.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.
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from "./ProvisioningService";
2
- export * from "./VerificationService";
2
+ export * from "./OtpService";
3
3
  export * from "./TransactionSigner";
package/lib/index.js CHANGED
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ProvisioningService"), exports);
18
- __exportStar(require("./VerificationService"), exports);
18
+ __exportStar(require("./OtpService"), exports);
19
19
  __exportStar(require("./TransactionSigner"), exports);
package/package.json CHANGED
@@ -1,28 +1,54 @@
1
1
  {
2
2
  "name": "@bdking71/spsignature",
3
- "version": "1.0.5",
4
- "description": "SharePoint Framework WebPart isolated digital signing and provisioning engine.",
3
+ "version": "1.2.0",
4
+ "description": "SharePoint Framework isolated digital signing, LZW compression, and OTP audit engine.",
5
5
  "main": "lib/index.js",
6
+ "module": "lib/index.js",
6
7
  "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ }
13
+ },
7
14
  "files": [
8
15
  "lib"
9
16
  ],
10
17
  "scripts": {
11
18
  "clean": "rimraf lib",
12
- "build": "tsc --build",
13
- "prepare": "npm run build"
19
+ "build": "npm run clean && tsc",
20
+ "prepare": "npm run build",
21
+ "prepublishOnly": "npm run build"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
14
25
  },
15
26
  "keywords": [
16
27
  "spfx",
17
28
  "sharepoint",
29
+ "sharepoint-online",
18
30
  "pnp",
19
31
  "digital-signature",
20
- "audit"
32
+ "2fa",
33
+ "otp",
34
+ "audit",
35
+ "m365"
21
36
  ],
22
- "author": "Your Organization Name",
37
+ "author": {
38
+ "name": "Bryan King",
39
+ "url": "https://bdking71.wordpress.com"
40
+ },
23
41
  "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/bdking71/spsignature.git"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/bdking71/spsignature/issues"
48
+ },
49
+ "homepage": "https://github.com/bdking71/spsignature#readme",
24
50
  "peerDependencies": {
25
- "@microsoft/sp-webpart-base": ">=1.18.0",
51
+ "@microsoft/sp-webpart-base": ">=1.15.0",
26
52
  "@pnp/sp": ">=3.0.0"
27
53
  },
28
54
  "devDependencies": {
@@ -30,13 +56,5 @@
30
56
  "@pnp/sp": "^3.0.0",
31
57
  "rimraf": "^5.0.0",
32
58
  "typescript": "~5.3.3"
33
- },
34
- "repository": {
35
- "type": "git",
36
- "url": "git+https://github.com/bdking71/spsignature"
37
- },
38
- "bugs": {
39
- "url": "https://github.com/bdking71/spsignature/issues"
40
- },
41
- "homepage": "https://github.com/bdking71/spsignature#readme"
59
+ }
42
60
  }
@@ -1,16 +0,0 @@
1
- import "@pnp/sp/webs";
2
- import "@pnp/sp/lists";
3
- import "@pnp/sp/items";
4
- import { WebPartContext } from "@microsoft/sp-webpart-base";
5
- export type DeliveryChannel = "email" | "teams" | "both";
6
- export interface IVerificationRequest {
7
- title: string;
8
- passcode: string;
9
- channel: DeliveryChannel;
10
- }
11
- export interface IVerificationResult {
12
- success: boolean;
13
- itemId?: number;
14
- error?: string;
15
- }
16
- export declare function createPendingVerification(context: WebPartContext, request: IVerificationRequest): Promise<IVerificationResult>;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createPendingVerification = void 0;
4
- const sp_1 = require("@pnp/sp");
5
- require("@pnp/sp/webs");
6
- require("@pnp/sp/lists");
7
- require("@pnp/sp/items");
8
- async function createPendingVerification(context, request) {
9
- var _a, _b, _c, _d, _e;
10
- try {
11
- if (!context) {
12
- throw new Error("Execution restricted: Valid WebPartContext is required.");
13
- }
14
- const sp = (0, sp_1.spfi)().using((0, sp_1.SPFx)(context));
15
- const LIST_NAME = "PendingVerifications";
16
- const addedItem = await sp.web.lists.getByTitle(LIST_NAME).items.add({
17
- Title: request.title,
18
- Passcode: request.passcode,
19
- Channel: request.channel,
20
- });
21
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
- const itemId = (_e = (_d = (_b = (_a = addedItem === null || addedItem === void 0 ? void 0 : addedItem.data) === null || _a === void 0 ? void 0 : _a.Id) !== null && _b !== void 0 ? _b : (_c = addedItem === null || addedItem === void 0 ? void 0 : addedItem.data) === null || _c === void 0 ? void 0 : _c.ID) !== null && _d !== void 0 ? _d : addedItem === null || addedItem === void 0 ? void 0 : addedItem.Id) !== null && _e !== void 0 ? _e : 0;
23
- return {
24
- success: true,
25
- itemId,
26
- };
27
- }
28
- catch (error) {
29
- const errorMsg = error instanceof Error ? error.message : String(error);
30
- return {
31
- success: false,
32
- error: errorMsg,
33
- };
34
- }
35
- }
36
- exports.createPendingVerification = createPendingVerification;