@proveanything/smartlinks 1.9.16 → 1.9.17

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.
@@ -25,12 +25,12 @@ export var authKit;
25
25
  authKit.googleLogin = googleLogin;
26
26
  /** Send a magic link email to the user (public). */
27
27
  async function sendMagicLink(clientId, data) {
28
- return post(`/authkit/${encodeURIComponent(clientId)}/magic-link/send`, data);
28
+ return post(`/authkit/${encodeURIComponent(clientId)}/auth/magic-link/send`, data);
29
29
  }
30
30
  authKit.sendMagicLink = sendMagicLink;
31
31
  /** Verify a magic link token and authenticate/create the user (public). */
32
32
  async function verifyMagicLink(clientId, token) {
33
- const res = await post(`/authkit/${encodeURIComponent(clientId)}/magic-link/verify`, { token });
33
+ const res = await post(`/authkit/${encodeURIComponent(clientId)}/auth/magic-link/verify`, { token });
34
34
  if (res.token)
35
35
  setBearerToken(res.token);
36
36
  return res;
package/dist/api/http.js CHANGED
@@ -23,6 +23,10 @@
23
23
  // { collectionId, productId, appId, data }
24
24
  // )
25
25
  import { request as _get, post as _post, put as _put, patch as _patch, del as _del, } from '../http';
26
+ /** Ensure the path always starts with `/` so it concatenates correctly with baseURL. */
27
+ function normalizePath(path) {
28
+ return path.startsWith('/') ? path : `/${path}`;
29
+ }
26
30
  export var http;
27
31
  (function (http) {
28
32
  /**
@@ -36,7 +40,7 @@ export var http;
36
40
  * const fields = await http.get<FieldDefinition[]>('/public/config/fields')
37
41
  */
38
42
  async function get(path) {
39
- return _get(path);
43
+ return _get(normalizePath(path));
40
44
  }
41
45
  http.get = get;
42
46
  /**
@@ -56,7 +60,7 @@ export var http;
56
60
  * })
57
61
  */
58
62
  async function post(path, body) {
59
- return _post(path, body);
63
+ return _post(normalizePath(path), body);
60
64
  }
61
65
  http.post = post;
62
66
  /**
@@ -68,7 +72,7 @@ export var http;
68
72
  * @throws {SmartlinksApiError} on non-2xx responses
69
73
  */
70
74
  async function put(path, body) {
71
- return _put(path, body);
75
+ return _put(normalizePath(path), body);
72
76
  }
73
77
  http.put = put;
74
78
  /**
@@ -80,7 +84,7 @@ export var http;
80
84
  * @throws {SmartlinksApiError} on non-2xx responses
81
85
  */
82
86
  async function patch(path, body) {
83
- return _patch(path, body);
87
+ return _patch(normalizePath(path), body);
84
88
  }
85
89
  http.patch = patch;
86
90
  /**
@@ -91,7 +95,7 @@ export var http;
91
95
  * @throws {SmartlinksApiError} on non-2xx responses
92
96
  */
93
97
  async function del(path) {
94
- return _del(path);
98
+ return _del(normalizePath(path));
95
99
  }
96
100
  http.del = del;
97
101
  })(http || (http = {}));
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.9.16 | Generated: 2026-04-13T17:25:57.673Z
3
+ Version: 1.9.17 | Generated: 2026-04-15T16:54:07.573Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/dist/openapi.yaml CHANGED
@@ -8380,6 +8380,65 @@ paths:
8380
8380
  description: Unauthorized
8381
8381
  404:
8382
8382
  description: Not found
8383
+ /authkit/{clientId}/auth/magic-link/send:
8384
+ post:
8385
+ tags:
8386
+ - authKit
8387
+ summary: Login with email + password (public).
8388
+ operationId: authKit_sendMagicLink
8389
+ security: []
8390
+ parameters:
8391
+ - name: clientId
8392
+ in: path
8393
+ required: true
8394
+ schema:
8395
+ type: string
8396
+ responses:
8397
+ 200:
8398
+ description: Success
8399
+ content:
8400
+ application/json:
8401
+ schema:
8402
+ $ref: "#/components/schemas/MagicLinkSendResponse"
8403
+ 400:
8404
+ description: Bad request
8405
+ 401:
8406
+ description: Unauthorized
8407
+ 404:
8408
+ description: Not found
8409
+ requestBody:
8410
+ required: true
8411
+ content:
8412
+ application/json:
8413
+ schema:
8414
+ type: object
8415
+ additionalProperties: true
8416
+ /authkit/{clientId}/auth/magic-link/verify:
8417
+ post:
8418
+ tags:
8419
+ - authKit
8420
+ summary: Google OAuth login (public).
8421
+ operationId: authKit_verifyMagicLink
8422
+ security: []
8423
+ parameters:
8424
+ - name: clientId
8425
+ in: path
8426
+ required: true
8427
+ schema:
8428
+ type: string
8429
+ responses:
8430
+ 200:
8431
+ description: Success
8432
+ content:
8433
+ application/json:
8434
+ schema:
8435
+ $ref: "#/components/schemas/MagicLinkVerifyResponse"
8436
+ 400:
8437
+ description: Bad request
8438
+ 401:
8439
+ description: Unauthorized
8440
+ 404:
8441
+ description: Not found
8383
8442
  /authkit/{clientId}/auth/phone/send-code:
8384
8443
  post:
8385
8444
  tags:
@@ -8616,65 +8675,6 @@ paths:
8616
8675
  description: Unauthorized
8617
8676
  404:
8618
8677
  description: Not found
8619
- /authkit/{clientId}/magic-link/send:
8620
- post:
8621
- tags:
8622
- - authKit
8623
- summary: Login with email + password (public).
8624
- operationId: authKit_sendMagicLink
8625
- security: []
8626
- parameters:
8627
- - name: clientId
8628
- in: path
8629
- required: true
8630
- schema:
8631
- type: string
8632
- responses:
8633
- 200:
8634
- description: Success
8635
- content:
8636
- application/json:
8637
- schema:
8638
- $ref: "#/components/schemas/MagicLinkSendResponse"
8639
- 400:
8640
- description: Bad request
8641
- 401:
8642
- description: Unauthorized
8643
- 404:
8644
- description: Not found
8645
- requestBody:
8646
- required: true
8647
- content:
8648
- application/json:
8649
- schema:
8650
- type: object
8651
- additionalProperties: true
8652
- /authkit/{clientId}/magic-link/verify:
8653
- post:
8654
- tags:
8655
- - authKit
8656
- summary: Google OAuth login (public).
8657
- operationId: authKit_verifyMagicLink
8658
- security: []
8659
- parameters:
8660
- - name: clientId
8661
- in: path
8662
- required: true
8663
- schema:
8664
- type: string
8665
- responses:
8666
- 200:
8667
- description: Success
8668
- content:
8669
- application/json:
8670
- schema:
8671
- $ref: "#/components/schemas/MagicLinkVerifyResponse"
8672
- 400:
8673
- description: Bad request
8674
- 401:
8675
- description: Unauthorized
8676
- 404:
8677
- description: Not found
8678
8678
  /platform/location:
8679
8679
  post:
8680
8680
  tags:
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.9.16 | Generated: 2026-04-13T17:25:57.673Z
3
+ Version: 1.9.17 | Generated: 2026-04-15T16:54:07.573Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/openapi.yaml CHANGED
@@ -8380,6 +8380,65 @@ paths:
8380
8380
  description: Unauthorized
8381
8381
  404:
8382
8382
  description: Not found
8383
+ /authkit/{clientId}/auth/magic-link/send:
8384
+ post:
8385
+ tags:
8386
+ - authKit
8387
+ summary: Login with email + password (public).
8388
+ operationId: authKit_sendMagicLink
8389
+ security: []
8390
+ parameters:
8391
+ - name: clientId
8392
+ in: path
8393
+ required: true
8394
+ schema:
8395
+ type: string
8396
+ responses:
8397
+ 200:
8398
+ description: Success
8399
+ content:
8400
+ application/json:
8401
+ schema:
8402
+ $ref: "#/components/schemas/MagicLinkSendResponse"
8403
+ 400:
8404
+ description: Bad request
8405
+ 401:
8406
+ description: Unauthorized
8407
+ 404:
8408
+ description: Not found
8409
+ requestBody:
8410
+ required: true
8411
+ content:
8412
+ application/json:
8413
+ schema:
8414
+ type: object
8415
+ additionalProperties: true
8416
+ /authkit/{clientId}/auth/magic-link/verify:
8417
+ post:
8418
+ tags:
8419
+ - authKit
8420
+ summary: Google OAuth login (public).
8421
+ operationId: authKit_verifyMagicLink
8422
+ security: []
8423
+ parameters:
8424
+ - name: clientId
8425
+ in: path
8426
+ required: true
8427
+ schema:
8428
+ type: string
8429
+ responses:
8430
+ 200:
8431
+ description: Success
8432
+ content:
8433
+ application/json:
8434
+ schema:
8435
+ $ref: "#/components/schemas/MagicLinkVerifyResponse"
8436
+ 400:
8437
+ description: Bad request
8438
+ 401:
8439
+ description: Unauthorized
8440
+ 404:
8441
+ description: Not found
8383
8442
  /authkit/{clientId}/auth/phone/send-code:
8384
8443
  post:
8385
8444
  tags:
@@ -8616,65 +8675,6 @@ paths:
8616
8675
  description: Unauthorized
8617
8676
  404:
8618
8677
  description: Not found
8619
- /authkit/{clientId}/magic-link/send:
8620
- post:
8621
- tags:
8622
- - authKit
8623
- summary: Login with email + password (public).
8624
- operationId: authKit_sendMagicLink
8625
- security: []
8626
- parameters:
8627
- - name: clientId
8628
- in: path
8629
- required: true
8630
- schema:
8631
- type: string
8632
- responses:
8633
- 200:
8634
- description: Success
8635
- content:
8636
- application/json:
8637
- schema:
8638
- $ref: "#/components/schemas/MagicLinkSendResponse"
8639
- 400:
8640
- description: Bad request
8641
- 401:
8642
- description: Unauthorized
8643
- 404:
8644
- description: Not found
8645
- requestBody:
8646
- required: true
8647
- content:
8648
- application/json:
8649
- schema:
8650
- type: object
8651
- additionalProperties: true
8652
- /authkit/{clientId}/magic-link/verify:
8653
- post:
8654
- tags:
8655
- - authKit
8656
- summary: Google OAuth login (public).
8657
- operationId: authKit_verifyMagicLink
8658
- security: []
8659
- parameters:
8660
- - name: clientId
8661
- in: path
8662
- required: true
8663
- schema:
8664
- type: string
8665
- responses:
8666
- 200:
8667
- description: Success
8668
- content:
8669
- application/json:
8670
- schema:
8671
- $ref: "#/components/schemas/MagicLinkVerifyResponse"
8672
- 400:
8673
- description: Bad request
8674
- 401:
8675
- description: Unauthorized
8676
- 404:
8677
- description: Not found
8678
8678
  /platform/location:
8679
8679
  post:
8680
8680
  tags:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.9.16",
3
+ "version": "1.9.17",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",