@relai-team/access-sdk 0.18.1 → 0.18.2

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/index.cjs CHANGED
@@ -479,6 +479,22 @@ var OrdersModule = class {
479
479
  if (input.metadata !== void 0) body["metadata"] = input.metadata;
480
480
  return this.http.request({ method: "POST", path: "/orders", body });
481
481
  }
482
+ /**
483
+ * Fetch one order.
484
+ *
485
+ * WHO MAY READ IT, because this is the call most likely to surprise you:
486
+ *
487
+ * - A SECRET key reads any order of the app. Server-to-server.
488
+ * - A PUBLISHABLE key needs a signed-in end user, who must be the order's
489
+ * initiator or its recipient. A publishable key ships inside your app
490
+ * binary, so it proves nothing about who is asking.
491
+ * - A GUEST session reads only its own orders that have no recipient. Guest
492
+ * mode is one shared identity per app, so a guest order with no recipient
493
+ * names nobody, while a directed one names a real person.
494
+ *
495
+ * Every refusal is `not_found`, identical to an id that does not exist, so
496
+ * you cannot tell the two apart and should not try.
497
+ */
482
498
  get(orderId) {
483
499
  return this.http.request({ path: `/orders/${orderId}` });
484
500
  }
package/dist/index.d.cts CHANGED
@@ -671,6 +671,22 @@ declare class OrdersModule {
671
671
  promotionCode?: string;
672
672
  metadata?: Record<string, string>;
673
673
  }): Promise<Order>;
674
+ /**
675
+ * Fetch one order.
676
+ *
677
+ * WHO MAY READ IT, because this is the call most likely to surprise you:
678
+ *
679
+ * - A SECRET key reads any order of the app. Server-to-server.
680
+ * - A PUBLISHABLE key needs a signed-in end user, who must be the order's
681
+ * initiator or its recipient. A publishable key ships inside your app
682
+ * binary, so it proves nothing about who is asking.
683
+ * - A GUEST session reads only its own orders that have no recipient. Guest
684
+ * mode is one shared identity per app, so a guest order with no recipient
685
+ * names nobody, while a directed one names a real person.
686
+ *
687
+ * Every refusal is `not_found`, identical to an id that does not exist, so
688
+ * you cannot tell the two apart and should not try.
689
+ */
674
690
  get(orderId: string): Promise<Order>;
675
691
  /**
676
692
  * Request an open: one token + an unlock grant. On authenticated towers the
package/dist/index.d.ts CHANGED
@@ -671,6 +671,22 @@ declare class OrdersModule {
671
671
  promotionCode?: string;
672
672
  metadata?: Record<string, string>;
673
673
  }): Promise<Order>;
674
+ /**
675
+ * Fetch one order.
676
+ *
677
+ * WHO MAY READ IT, because this is the call most likely to surprise you:
678
+ *
679
+ * - A SECRET key reads any order of the app. Server-to-server.
680
+ * - A PUBLISHABLE key needs a signed-in end user, who must be the order's
681
+ * initiator or its recipient. A publishable key ships inside your app
682
+ * binary, so it proves nothing about who is asking.
683
+ * - A GUEST session reads only its own orders that have no recipient. Guest
684
+ * mode is one shared identity per app, so a guest order with no recipient
685
+ * names nobody, while a directed one names a real person.
686
+ *
687
+ * Every refusal is `not_found`, identical to an id that does not exist, so
688
+ * you cannot tell the two apart and should not try.
689
+ */
674
690
  get(orderId: string): Promise<Order>;
675
691
  /**
676
692
  * Request an open: one token + an unlock grant. On authenticated towers the
package/dist/index.js CHANGED
@@ -325,6 +325,22 @@ var OrdersModule = class {
325
325
  if (input.metadata !== void 0) body["metadata"] = input.metadata;
326
326
  return this.http.request({ method: "POST", path: "/orders", body });
327
327
  }
328
+ /**
329
+ * Fetch one order.
330
+ *
331
+ * WHO MAY READ IT, because this is the call most likely to surprise you:
332
+ *
333
+ * - A SECRET key reads any order of the app. Server-to-server.
334
+ * - A PUBLISHABLE key needs a signed-in end user, who must be the order's
335
+ * initiator or its recipient. A publishable key ships inside your app
336
+ * binary, so it proves nothing about who is asking.
337
+ * - A GUEST session reads only its own orders that have no recipient. Guest
338
+ * mode is one shared identity per app, so a guest order with no recipient
339
+ * names nobody, while a directed one names a real person.
340
+ *
341
+ * Every refusal is `not_found`, identical to an id that does not exist, so
342
+ * you cannot tell the two apart and should not try.
343
+ */
328
344
  get(orderId) {
329
345
  return this.http.request({ path: `/orders/${orderId}` });
330
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relai-team/access-sdk",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Official Relai Access SDK, open Relai Exchange Zone nodes over BLE, backed by the Relai Access platform (server-owns-trust).",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -22,6 +22,7 @@
22
22
  "sideEffects": false,
23
23
  "scripts": {
24
24
  "build": "tsup",
25
+ "prepack": "npm run build",
25
26
  "typecheck": "tsc --noEmit",
26
27
  "pretest": "npm run build",
27
28
  "test": "vitest run",