@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 CHANGED
@@ -795,46 +795,11 @@ The SDK supports all modern browsers:
795
795
 
796
796
  ## Build & Release
797
797
 
798
- ### Setup
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 - see [LICENSE](LICENSE) for details.
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 invitation and an inbox notification. The grammar admits the kind's
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 depend on the same
912
- * ownership boundary.
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, validation and cookie helpers the identity renderer, API
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.1';
17310
+ return '11.1.3';
17298
17311
  }
17299
17312
  }
17300
17313
  if (typeof window !== 'undefined') {