@sparkvault/sdk-js 11.1.1 → 11.1.3
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/README.md +2 -37
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +72 -72
- package/dist/index.mjs +18 -5
- package/dist/index.mjs.map +1 -1
- package/dist/ingots/index.d.ts +1 -1
- package/dist/logger.d.ts +0 -5
- package/dist/products/identity/container.d.ts +0 -8
- package/dist/products/identity/index.d.ts +1 -3
- package/dist/products/identity/methods.d.ts +0 -6
- package/dist/products/identity/utils.d.ts +1 -27
- package/dist/products/identity/views/icons.d.ts +0 -4
- package/dist/products/index.d.ts +1 -3
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/index.d.ts +1 -1
- package/dist/vaults/upload/container.d.ts +0 -8
- package/dist/vaults/upload/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/products/identity/handlers/index.d.ts +0 -9
- package/dist/products/identity/utils/index.d.ts +0 -5
package/README.md
CHANGED
|
@@ -795,46 +795,11 @@ The SDK supports all modern browsers:
|
|
|
795
795
|
|
|
796
796
|
## Build & Release
|
|
797
797
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
```bash
|
|
801
|
-
git clone https://github.com/Spark-Vault/sdk-js.git
|
|
802
|
-
cd sdk-js
|
|
803
|
-
npm install
|
|
804
|
-
```
|
|
805
|
-
|
|
806
|
-
### Scripts
|
|
807
|
-
|
|
808
|
-
```bash
|
|
809
|
-
npm run build # Build all bundles
|
|
810
|
-
npm run build:watch # Build with watch mode
|
|
811
|
-
npm run typecheck # Run TypeScript type checking
|
|
812
|
-
npm run lint # Run ESLint
|
|
813
|
-
npm run test # Run tests
|
|
814
|
-
npm run test:watch # Run tests in watch mode
|
|
815
|
-
```
|
|
816
|
-
|
|
817
|
-
### Project Structure
|
|
818
|
-
|
|
819
|
-
```
|
|
820
|
-
sdk-js/
|
|
821
|
-
├── src/
|
|
822
|
-
│ ├── index.ts # Main entry point
|
|
823
|
-
│ ├── config.ts # Configuration management
|
|
824
|
-
│ ├── http.ts # HTTP client
|
|
825
|
-
│ ├── errors.ts # Error types
|
|
826
|
-
│ └── identity/ # Identity module
|
|
827
|
-
├── dist/ # Built bundles
|
|
828
|
-
├── tests/ # Test files
|
|
829
|
-
├── .github/workflows/ # CI/CD workflows
|
|
830
|
-
├── rollup.config.js # Rollup bundler config
|
|
831
|
-
├── tsconfig.json # TypeScript config
|
|
832
|
-
└── package.json
|
|
833
|
-
```
|
|
798
|
+
The SDK is built, tested and released from the `Spark-Vault/platform` monorepo, in `packages/sdk-js`. Run its scripts from the repository root with `npx pnpm --filter @sparkvault/sdk-js <script>`: `build`, `build:watch`, `typecheck`, `lint`, `test`, `test:watch` and `test:package`. A push to `main` that changes the package's code runs `.github/workflows/deploy-sdk-js.yml`, which publishes the package to npm and the bundles to the CDN. The SDK's architecture is in the monorepo's `docs/SDK.md`, and its release pipeline in `docs/INFRASTRUCTURE.md`.
|
|
834
799
|
|
|
835
800
|
## License
|
|
836
801
|
|
|
837
|
-
MIT License
|
|
802
|
+
MIT License.
|
|
838
803
|
|
|
839
804
|
## Links
|
|
840
805
|
|
package/dist/index.cjs
CHANGED
|
@@ -842,7 +842,9 @@ async function readApiFailure(response) {
|
|
|
842
842
|
*
|
|
843
843
|
* Core mints an id as its kind's prefix, an underscore and a body: the hex of a
|
|
844
844
|
* UUIDv7 (apps/api lib/utils.js buildPrefixedIdFromBytes), or a hex digest for
|
|
845
|
-
* an
|
|
845
|
+
* an id derived from what it names (an invitation, an inbox notification, a
|
|
846
|
+
* Messaging or help-desk ingot, a help-desk event an inbound email records).
|
|
847
|
+
* The grammar admits the kind's
|
|
846
848
|
* prefix, '_' and a body of the path-safe alphabet [A-Za-z0-9_-], 128
|
|
847
849
|
* characters in all, so an id that passes is exactly one request-path segment
|
|
848
850
|
* and one file-name component: it can never name a parent path, carry a
|
|
@@ -858,11 +860,19 @@ async function readApiFailure(response) {
|
|
|
858
860
|
/** The prefix Core mints each resource kind's id with. */
|
|
859
861
|
const RESOURCE_ID_PREFIXES = Object.freeze({
|
|
860
862
|
account: 'acc',
|
|
863
|
+
attachment: 'hda',
|
|
861
864
|
folder: 'fld',
|
|
865
|
+
helpDeskJob: 'hdj',
|
|
862
866
|
ingot: 'ing',
|
|
863
867
|
invite: 'inv',
|
|
864
868
|
notification: 'ntf',
|
|
869
|
+
requester: 'hrq',
|
|
870
|
+
routingRule: 'hdr',
|
|
871
|
+
savedReply: 'hds',
|
|
865
872
|
spark: 'spk',
|
|
873
|
+
team: 'team',
|
|
874
|
+
ticket: 'tkt',
|
|
875
|
+
ticketEvent: 'hdev',
|
|
866
876
|
user: 'usr',
|
|
867
877
|
vault: 'vlt'
|
|
868
878
|
});
|
|
@@ -908,8 +918,11 @@ function isResourceId(value) {
|
|
|
908
918
|
* SparkVault-owned domain registry.
|
|
909
919
|
*
|
|
910
920
|
* Keep platform domain decisions centralized: CSP, redirect safety, custom
|
|
911
|
-
* domain reservation, and Identity postMessage trust all
|
|
912
|
-
*
|
|
921
|
+
* domain reservation, and Identity postMessage trust all read this registry.
|
|
922
|
+
* Trust follows the hosts the platform owns (isSparkVaultOwnedHostname);
|
|
923
|
+
* reservation covers those and the help-desk domain's subtree
|
|
924
|
+
* (isSparkVaultReservedDomain), whose hosts are SparkVault's to hand out but
|
|
925
|
+
* never trusted.
|
|
913
926
|
*/
|
|
914
927
|
|
|
915
928
|
const SPARKVAULT_ROOT_DOMAIN = 'sparkvault.com';
|
|
@@ -2097,7 +2110,7 @@ class ExpirationTimer {
|
|
|
2097
2110
|
/**
|
|
2098
2111
|
* Identity Module Utilities
|
|
2099
2112
|
*
|
|
2100
|
-
* The encoding
|
|
2113
|
+
* The encoding and validation helpers the identity renderer, API
|
|
2101
2114
|
* client and module share.
|
|
2102
2115
|
*/
|
|
2103
2116
|
// Re-export timer utilities
|
|
@@ -17294,7 +17307,7 @@ class SparkVault {
|
|
|
17294
17307
|
}
|
|
17295
17308
|
/** Get the SDK version */
|
|
17296
17309
|
static get version() {
|
|
17297
|
-
return '11.1.
|
|
17310
|
+
return '11.1.3';
|
|
17298
17311
|
}
|
|
17299
17312
|
}
|
|
17300
17313
|
if (typeof window !== 'undefined') {
|