@mymehq/sdk 4.10.0 → 5.1.0
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/auth/index.js +6 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +8 -6
- package/package.json +2 -2
package/dist/auth/index.js
CHANGED
|
@@ -142,12 +142,12 @@ var StoredTokenProvider = class {
|
|
|
142
142
|
try {
|
|
143
143
|
const res = await this.fetch(`${this.issuer}/auth/token`, {
|
|
144
144
|
method: "POST",
|
|
145
|
-
headers: { "Content-Type": "application/
|
|
146
|
-
body:
|
|
145
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
146
|
+
body: new URLSearchParams({
|
|
147
147
|
grant_type: "refresh_token",
|
|
148
148
|
refresh_token: refreshToken,
|
|
149
149
|
client_id: this.clientId
|
|
150
|
-
})
|
|
150
|
+
}).toString()
|
|
151
151
|
});
|
|
152
152
|
const body = await res.json();
|
|
153
153
|
if (!res.ok || !body.access_token) {
|
|
@@ -269,14 +269,14 @@ var MymeAuth = class {
|
|
|
269
269
|
}
|
|
270
270
|
const res = await this.fetch(`${this.issuer}/auth/token`, {
|
|
271
271
|
method: "POST",
|
|
272
|
-
headers: { "Content-Type": "application/
|
|
273
|
-
body:
|
|
272
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
273
|
+
body: new URLSearchParams({
|
|
274
274
|
grant_type: "authorization_code",
|
|
275
275
|
code,
|
|
276
276
|
code_verifier: pending.verifier,
|
|
277
277
|
redirect_uri: pending.redirectUri,
|
|
278
278
|
client_id: this.clientId
|
|
279
|
-
})
|
|
279
|
+
}).toString()
|
|
280
280
|
});
|
|
281
281
|
const body = await res.json();
|
|
282
282
|
if (!res.ok || !body.access_token || !body.refresh_token) {
|
package/dist/index.d.ts
CHANGED
|
@@ -524,7 +524,7 @@ declare class MymeClient {
|
|
|
524
524
|
readonly keys: {
|
|
525
525
|
/** Creates an API key. The raw key value is returned exactly once on
|
|
526
526
|
* creation; the rest of the shape mirrors the persisted ApiKey record
|
|
527
|
-
* (source,
|
|
527
|
+
* (source, default_tier, type_permissions, and
|
|
528
528
|
* extension_permissions are all stamped at create time and visible
|
|
529
529
|
* here so the caller doesn't need a follow-up GET /keys to inspect
|
|
530
530
|
* them). */
|
|
@@ -608,15 +608,17 @@ declare class MymeClient {
|
|
|
608
608
|
*/
|
|
609
609
|
previewEvent: (input: PreviewEventRequest) => Promise<PreviewEventResult>;
|
|
610
610
|
};
|
|
611
|
-
/** Tenant-scoped configuration.
|
|
612
|
-
*
|
|
613
|
-
*
|
|
611
|
+
/** Tenant-scoped configuration. Carries the three optional schema-
|
|
612
|
+
* enforcement levers (TSC42 §5: `strict_mode`, `source_allowlist`,
|
|
613
|
+
* `source_filter`) and the per-tenant cleanup-job overrides
|
|
614
|
+
* (`audit_retention_days`, `event_log_retention_hours`,
|
|
615
|
+
* `trash_retention_days`). All endpoints are admin-only. */
|
|
614
616
|
readonly tenants: {
|
|
615
617
|
/** Returns the current tenant's config. Empty object when nothing
|
|
616
618
|
* is configured. */
|
|
617
619
|
getConfig: () => Promise<TenantConfig>;
|
|
618
|
-
/** Replaces the current tenant's config
|
|
619
|
-
*
|
|
620
|
+
/** Replaces the current tenant's config (PUT semantics — full
|
|
621
|
+
* replacement, not merge). */
|
|
620
622
|
setConfig: (config: TenantConfig) => Promise<TenantConfig>;
|
|
621
623
|
/** Per-tenant resource quotas (T-052). Empty / missing limits fall
|
|
622
624
|
* back to the instance defaults from env. Quotas are platform-
|
package/dist/index.js
CHANGED
|
@@ -818,7 +818,7 @@ var MymeClient = class {
|
|
|
818
818
|
keys = {
|
|
819
819
|
/** Creates an API key. The raw key value is returned exactly once on
|
|
820
820
|
* creation; the rest of the shape mirrors the persisted ApiKey record
|
|
821
|
-
* (source,
|
|
821
|
+
* (source, default_tier, type_permissions, and
|
|
822
822
|
* extension_permissions are all stamped at create time and visible
|
|
823
823
|
* here so the caller doesn't need a follow-up GET /keys to inspect
|
|
824
824
|
* them). */
|
|
@@ -956,9 +956,11 @@ var MymeClient = class {
|
|
|
956
956
|
}
|
|
957
957
|
};
|
|
958
958
|
// ---- Tenants (admin) ----
|
|
959
|
-
/** Tenant-scoped configuration.
|
|
960
|
-
*
|
|
961
|
-
*
|
|
959
|
+
/** Tenant-scoped configuration. Carries the three optional schema-
|
|
960
|
+
* enforcement levers (TSC42 §5: `strict_mode`, `source_allowlist`,
|
|
961
|
+
* `source_filter`) and the per-tenant cleanup-job overrides
|
|
962
|
+
* (`audit_retention_days`, `event_log_retention_hours`,
|
|
963
|
+
* `trash_retention_days`). All endpoints are admin-only. */
|
|
962
964
|
tenants = {
|
|
963
965
|
/** Returns the current tenant's config. Empty object when nothing
|
|
964
966
|
* is configured. */
|
|
@@ -968,8 +970,8 @@ var MymeClient = class {
|
|
|
968
970
|
"/tenants/current/config"
|
|
969
971
|
);
|
|
970
972
|
},
|
|
971
|
-
/** Replaces the current tenant's config
|
|
972
|
-
*
|
|
973
|
+
/** Replaces the current tenant's config (PUT semantics — full
|
|
974
|
+
* replacement, not merge). */
|
|
973
975
|
setConfig: async (config) => {
|
|
974
976
|
return this.transport.request(
|
|
975
977
|
"PUT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mymehq/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@mymehq/shared": "
|
|
23
|
+
"@mymehq/shared": "5.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^22.0.0",
|