@sudoplatform/sudo-common 8.0.0 → 8.0.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.
Files changed (39) hide show
  1. package/package.json +17 -8
  2. package/{cjs → types}/configurationManager/defaultConfigurationManager.d.ts +0 -0
  3. package/{cjs → types}/errors/error.d.ts +0 -0
  4. package/{cjs → types}/index.d.ts +0 -0
  5. package/{cjs → types}/logging/bunyanLogger.d.ts +0 -0
  6. package/{cjs → types}/logging/logger.d.ts +0 -0
  7. package/{cjs → types}/sudoKeyArchive/index.d.ts +0 -0
  8. package/{cjs → types}/sudoKeyArchive/keyArchive.d.ts +0 -0
  9. package/{cjs → types}/sudoKeyArchive/keyInfo.d.ts +0 -0
  10. package/{cjs → types}/sudoKeyArchive/keyType.d.ts +0 -0
  11. package/{cjs → types}/sudoKeyArchive/sudoKeyArchive.d.ts +0 -0
  12. package/{cjs → types}/sudoKeyManager/index.d.ts +0 -0
  13. package/{cjs → types}/sudoKeyManager/keyData.d.ts +0 -0
  14. package/{cjs → types}/sudoKeyManager/publicKey.d.ts +0 -0
  15. package/{cjs → types}/sudoKeyManager/sudoCryptoProvider.d.ts +0 -0
  16. package/{cjs → types}/sudoKeyManager/sudoKeyManager.d.ts +0 -0
  17. package/{cjs → types}/types/types.d.ts +0 -0
  18. package/{cjs → types}/utils/base64.d.ts +0 -0
  19. package/{cjs → types}/utils/buffer.d.ts +0 -0
  20. package/{cjs → types}/utils/stream.d.ts +0 -0
  21. package/lib/configurationManager/defaultConfigurationManager.d.ts +0 -123
  22. package/lib/errors/error.d.ts +0 -263
  23. package/lib/index.d.ts +0 -9
  24. package/lib/logging/bunyanLogger.d.ts +0 -8
  25. package/lib/logging/logger.d.ts +0 -87
  26. package/lib/sudoKeyArchive/index.d.ts +0 -4
  27. package/lib/sudoKeyArchive/keyArchive.d.ts +0 -137
  28. package/lib/sudoKeyArchive/keyInfo.d.ts +0 -41
  29. package/lib/sudoKeyArchive/keyType.d.ts +0 -13
  30. package/lib/sudoKeyArchive/sudoKeyArchive.d.ts +0 -190
  31. package/lib/sudoKeyManager/index.d.ts +0 -4
  32. package/lib/sudoKeyManager/keyData.d.ts +0 -56
  33. package/lib/sudoKeyManager/publicKey.d.ts +0 -8
  34. package/lib/sudoKeyManager/sudoCryptoProvider.d.ts +0 -324
  35. package/lib/sudoKeyManager/sudoKeyManager.d.ts +0 -344
  36. package/lib/types/types.d.ts +0 -115
  37. package/lib/utils/base64.d.ts +0 -44
  38. package/lib/utils/buffer.d.ts +0 -13
  39. package/lib/utils/stream.d.ts +0 -6
@@ -1,115 +0,0 @@
1
- /**
2
- * Generic type for paginated results from list queries
3
- */
4
- export interface ListOutput<T> {
5
- items: T[];
6
- nextToken?: string;
7
- }
8
- /**
9
- * Cache policy that determines how data is accessed when performing a query method
10
- * from the Email Service.
11
- */
12
- export declare enum CachePolicy {
13
- CacheOnly = "cache-only",
14
- RemoteOnly = "network-only"
15
- }
16
- export interface Owner {
17
- id: string;
18
- issuer: string;
19
- }
20
- /**
21
- * A filter to use on string fields when listing items in a repository
22
- */
23
- export interface StringFilter {
24
- ne?: string;
25
- eq?: string;
26
- beginsWith?: string;
27
- }
28
- /**
29
- * A filter to use on string fields when listing items in a repository
30
- */
31
- export interface BooleanFilter {
32
- eq?: boolean;
33
- ne?: boolean;
34
- }
35
- /**
36
- * Encryption algorithm names that are
37
- * supported by the Sudo Platform and can be used
38
- * between devices.
39
- */
40
- export declare enum EncryptionAlgorithm {
41
- AesCbcPkcs7Padding = "AES/CBC/PKCS7Padding",
42
- AesGcmNoPadding = "AES/GCM/NoPadding",
43
- RsaOaepSha1 = "RSA/OAEPWithSHA-1"
44
- }
45
- export declare type Subset<T, S> = Pick<S, Extract<keyof T, keyof S>> & Partial<Record<Exclude<keyof T, keyof S>, never>>;
46
- /**
47
- * Status of the list operation result.
48
- */
49
- export declare enum ListOperationResultStatus {
50
- /**
51
- * The operation completed successfully.
52
- */
53
- Success = "Success",
54
- /**
55
- * The operation completed but some items had errors during
56
- * processing.
57
- */
58
- Partial = "Partial",
59
- /**
60
- * The operation failed and no list item could be returned.
61
- */
62
- Failure = "Failure"
63
- }
64
- export interface ListOperationSuccessResult<T> {
65
- /**
66
- * Operation status.
67
- */
68
- status: ListOperationResultStatus.Success;
69
- /**
70
- * List of items that were successfully processed.
71
- */
72
- items: T[];
73
- /**
74
- * Pagination token.
75
- */
76
- nextToken?: string;
77
- }
78
- export interface ListOperationFailureResult {
79
- /**
80
- * Operation status.
81
- */
82
- status: ListOperationResultStatus.Failure;
83
- /**
84
- * The error that caused the failure.
85
- */
86
- cause: Error;
87
- }
88
- export interface ListOperationPartialResult<T, S extends Subset<S, T>> {
89
- /**
90
- * Operation status.
91
- */
92
- status: ListOperationResultStatus.Partial;
93
- /**
94
- * List of items that were successfully processed.
95
- */
96
- items: T[];
97
- /**
98
- * List of items that failed to be processed and the error
99
- * that caused the failure.
100
- */
101
- failed: {
102
- item: Omit<T, keyof S>;
103
- cause: Error;
104
- }[];
105
- /**
106
- * Pagination token.
107
- */
108
- nextToken?: string;
109
- }
110
- /**
111
- * Result of a list operation. T is the expected item type and
112
- * S is a subset of T's properties that won't be present if the
113
- * additional processing after the item has been fetched fails.
114
- */
115
- export declare type ListOperationResult<T, S extends Subset<S, T> = T> = ListOperationSuccessResult<T> | ListOperationFailureResult | ListOperationPartialResult<T, S>;
@@ -1,44 +0,0 @@
1
- /**
2
- * Utility class for Base64 encoding and decoding.
3
- */
4
- export declare class Base64 {
5
- private static URLSafeEncodeTransform;
6
- private static URLSafeDecodeTransform;
7
- static decode(encoded: string): ArrayBuffer;
8
- static encode(buffer: ArrayBuffer): string;
9
- static decodeString(encoded: string): string;
10
- static encodeString(string: string): string;
11
- /**
12
- * Encode a URL safe ArrayBuffer
13
- * @param {ArrayBuffer} input buffer to be encoded
14
- * @returns {string} encoded string
15
- */
16
- static urlSafeEncode({ input }: {
17
- input: ArrayBuffer;
18
- }): string;
19
- /**
20
- * Decode into a URL safe ArrayBuffer
21
- * @param {string} input string to be decoded
22
- * @returns {ArrayBuffer} decoded ArrayBuffer
23
- */
24
- static urlSafeDecode({ encoded }: {
25
- encoded: string;
26
- }): ArrayBuffer;
27
- /**
28
- * Encode a URL safe string
29
- * @param {string} input string to be encoded
30
- * @returns {string} encoded string
31
- */
32
- static urlSafeEncodeString({ input }: {
33
- input: string;
34
- }): string;
35
- /**
36
- * Decode a URL safe string
37
- * @param {string} input string to be decoded
38
- * @returns {string} decoded string
39
- */
40
- static urlSafeDecodeString({ encoded }: {
41
- encoded: string;
42
- }): string;
43
- static UrlSafeValidate(encoded: string): boolean;
44
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Utility class for operating on ArrayBuffer.
3
- */
4
- export declare class Buffer {
5
- static concat(lhs: ArrayBuffer, rhs: ArrayBuffer): ArrayBuffer;
6
- static split(buffer: ArrayBuffer, lhsLength: number): {
7
- lhs: ArrayBuffer;
8
- rhs: ArrayBuffer;
9
- };
10
- static toString(buffer: ArrayBuffer): string;
11
- static fromString(s: string): Uint8Array;
12
- static isArrayBuffer(u: unknown): u is ArrayBuffer;
13
- }
@@ -1,6 +0,0 @@
1
- /// <reference types="node" />
2
- import { Readable } from 'stream';
3
- export declare function isBodyReadableStream(body: ReadableStream | Readable | Blob): body is ReadableStream;
4
- export declare function isBodyBlob(body: ReadableStream | Readable | Blob): body is Blob;
5
- export declare function isBodyReadable(body: ReadableStream | Readable | Blob): body is Readable;
6
- export declare const bodyToString: (body: ReadableStream | Readable | Blob) => Promise<string>;