@reservation-studio/electron-types 0.0.8 → 0.0.9

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.
@@ -9,19 +9,19 @@ export interface ApiInterface {
9
9
  */
10
10
  certificates: {
11
11
  list(): Promise<CertificateInfo[]>;
12
- isValidPin(certificateId: string, pin: string): Promise<boolean>;
12
+ isValidPin(slot: number, pin: string): Promise<boolean>;
13
13
  };
14
14
  /**
15
- * Provides functionality to handle XML signing operations.
15
+ * An object containing functionality related to XML operations.
16
16
  *
17
- * @property {Function} sign - Signs an XML string with a specified digital certificate.
18
- * @param {string} xml - The XML content to be signed.
19
- * @param {string} certificateId - The identifier of the certificate to use for signing.
20
- * @param {string} [pin] - Optional PIN code associated with the digital certificate.
21
- * @returns {Promise<string>} A promise that resolves with the signed XML content as a string.
17
+ * @property {function} sign - A function to sign an XML string using a specified slot and PIN.
18
+ * @param {string} xml - The XML string to be signed.
19
+ * @param {number} slot - The slot number to be used for signing.
20
+ * @param {string} pin - The PIN associated with the slot for authentication.
21
+ * @returns {Promise<string>} A promise that resolves to the signed XML string.
22
22
  */
23
23
  xml: {
24
- sign(xml: string, certificateId: string, pin?: string): Promise<string>;
24
+ sign(xml: string, slot: number, pin: string): Promise<string>;
25
25
  };
26
26
  /**
27
27
  * An HTTP utility object that provides methods to make HTTP requests.
@@ -1,8 +1,4 @@
1
1
  export interface CertificateInfo {
2
- id: string;
3
- commonName?: string;
4
- organization?: string;
5
- country?: string;
6
- email?: string;
2
+ slot: number;
7
3
  name: string;
8
4
  }
@@ -1,14 +1,11 @@
1
1
  export interface HttpResponse {
2
2
  status: number;
3
- statusText: string;
4
3
  headers: Record<string, string>;
5
4
  data: any;
6
- ok: boolean;
5
+ error: boolean;
7
6
  }
8
7
  export interface HttpOptions {
9
8
  headers?: Record<string, string>;
10
9
  timeout?: number;
11
- responseType?: 'json' | 'text' | 'arraybuffer' | 'blob';
12
- withCredentials?: boolean;
13
10
  params?: Record<string, string>;
14
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reservation-studio/electron-types",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "TypeScript типове за ReservationStudioElectron",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -17,7 +17,7 @@
17
17
  "license": "Proprietary - Reservation.Studio",
18
18
  "devDependencies": {
19
19
  "typescript": "^4.5.4",
20
- "@types/node": "^20"
20
+ "@types/node": "^22"
21
21
  },
22
22
  "files": [
23
23
  "dist"