@mymehq/sdk 4.10.0 → 5.0.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.
@@ -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/json" },
146
- body: JSON.stringify({
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/json" },
273
- body: JSON.stringify({
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, default_origin, default_tier, type_permissions, and
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). */
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, default_origin, default_tier, type_permissions, and
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). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mymehq/sdk",
3
- "version": "4.10.0",
3
+ "version": "5.0.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": "4.10.0"
23
+ "@mymehq/shared": "5.0.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^22.0.0",