@sovecom/module-sdk 1.0.0-rc.1 → 1.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.
- package/dist/http.d.ts +18 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface ModuleHttpRequest {
|
|
|
22
22
|
* The CORE-VERIFIED customer principal for this request, or `undefined` for an anonymous call.
|
|
23
23
|
*
|
|
24
24
|
* Set ONLY by the core proxy from a customer JWT it verified itself (the store mount runs an
|
|
25
|
-
* optional customer-auth guard). It is NEVER read from client input
|
|
25
|
+
* optional customer-auth guard). It is NEVER read from client input -- a `customer` field in the
|
|
26
26
|
* request body, headers, or query cannot influence it, and the raw token is still stripped before
|
|
27
27
|
* the request reaches the module. Absent (`undefined`) when no valid customer token was presented.
|
|
28
28
|
*
|
|
@@ -32,6 +32,23 @@ export interface ModuleHttpRequest {
|
|
|
32
32
|
readonly customer?: {
|
|
33
33
|
readonly id: string;
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* The CORE-DERIVED guest identity for this request, or `undefined` when a verified customer is
|
|
37
|
+
* present or no guest cookie exists yet.
|
|
38
|
+
*
|
|
39
|
+
* Set ONLY by the core proxy from a signed, tenant-scoped `sov_guest` httpOnly cookie that the
|
|
40
|
+
* core minted itself (HMAC-SHA256 over `{guestId, tenantId}`). It is NEVER read from client
|
|
41
|
+
* input -- no body/header/query field can influence it. The `id` is an opaque, high-entropy UUID
|
|
42
|
+
* the core generated; a module must never parse or assume its format beyond using it as an
|
|
43
|
+
* opaque scoping key.
|
|
44
|
+
*
|
|
45
|
+
* Priority: when `customer` is set, `guestId` is absent -- a logged-in customer always wins.
|
|
46
|
+
* When a guest logs in, the storefront calls the merge endpoint so guest data migrates to the
|
|
47
|
+
* customer id before the next module request arrives.
|
|
48
|
+
*/
|
|
49
|
+
readonly guestId?: {
|
|
50
|
+
readonly id: string;
|
|
51
|
+
};
|
|
35
52
|
}
|
|
36
53
|
export interface ModuleHttpResponse {
|
|
37
54
|
readonly status: number;
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8FAA8F;AAC9F,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAClD,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8FAA8F;AAC9F,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAClD,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAC9B,GAAG,EAAE,iBAAiB,KACnB,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* enforcement lives in the core-side broker. Nothing exported here can disable or weaken it.
|
|
10
10
|
*/
|
|
11
11
|
/** SDK package version (independent of the core API contract version below). */
|
|
12
|
-
export declare const MODULE_SDK_VERSION = "1.0.
|
|
12
|
+
export declare const MODULE_SDK_VERSION = "1.0.1";
|
|
13
13
|
export { defineModule } from './module.js';
|
|
14
14
|
export type { SovecomModule, DefineModuleConfig } from './module.js';
|
|
15
15
|
export { defineSlots } from './slots.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC7F,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAGlB,YAAY,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG1F,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.RpcErrorCode = exports.CORE_API_VERSION = exports.assertCoreCompatible = exports.parseAndVerifyManifest = exports.moduleManifestSchema = exports.TABLE_SUFFIX_RE = exports.SLOT_SLUG_RE = exports.MODULE_NAME_RE = exports.MANIFEST_MAX_BYTES = exports.MODULE_PERMISSION_ALLOWLIST = exports.EMAIL_HTML_MAX = exports.EMAIL_TEXT_MAX = exports.EMAIL_SUBJECT_MAX = exports.EMAIL_TO_MAX = exports.createNamespacedTable = exports.defineSlots = exports.defineModule = exports.MODULE_SDK_VERSION = void 0;
|
|
14
14
|
/** SDK package version (independent of the core API contract version below). */
|
|
15
|
-
exports.MODULE_SDK_VERSION = '1.0.
|
|
15
|
+
exports.MODULE_SDK_VERSION = '1.0.1';
|
|
16
16
|
// ── author ergonomics ───────────────────────────────────────────────────────────
|
|
17
17
|
var module_js_1 = require("./module.js");
|
|
18
18
|
Object.defineProperty(exports, "defineModule", { enumerable: true, get: function () { return module_js_1.defineModule; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,gFAAgF;AACnE,QAAA,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,gFAAgF;AACnE,QAAA,kBAAkB,GAAG,OAAO,CAAC;AAE1C,mFAAmF;AACnF,yCAA2C;AAAlC,yGAAA,YAAY,OAAA;AAErB,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AACpB,yCAAoD;AAA3C,kHAAA,qBAAqB,OAAA;AAc9B,oFAAoF;AACpF,uCAA6F;AAApF,wGAAA,YAAY,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAAE,0GAAA,cAAc,OAAA;AAAE,0GAAA,cAAc,OAAA;AA6BxE,oFAAoF;AACpF,6CASuB;AARrB,0HAAA,2BAA2B,OAAA;AAC3B,iHAAA,kBAAkB,OAAA;AAClB,6GAAA,cAAc,OAAA;AACd,2GAAA,YAAY,OAAA;AACZ,8GAAA,eAAe,OAAA;AACf,mHAAA,oBAAoB,OAAA;AACpB,qHAAA,sBAAsB,OAAA;AACtB,mHAAA,oBAAoB,OAAA;AAItB,mFAAmF;AACnF,qDAAqD;AAA5C,mHAAA,gBAAgB,OAAA;AAEzB,oFAAoF;AACpF,yCAA2C;AAAlC,yGAAA,YAAY,OAAA"}
|