@andco/protocol 0.0.7 → 0.0.9

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.
Files changed (66) hide show
  1. package/README.md +22 -73
  2. package/dist/api-errors.d.ts +40 -6
  3. package/dist/api-errors.d.ts.map +1 -1
  4. package/dist/api-errors.js +38 -6
  5. package/dist/consent.d.ts +2 -2
  6. package/dist/consent.d.ts.map +1 -1
  7. package/dist/consent.js +10 -19
  8. package/dist/errors.d.ts +41 -7
  9. package/dist/errors.d.ts.map +1 -1
  10. package/dist/errors.js +46 -8
  11. package/dist/format-money.d.ts +3 -0
  12. package/dist/format-money.d.ts.map +1 -0
  13. package/dist/format-money.js +7 -0
  14. package/dist/index.d.ts +3 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +3 -1
  17. package/dist/intent-input.d.ts +134 -126
  18. package/dist/intent-input.d.ts.map +1 -1
  19. package/dist/intent-input.js +26 -16
  20. package/dist/intent-status.d.ts +24 -0
  21. package/dist/intent-status.d.ts.map +1 -0
  22. package/dist/intent-status.js +37 -0
  23. package/dist/miniapp-icon.d.ts +2 -2
  24. package/dist/miniapp-icon.d.ts.map +1 -1
  25. package/dist/miniapp-icon.js +6 -58
  26. package/dist/native-intent.d.ts +24 -33
  27. package/dist/native-intent.d.ts.map +1 -1
  28. package/dist/native-intent.js +19 -60
  29. package/dist/pagination.d.ts +71 -0
  30. package/dist/pagination.d.ts.map +1 -0
  31. package/dist/pagination.js +63 -0
  32. package/dist/rar/account-matchers.d.ts +52 -52
  33. package/dist/rar/account-matchers.d.ts.map +1 -1
  34. package/dist/rar/account-matchers.js +81 -72
  35. package/dist/rar/bank.d.ts +86 -84
  36. package/dist/rar/bank.d.ts.map +1 -1
  37. package/dist/rar/bank.js +26 -24
  38. package/dist/rar/catalog.d.ts +57 -56
  39. package/dist/rar/catalog.d.ts.map +1 -1
  40. package/dist/rar/catalog.js +1 -0
  41. package/dist/rar/detail.d.ts +1 -1
  42. package/dist/rar/detail.d.ts.map +1 -1
  43. package/dist/rar/detail.js +1 -1
  44. package/dist/service-grants.d.ts +4 -2
  45. package/dist/service-grants.d.ts.map +1 -1
  46. package/dist/service-grants.js +15 -2
  47. package/dist/transport/financial-events.d.ts +10 -22
  48. package/dist/transport/financial-events.d.ts.map +1 -1
  49. package/dist/transport/financial-events.js +36 -62
  50. package/dist/transport/generated/oauth-api.d.ts +297 -103
  51. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  52. package/dist/transport/intents.d.ts +11 -10
  53. package/dist/transport/intents.d.ts.map +1 -1
  54. package/dist/transport/intents.js +22 -21
  55. package/dist/transport/rest.d.ts +7 -4
  56. package/dist/transport/rest.d.ts.map +1 -1
  57. package/dist/transport/rest.js +1 -1
  58. package/dist/transport/runtime.js +3 -3
  59. package/dist/utils.js +3 -3
  60. package/dist/webhooks.d.ts +15 -4
  61. package/dist/webhooks.d.ts.map +1 -1
  62. package/dist/webhooks.js +50 -17
  63. package/package.json +1 -1
  64. package/dist/native-copy.d.ts +0 -28
  65. package/dist/native-copy.d.ts.map +0 -1
  66. package/dist/native-copy.js +0 -400
package/README.md CHANGED
@@ -1,94 +1,43 @@
1
1
  # `@andco/protocol`
2
2
 
3
- > [!WARNING]
4
- > **Pre-1.0 software.** Until version 1.0.0 is released, any new version may include breaking
5
- > changes, including minor and patch releases. Expect any API incompatibility and data resets
6
- > in the Andco environments without prior notice. Pin an exact version and review the release
7
- > notes before upgrading.
3
+ Shared protocol schemas, validators, OAuth helpers, message contracts, typed transport, and webhook verification used by the Andco SDK.
8
4
 
9
- Shared protocol types, schemas, constants, URL helpers, errors, OAuth utilities,
10
- and portable resource transport used by the AndCo JavaScript packages.
5
+ Developer preview: APIs may change before 1.0.
11
6
 
12
- Applications should normally use `@andco/sdk` (its `/server` subpath on the
13
- server, `/browser` in a browser). Import this package directly when
14
- implementing a framework or runtime adapter.
7
+ ## Install
15
8
 
16
- ## Runtime support
17
-
18
- The OAuth randomness helpers use the Web Crypto contract and never import `node:crypto`, install polyfills, or mutate
19
- globalThis`. `RANDOM_UUID()` prefers `crypto.randomUUID()` and falls back to an RFC 4122 UUID v4 generated with
20
- `crypto.getRandomValues()` when `randomUUID()` is unavailable.
21
-
22
- An application may inject the secure random source exposed by its host runtime:
23
-
24
- ```ts
25
- import { RANDOM_UUID, type AndCoRandomSource } from "@andco/protocol";
26
-
27
- // Supplied by the host runtime or the application.
28
- declare const runtimeCrypto: AndCoRandomSource;
29
-
30
- const transactionId = RANDOM_UUID(runtimeCrypto);
9
+ ```sh
10
+ pnpm add @andco/protocol
31
11
  ```
32
12
 
33
- If neither an injected source nor a compatible `globalThis.crypto` exists, the helper throws an `AndCoSDKError` with
34
- the `WEB_CRYPTO_UNAVAILABLE` code. A cryptographically insecure random-number generator must never be used as a fallback.
35
-
36
- ## Permissions
13
+ Use ES module imports in your application. This package has no client registration or login setup of its own. Most integrations start with `@andco/sdk` and `@andco/bank-sdk`; use it directly when validating a protocol document or implementing an adapter.
37
14
 
38
- The root exports the domain RAR model: scopes are OpenID Connect only (`AndCoKnownScope`), and every
39
- resource permission is a RAR with a `subject`. Each type has a valibot schema for its Grant Request
40
- (what an application asks, with `editable` and `null`) and for its Grant (what was conceded):
41
- `ANDCO_RAR_CATALOG`, `parseAndcoGrantRequest`, `parseAndcoGrant`, the account matchers and
42
- `accountMatcherContains`. `decodeJwtPayload` reads a JWT payload without verifying it.
15
+ ## Validate a Grant Request
43
16
 
44
17
  ```ts
45
18
  import { parseAndcoGrantRequest } from "@andco/protocol";
46
19
 
47
- // Throws AndcoRarError ("invalid_request") when the detail breaks the schema.
48
- parseAndcoGrantRequest({
49
- type: "bank_deposit",
50
- actions: ["create", "read"],
51
- subject: { type: "organization" },
52
- destinations: [{ type: "alias", pattern: "cobros" }],
20
+ const detail = parseAndcoGrantRequest({
21
+ type: "bank_account",
22
+ actions: ["read"],
23
+ subject: { type: "profile" },
53
24
  locations: ["https://api.andco.com"],
54
25
  });
55
26
  ```
56
27
 
57
- ## Public subpaths
58
-
59
- - `@andco/protocol` contains the runtime-neutral protocol and validation
60
- contracts.
61
- - `@andco/protocol/authorization` contains the GET/PAR authorization-request
62
- transport helpers (`resolveAndCoAuthorization` and related types).
63
- - `@andco/protocol/messages` contains the secure iframe message union.
64
- - `@andco/protocol/transport` contains the generated REST client, the Financial
65
- Intent client, resource types, and lazy Fetch adapter shared by server and
66
- browser packages.
67
- - `@andco/protocol/webhooks` contains `andcoWebhooks.verifier()`, which verifies
68
- Andco's Ed25519-signed webhook deliveries against Andco's public JWKS (cached
69
- by `kid`), and its header and error constants. Grant lifecycle events
70
- (`grant.revoked`, `grant.expired`, `grant.updated`) come back typed with a
71
- checked payload; narrow with `andcoWebhooks.isGrantEvent(event)`.
72
- - `@andco/protocol/server` contains server-only helpers for a confidential
73
- client authenticated with `client_secret_basic`.
28
+ ## Capabilities
74
29
 
75
- The root intentionally does not reexport `transport`, which prevents protocol
76
- consumers from pulling `openapi-fetch` into bundles accidentally.
30
+ - Validate Grant Requests and resolved Grants, account matchers, Subjects, amounts, and signed claims.
31
+ - Compose resource-specific authorization and resolve GET/PAR transport.
32
+ - Share hosted iframe and native authorization message contracts.
33
+ - Use `@andco/protocol/transport` for the generated resource contract.
34
+ - Use `@andco/protocol/webhooks` to verify Andco's Ed25519 webhook signatures and parse lifecycle events.
77
35
 
78
- ## Conformance vectors
36
+ Schemas and helpers are runtime-neutral; portable crypto helpers use Web Crypto. The SDK wraps these contracts with sessions and operations.
79
37
 
80
- The Python, Ruby and Go SDKs do not reimplement this package's rules from prose:
81
- they test against vectors generated from it. `scripts/rar-fixture-cases.mjs`
82
- (valid and invalid authorization details) and
83
- `scripts/account-matcher-containment-cases.mjs` are the shared fixtures; this
84
- package's vitest suite checks them, and
85
- `scripts/generate-conformance-vectors.mjs` publishes them, with the money, alias,
86
- Organization and identifier syntaxes and the members of each Signed Instruction
87
- (read from `openapi/oauth-api.yaml`), as one JSON document:
38
+ ## Learn more
88
39
 
89
- ```sh
90
- pnpm --filter @andco/protocol build
91
- pnpm --filter @andco/protocol run generate:conformance # writes into the three sibling SDK repos
92
- ```
40
+ - [Integration guide](https://github.com/haulmer/andco-sdk-js/blob/main/apps/sdk-landing/content/docs/protocol/overview.md)
41
+ - [API reference](https://github.com/haulmer/andco-sdk-js/blob/main/apps/sdk-landing/content/docs/reference/andco-protocol.md)
93
42
 
94
- Add a case to a fixture, never to only one suite.
43
+ Method contracts, options, and lifecycle details are documented in the exported JSDoc and API reference.
@@ -71,13 +71,13 @@ export declare const ANDCO_API_ERROR_CODES: {
71
71
  * which leaves the Intent pending for another approver. Raised before anything is presented.
72
72
  */
73
73
  readonly AMOUNT_OUT_OF_GRANT: "amount_out_of_grant";
74
- /** The alias of an account to open does not match the `bank_account` Grant's alias patterns. */
75
- readonly ALIAS_OUT_OF_GRANT: "alias_out_of_grant";
74
+ /** The accountKey of an account to open does not match the `bank_account` Grant's accountKey patterns. */
75
+ readonly ACCOUNT_KEY_OUT_OF_GRANT: "account_key_out_of_grant";
76
76
  /**
77
- * The Account Alias is already in use by an account of this subject and `upsert` was not asked, or
78
- * it belonged to an account that was closed: Aliases are never reused.
77
+ * The Account Key is already in use by an account of this subject and `upsert` was not asked, or
78
+ * it belonged to an account that was closed: AccountKeys are never reused.
79
79
  */
80
- readonly ALIAS_TAKEN: "alias_taken";
80
+ readonly ACCOUNT_KEY_TAKEN: "account_key_taken";
81
81
  /** The source of a transfer is not one the Grant's `sources` admit. */
82
82
  readonly INVALID_SOURCE: "invalid_source";
83
83
  /** The destination of a transfer, or the account a deposit names, is not one the Grant admits. */
@@ -87,7 +87,13 @@ export declare const ANDCO_API_ERROR_CODES: {
87
87
  * Name the account in `destination`; a new Grant is not needed.
88
88
  */
89
89
  readonly DEPOSIT_DESTINATION_AMBIGUOUS: "deposit_destination_ambiguous";
90
- /** The Intent still needs a person (for example to pick the source account), so it cannot be approved by API. */
90
+ /**
91
+ * A person has to act before this can succeed. For an Intent: it still needs a choice only a
92
+ * person makes (for example the source account), so it cannot be approved by API. For a read or a
93
+ * command on the bank: the subject's connection with the bank needs the person back, and
94
+ * `error.details.code` is one of {@link ANDCO_BANK_CONNECTION_ERROR_CODES} with
95
+ * `error.details.interaction_url` naming where in Platform they do it. Not retryable until then.
96
+ */
91
97
  readonly INTERACTION_REQUIRED: "interaction_required";
92
98
  /** The source account does not hold enough money for this movement. */
93
99
  readonly INSUFFICIENT_FUNDS: "insufficient_funds";
@@ -111,4 +117,32 @@ export declare const ANDCO_API_ERROR_CODES: {
111
117
  };
112
118
  /** One of the conditions {@link ANDCO_API_ERROR_CODES} names. */
113
119
  export type AndcoApiErrorCode = (typeof ANDCO_API_ERROR_CODES)[keyof typeof ANDCO_API_ERROR_CODES];
120
+ /**
121
+ * Why a subject's connection with the bank needs the person back, sent as `code` next to
122
+ * `interaction_required` (409). The Grant is intact in both cases: once the person does what the
123
+ * code names, at `interaction_url`, the same request succeeds.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * const { error } = await bank.accounts.list();
128
+ * if (error?.code === "interaction_required" && error.details?.code === ANDCO_BANK_CONNECTION_ERROR_CODES.PIN_REQUIRED) {
129
+ * askThePersonToOpen(error.details.interaction_url);
130
+ * }
131
+ * ```
132
+ */
133
+ export declare const ANDCO_BANK_CONNECTION_ERROR_CODES: {
134
+ /**
135
+ * The bank ended the session Andco operates the account with, and the person brings it back by
136
+ * typing their web PIN. Happens when nobody could keep the session alive for seven days, or when
137
+ * the bank's answer to a renewal was lost.
138
+ */
139
+ readonly PIN_REQUIRED: "bank_connection_pin_required";
140
+ /**
141
+ * The account is no longer connected to the web: the person disconnected it, or the bank revoked
142
+ * the web's access. The person has to connect the account again, identity validation included.
143
+ */
144
+ readonly RECONNECT_REQUIRED: "bank_connection_reconnect_required";
145
+ };
146
+ /** One of the reasons {@link ANDCO_BANK_CONNECTION_ERROR_CODES} names. */
147
+ export type AndcoBankConnectionErrorCode = (typeof ANDCO_BANK_CONNECTION_ERROR_CODES)[keyof typeof ANDCO_BANK_CONNECTION_ERROR_CODES];
114
148
  //# sourceMappingURL=api-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-errors.d.ts","sourceRoot":"","sources":["../src/api-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB;IAEhC;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,4EAA4E;;IAE5E;;;OAGG;;IAEH;;;OAGG;;IAIH,qGAAqG;;IAErG;;;OAGG;;IAEH,wFAAwF;;IAExF,+FAA+F;;IAE/F,2DAA2D;;IAE3D,qEAAqE;;IAIrE;;;;OAIG;;IAEH;;;;OAIG;;IAEH,gGAAgG;;IAEhG;;;OAGG;;IAEH,uEAAuE;;IAEvE,kGAAkG;;IAElG;;;OAGG;;IAEH,iHAAiH;;IAEjH,uEAAuE;;IAEvE,sGAAsG;;IAEtG,gGAAgG;;IAEhG,gGAAgG;;IAIhG,0FAA0F;;IAE1F,0DAA0D;;IAE1D,qDAAqD;;IAIrD;;;OAGG;;CAEK,CAAC;AAEX,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"api-errors.d.ts","sourceRoot":"","sources":["../src/api-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB;IAEhC;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,4EAA4E;;IAE5E;;;OAGG;;IAEH;;;OAGG;;IAIH,qGAAqG;;IAErG;;;OAGG;;IAEH,wFAAwF;;IAExF,+FAA+F;;IAE/F,2DAA2D;;IAE3D,qEAAqE;;IAIrE;;;;OAIG;;IAEH;;;;OAIG;;IAEH,0GAA0G;;IAE1G;;;OAGG;;IAEH,uEAAuE;;IAEvE,kGAAkG;;IAElG;;;OAGG;;IAEH;;;;;;OAMG;;IAEH,uEAAuE;;IAEvE,sGAAsG;;IAEtG,gGAAgG;;IAEhG,gGAAgG;;IAIhG,0FAA0F;;IAE1F,0DAA0D;;IAE1D,qDAAqD;;IAIrD;;;OAGG;;CAEK,CAAC;AAEX,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEnG;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iCAAiC;IAC5C;;;;OAIG;;IAEH;;;OAGG;;CAEK,CAAC;AAEX,0EAA0E;AAC1E,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,iCAAiC,CAAC,CAAC,MAAM,OAAO,iCAAiC,CAAC,CAAC"}
@@ -74,13 +74,13 @@ export const ANDCO_API_ERROR_CODES = {
74
74
  * which leaves the Intent pending for another approver. Raised before anything is presented.
75
75
  */
76
76
  AMOUNT_OUT_OF_GRANT: "amount_out_of_grant",
77
- /** The alias of an account to open does not match the `bank_account` Grant's alias patterns. */
78
- ALIAS_OUT_OF_GRANT: "alias_out_of_grant",
77
+ /** The accountKey of an account to open does not match the `bank_account` Grant's accountKey patterns. */
78
+ ACCOUNT_KEY_OUT_OF_GRANT: "account_key_out_of_grant",
79
79
  /**
80
- * The Account Alias is already in use by an account of this subject and `upsert` was not asked, or
81
- * it belonged to an account that was closed: Aliases are never reused.
80
+ * The Account Key is already in use by an account of this subject and `upsert` was not asked, or
81
+ * it belonged to an account that was closed: AccountKeys are never reused.
82
82
  */
83
- ALIAS_TAKEN: "alias_taken",
83
+ ACCOUNT_KEY_TAKEN: "account_key_taken",
84
84
  /** The source of a transfer is not one the Grant's `sources` admit. */
85
85
  INVALID_SOURCE: "invalid_source",
86
86
  /** The destination of a transfer, or the account a deposit names, is not one the Grant admits. */
@@ -90,7 +90,13 @@ export const ANDCO_API_ERROR_CODES = {
90
90
  * Name the account in `destination`; a new Grant is not needed.
91
91
  */
92
92
  DEPOSIT_DESTINATION_AMBIGUOUS: "deposit_destination_ambiguous",
93
- /** The Intent still needs a person (for example to pick the source account), so it cannot be approved by API. */
93
+ /**
94
+ * A person has to act before this can succeed. For an Intent: it still needs a choice only a
95
+ * person makes (for example the source account), so it cannot be approved by API. For a read or a
96
+ * command on the bank: the subject's connection with the bank needs the person back, and
97
+ * `error.details.code` is one of {@link ANDCO_BANK_CONNECTION_ERROR_CODES} with
98
+ * `error.details.interaction_url` naming where in Platform they do it. Not retryable until then.
99
+ */
94
100
  INTERACTION_REQUIRED: "interaction_required",
95
101
  /** The source account does not hold enough money for this movement. */
96
102
  INSUFFICIENT_FUNDS: "insufficient_funds",
@@ -114,3 +120,29 @@ export const ANDCO_API_ERROR_CODES = {
114
120
  */
115
121
  TEMPORARILY_UNAVAILABLE: "temporarily_unavailable",
116
122
  };
123
+ /**
124
+ * Why a subject's connection with the bank needs the person back, sent as `code` next to
125
+ * `interaction_required` (409). The Grant is intact in both cases: once the person does what the
126
+ * code names, at `interaction_url`, the same request succeeds.
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * const { error } = await bank.accounts.list();
131
+ * if (error?.code === "interaction_required" && error.details?.code === ANDCO_BANK_CONNECTION_ERROR_CODES.PIN_REQUIRED) {
132
+ * askThePersonToOpen(error.details.interaction_url);
133
+ * }
134
+ * ```
135
+ */
136
+ export const ANDCO_BANK_CONNECTION_ERROR_CODES = {
137
+ /**
138
+ * The bank ended the session Andco operates the account with, and the person brings it back by
139
+ * typing their web PIN. Happens when nobody could keep the session alive for seven days, or when
140
+ * the bank's answer to a renewal was lost.
141
+ */
142
+ PIN_REQUIRED: "bank_connection_pin_required",
143
+ /**
144
+ * The account is no longer connected to the web: the person disconnected it, or the bank revoked
145
+ * the web's access. The person has to connect the account again, identity validation included.
146
+ */
147
+ RECONNECT_REQUIRED: "bank_connection_reconnect_required",
148
+ };
package/dist/consent.d.ts CHANGED
@@ -10,10 +10,10 @@ type PreparedConsentScope = PreparedConsent["scopes"][number];
10
10
  * the three native Hosts -- reads the same fact instead of re-deriving it.
11
11
  */
12
12
  export declare function ANDCO_CONSENT_SCOPE_IS_LOCKED(scope: Pick<PreparedConsentScope, "mode" | "grantedAt">): boolean;
13
- /** Localized Platform label, falling back to provider-owned copy for custom scopes. */
13
+ /** Consent policies with provider-owned labels and selection state. */
14
14
  export declare function ANDCO_CONSENT_SCOPES(consent: Extract<AndCoAuthorizationPreparation, {
15
15
  status: "consent_required";
16
- }>, locale?: "es" | "en" | "pt"): {
16
+ }>): {
17
17
  title: string;
18
18
  description: string | undefined;
19
19
  required: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAYhH,KAAK,eAAe,GAAG,OAAO,CAAC,6BAA6B,EAAE;IAAE,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAAC;AAC9F,KAAK,oBAAoB,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,WAAW,CAAC,WAEpG;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,CAAC,6BAA6B,EAAE;IAAE,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,EAC/E,MAAM,GAAE,IAAI,GAAG,IAAI,GAAG,IAAW;;;;;;;;;;;;;;;;;;IAsBlC;AAED,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,uGAAuG;AACvG,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,CAAC,6BAA6B,EAAE;I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;;;;;;;;;;;;;;;;IAoBnH;AAED,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,uGAAuG;AACvG,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,CAAC,6BAA6B,EAAE;IAAE,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,eAOhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAa5E;AAED,uGAAuG;AACvG,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,CAAC,CAAC;AAW9G;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,EAC3B,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,WAczC;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,EAC3B,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,GACvC,OAAO,CAAC,0BAA0B,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,CAc9D"}
package/dist/consent.js CHANGED
@@ -1,12 +1,4 @@
1
1
  import { ANDCO_API_ORIGIN } from "./constants.js";
2
- import { ANDCO_NATIVE_TEXT as t } from "./native-copy.js";
3
- const SCOPE_LABELS = {
4
- openid: "Identidad OpenID",
5
- email: "Correo electrónico",
6
- profile: "Nombre y avatar",
7
- phone: "Número de teléfono",
8
- offline_access: "Mantener el acceso sin conexión",
9
- };
10
2
  /**
11
3
  * Whether a Scope's checkbox may not be cleared: the Client's Scope Policy requires it, or an
12
4
  * active OAuth Grant on this Connection already covers it and clearing the box would promise a
@@ -16,14 +8,13 @@ const SCOPE_LABELS = {
16
8
  export function ANDCO_CONSENT_SCOPE_IS_LOCKED(scope) {
17
9
  return scope.mode === "required" || scope.grantedAt !== null;
18
10
  }
19
- /** Localized Platform label, falling back to provider-owned copy for custom scopes. */
20
- export function ANDCO_CONSENT_SCOPES(consent, locale = "es") {
11
+ /** Consent policies with provider-owned labels and selection state. */
12
+ export function ANDCO_CONSENT_SCOPES(consent) {
21
13
  return consent.scopes.map((policy) => {
22
- const label = SCOPE_LABELS[policy.scope];
23
14
  return {
24
15
  ...policy,
25
- title: label ? t(label, {}, locale) : (policy.scopeDescription ?? policy.scope),
26
- description: label ? undefined : policy.resourceServerName,
16
+ title: policy.scopeDescription ?? policy.scope,
17
+ description: policy.resourceServerName,
27
18
  required: policy.mode === "required",
28
19
  default: policy.mode === "default",
29
20
  // `optional` starts unchecked on a brand-new Connection (ADR 0040's "genuine consent"
@@ -58,13 +49,13 @@ export function ANDCO_CONSENT_INITIAL_SCOPES(consent) {
58
49
  export function ANDCO_CONSENT_RESOURCE_SERVER_GROUPS(consent) {
59
50
  return [...consent.resourceServers]
60
51
  .sort((left, right) => left.resourcePosition - right.resourcePosition)
61
- .map((server) => ({
62
- server,
63
- scopes: server.resource === ANDCO_API_ORIGIN
52
+ .map((server) => {
53
+ const scopes = server.resource === ANDCO_API_ORIGIN
64
54
  ? []
65
- : consent.scopes.filter((scope) => scope.resourceServerId === server.resourceServerId),
66
- resourceAuthorization: consent.resourceAuthorizations.find((authorization) => authorization.resourceServerId === server.resourceServerId),
67
- }));
55
+ : consent.scopes.filter((scope) => scope.resourceServerId === server.resourceServerId);
56
+ const resourceAuthorization = consent.resourceAuthorizations.find((authorization) => authorization.resourceServerId === server.resourceServerId);
57
+ return { server, scopes, resourceAuthorization };
58
+ });
68
59
  }
69
60
  /** The scopes owned by the Resource Servers left out, which the decision never submits. */
70
61
  function OMITTED_SCOPES(consent, omitted) {
package/dist/errors.d.ts CHANGED
@@ -12,8 +12,7 @@
12
12
  * through in silence.
13
13
  *
14
14
  * @example
15
- * // Typed by the shape the example needs, so it reads the same from `@andco/protocol`, whose
16
- * // error is `AndCoSDKError`, and from `@andco/sdk`, whose error is `AndcoError`.
15
+ * // Typed by the shape the example needs, so it reads the same wherever the error comes from.
17
16
  * function messageFor(error: { code: string }): string {
18
17
  * switch (error.code) {
19
18
  * case ANDCO_ERROR_CODES.POPUP_BLOCKED:
@@ -167,10 +166,45 @@ export declare class ErrorExtendable extends Error {
167
166
  /** Checks whether a value is an instance of an error class. */
168
167
  static is<T extends ErrorExtendable>(error: unknown, errorClass: new (...args: any[]) => T): error is T;
169
168
  }
170
- /** SDK-specific error that includes a code and optional context. */
171
- export declare class AndCoSDKError extends ErrorExtendable {
172
- readonly code: AndcoErrorCode;
173
- readonly payload: unknown;
174
- constructor(code: AndcoErrorCode, payload?: unknown, options?: ErrorOptions);
169
+ /**
170
+ * The single error type every Andco operation reports.
171
+ *
172
+ * An integrator writes one `catch`-equivalent branch and compares one `code`, whether the failure
173
+ * came from authentication, an Intent, the resource API or the SDK itself. `code` is a plain string
174
+ * because it also carries codes this package does not own, such as the Authorization Server's OAuth
175
+ * error identifiers, and the same string identifies the same condition in the Python SDK.
176
+ *
177
+ * @example
178
+ * ```ts
179
+ * const { data, error } = await andco.intents.get(intentId);
180
+ * if (error) {
181
+ * if (error.code === "insufficient_authorization") return reconnect();
182
+ * throw error;
183
+ * }
184
+ * ```
185
+ */
186
+ export declare class AndcoError extends Error {
187
+ /** Stable identifier. Branch on this, never on `message`. */
188
+ readonly code: string;
189
+ /** HTTP status when the error came from a response. */
190
+ readonly status: number | undefined;
191
+ /**
192
+ * The remaining fields of the error body.
193
+ *
194
+ * Andco reports more than a code — `required_scope` on an authorization failure, per-field notes
195
+ * on a rejected input. Branch on `code`, but surface these: without them an integrator can only
196
+ * tell a user that something failed, not which permission is missing.
197
+ */
198
+ readonly details: Readonly<Record<string, unknown>> | undefined;
199
+ constructor(code: string, options?: {
200
+ message?: string;
201
+ status?: number;
202
+ cause?: unknown;
203
+ details?: Readonly<Record<string, unknown>>;
204
+ });
205
+ /** Normalizes anything thrown by a dependency into an `AndcoError`. */
206
+ static from(cause: unknown, fallbackCode: AndcoErrorCode): AndcoError;
207
+ /** Whether a value is an `AndcoError`. */
208
+ static is(cause: unknown): cause is AndcoError;
175
209
  }
176
210
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,iBAAiB;IAE5B,uGAAuG;;IAEvG,6EAA6E;;IAE7E,uGAAuG;;IAEvG,6DAA6D;;IAE7D,wFAAwF;;IAMxF,+GAA+G;;IAE/G,wEAAwE;;IAExE,6DAA6D;;IAE7D,0DAA0D;;IAE1D,iEAAiE;;IAEjE,wGAAwG;;IAExG,mEAAmE;;IAEnE,8EAA8E;;IAE9E,uEAAuE;;IAEvE,8DAA8D;;IAE9D,6EAA6E;;IAE7E,uGAAuG;;IAIvG;;;OAGG;;IAEH,yFAAyF;;IAEzF,+EAA+E;;IAE/E,mEAAmE;;IAEnE,qEAAqE;;IAErE,sGAAsG;;IAEtG,sFAAsF;;IAEtF;;;OAGG;;IAEH;;;;OAIG;;IAIH,sGAAsG;;IAEtG,qEAAqE;;IAErE,0EAA0E;;IAE1E,6DAA6D;;IAE7D,gEAAgE;;IAEhE,8EAA8E;;IAE9E,4FAA4F;;IAE5F;;;OAGG;;IAEH,4DAA4D;;IAE5D,qGAAqG;;IAErG,wGAAwG;;IAExG,mGAAmG;;IAEnG;;;OAGG;;IAEH,sGAAsG;;IAGtG;;;OAGG;;IAEH,2FAA2F;;IAI3F;;;OAGG;;IAEH;;;;OAIG;;IAEH,yDAAyD;;IAIzD,qGAAqG;;CAE7F,CAAC;AAEX,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG,CAAC,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,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;KAAO;IASnH,uEAAuE;WACzD,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,GAAG,UAAU;IAM5E,0CAA0C;WAC5B,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU;CAGtD"}
package/dist/errors.js CHANGED
@@ -12,8 +12,7 @@
12
12
  * through in silence.
13
13
  *
14
14
  * @example
15
- * // Typed by the shape the example needs, so it reads the same from `@andco/protocol`, whose
16
- * // error is `AndCoSDKError`, and from `@andco/sdk`, whose error is `AndcoError`.
15
+ * // Typed by the shape the example needs, so it reads the same wherever the error comes from.
17
16
  * function messageFor(error: { code: string }): string {
18
17
  * switch (error.code) {
19
18
  * case ANDCO_ERROR_CODES.POPUP_BLOCKED:
@@ -195,13 +194,52 @@ export class ErrorExtendable extends Error {
195
194
  return error instanceof errorClass;
196
195
  }
197
196
  }
198
- /** SDK-specific error that includes a code and optional context. */
199
- export class AndCoSDKError extends ErrorExtendable {
197
+ /**
198
+ * The single error type every Andco operation reports.
199
+ *
200
+ * An integrator writes one `catch`-equivalent branch and compares one `code`, whether the failure
201
+ * came from authentication, an Intent, the resource API or the SDK itself. `code` is a plain string
202
+ * because it also carries codes this package does not own, such as the Authorization Server's OAuth
203
+ * error identifiers, and the same string identifies the same condition in the Python SDK.
204
+ *
205
+ * @example
206
+ * ```ts
207
+ * const { data, error } = await andco.intents.get(intentId);
208
+ * if (error) {
209
+ * if (error.code === "insufficient_authorization") return reconnect();
210
+ * throw error;
211
+ * }
212
+ * ```
213
+ */
214
+ export class AndcoError extends Error {
215
+ /** Stable identifier. Branch on this, never on `message`. */
200
216
  code;
201
- payload;
202
- constructor(code, payload, options) {
203
- super(code, options);
217
+ /** HTTP status when the error came from a response. */
218
+ status;
219
+ /**
220
+ * The remaining fields of the error body.
221
+ *
222
+ * Andco reports more than a code — `required_scope` on an authorization failure, per-field notes
223
+ * on a rejected input. Branch on `code`, but surface these: without them an integrator can only
224
+ * tell a user that something failed, not which permission is missing.
225
+ */
226
+ details;
227
+ constructor(code, options = {}) {
228
+ super(options.message ?? code, options.cause === undefined ? undefined : { cause: options.cause });
229
+ this.name = "AndcoError";
204
230
  this.code = code;
205
- this.payload = payload;
231
+ this.status = options.status;
232
+ this.details = options.details;
233
+ }
234
+ /** Normalizes anything thrown by a dependency into an `AndcoError`. */
235
+ static from(cause, fallbackCode) {
236
+ if (AndcoError.is(cause))
237
+ return cause;
238
+ const message = cause instanceof Error ? cause.message : undefined;
239
+ return new AndcoError(fallbackCode, { message, cause });
240
+ }
241
+ /** Whether a value is an `AndcoError`. */
242
+ static is(cause) {
243
+ return cause instanceof AndcoError;
206
244
  }
207
245
  }
@@ -0,0 +1,3 @@
1
+ /** Formats monetary strings without rounding unsafe integers. */
2
+ export declare function ANDCO_FORMAT_MONEY(value: string, currency: string, locale?: string): string;
3
+ //# sourceMappingURL=format-money.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-money.d.ts","sourceRoot":"","sources":["../src/format-money.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAU,GAAG,MAAM,CAI5F"}
@@ -0,0 +1,7 @@
1
+ /** Formats monetary strings without rounding unsafe integers. */
2
+ export function ANDCO_FORMAT_MONEY(value, currency, locale = "es-CL") {
3
+ const amount = Number(value);
4
+ if (!Number.isSafeInteger(amount))
5
+ return `${value} ${currency}`;
6
+ return new Intl.NumberFormat(locale, { style: "currency", currency, maximumFractionDigits: 0 }).format(amount);
7
+ }
package/dist/index.d.ts CHANGED
@@ -5,7 +5,9 @@ export * from "./callback-state.js";
5
5
  export * from "./consent.js";
6
6
  export * from "./constants.js";
7
7
  export * from "./errors.js";
8
+ export * from "./format-money.js";
8
9
  export * from "./intent-input.js";
10
+ export * from "./intent-status.js";
9
11
  export * from "./messages/base.js";
10
12
  export * from "./messages/click.js";
11
13
  export * from "./messages/error.js";
@@ -18,9 +20,9 @@ export * from "./messages/set-preferences.js";
18
20
  export * from "./miniapp-icon.js";
19
21
  export * from "./miniapp-manifest.js";
20
22
  export * from "./native.js";
21
- export * from "./native-copy.js";
22
23
  export * from "./native-intent.js";
23
24
  export * from "./oauth.js";
25
+ export * from "./pagination.js";
24
26
  export * from "./rar/index.js";
25
27
  export * from "./release.js";
26
28
  export * from "./scopes.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,SAAS,EACT,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,SAAS,EACT,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -5,7 +5,9 @@ export * from "./callback-state.js";
5
5
  export * from "./consent.js";
6
6
  export * from "./constants.js";
7
7
  export * from "./errors.js";
8
+ export * from "./format-money.js";
8
9
  export * from "./intent-input.js";
10
+ export * from "./intent-status.js";
9
11
  export * from "./messages/base.js";
10
12
  export * from "./messages/click.js";
11
13
  export * from "./messages/error.js";
@@ -18,9 +20,9 @@ export * from "./messages/set-preferences.js";
18
20
  export * from "./miniapp-icon.js";
19
21
  export * from "./miniapp-manifest.js";
20
22
  export * from "./native.js";
21
- export * from "./native-copy.js";
22
23
  export * from "./native-intent.js";
23
24
  export * from "./oauth.js";
25
+ export * from "./pagination.js";
24
26
  export * from "./rar/index.js";
25
27
  export * from "./release.js";
26
28
  export * from "./scopes.js";