@andco/protocol 0.0.11 → 0.0.13

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 (120) hide show
  1. package/dist/api-errors.d.ts +5 -128
  2. package/dist/api-errors.d.ts.map +1 -1
  3. package/dist/api-errors.js +5 -131
  4. package/dist/authorization-preparation.d.ts +3 -3
  5. package/dist/authorization-preparation.d.ts.map +1 -1
  6. package/dist/authorization-preparation.js +4 -0
  7. package/dist/authorization.js +2 -2
  8. package/dist/errors.d.ts +111 -16
  9. package/dist/errors.d.ts.map +1 -1
  10. package/dist/errors.js +124 -12
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/intent-input.d.ts +1791 -725
  15. package/dist/intent-input.d.ts.map +1 -1
  16. package/dist/intent-input.js +325 -157
  17. package/dist/issues.d.ts +62 -0
  18. package/dist/issues.d.ts.map +1 -0
  19. package/dist/issues.js +61 -0
  20. package/dist/messages/index.d.ts +2 -2
  21. package/dist/messages/index.d.ts.map +1 -1
  22. package/dist/messages/index.js +10 -3
  23. package/dist/messages/set-preferences.d.ts +13 -1
  24. package/dist/messages/set-preferences.d.ts.map +1 -1
  25. package/dist/messages/set-preferences.js +31 -9
  26. package/dist/miniapp-manifest.d.ts +2 -2
  27. package/dist/miniapp-manifest.d.ts.map +1 -1
  28. package/dist/miniapp-manifest.js +1 -1
  29. package/dist/native-intent.d.ts +48 -28
  30. package/dist/native-intent.d.ts.map +1 -1
  31. package/dist/native-intent.js +76 -24
  32. package/dist/pagination.d.ts +37 -31
  33. package/dist/pagination.d.ts.map +1 -1
  34. package/dist/pagination.js +72 -24
  35. package/dist/rar/account-matchers.d.ts +47 -240
  36. package/dist/rar/account-matchers.d.ts.map +1 -1
  37. package/dist/rar/account-matchers.js +52 -131
  38. package/dist/rar/bank.d.ts +280 -392
  39. package/dist/rar/bank.d.ts.map +1 -1
  40. package/dist/rar/bank.js +68 -137
  41. package/dist/rar/catalog.d.ts +305 -288
  42. package/dist/rar/catalog.d.ts.map +1 -1
  43. package/dist/rar/catalog.js +69 -29
  44. package/dist/rar/detail.d.ts +15 -32
  45. package/dist/rar/detail.d.ts.map +1 -1
  46. package/dist/rar/detail.js +14 -34
  47. package/dist/rar/index.d.ts +2 -1
  48. package/dist/rar/index.d.ts.map +1 -1
  49. package/dist/rar/index.js +2 -1
  50. package/dist/rar/json-schemas.generated.d.ts +4 -0
  51. package/dist/rar/json-schemas.generated.d.ts.map +1 -0
  52. package/dist/rar/json-schemas.generated.js +3570 -0
  53. package/dist/rar/money.d.ts +5 -5
  54. package/dist/rar/money.d.ts.map +1 -1
  55. package/dist/rar/money.js +5 -5
  56. package/dist/rar/project-users.d.ts +40 -14
  57. package/dist/rar/project-users.d.ts.map +1 -1
  58. package/dist/rar/project-users.js +20 -23
  59. package/dist/rar/subject-data.d.ts +96 -48
  60. package/dist/rar/subject-data.d.ts.map +1 -1
  61. package/dist/rar/subject-data.js +61 -34
  62. package/dist/rar/subject.d.ts +18 -85
  63. package/dist/rar/subject.d.ts.map +1 -1
  64. package/dist/rar/subject.js +23 -51
  65. package/dist/rest/accounts.d.ts +347 -0
  66. package/dist/rest/accounts.d.ts.map +1 -0
  67. package/dist/rest/accounts.js +108 -0
  68. package/dist/rest/addresses.d.ts +581 -0
  69. package/dist/rest/addresses.d.ts.map +1 -0
  70. package/dist/rest/addresses.js +190 -0
  71. package/dist/rest/api-error.d.ts +104 -0
  72. package/dist/rest/api-error.d.ts.map +1 -0
  73. package/dist/rest/api-error.js +103 -0
  74. package/dist/rest/authorization.d.ts +123 -0
  75. package/dist/rest/authorization.d.ts.map +1 -0
  76. package/dist/rest/authorization.js +62 -0
  77. package/dist/rest/catalog.d.ts +199 -0
  78. package/dist/rest/catalog.d.ts.map +1 -0
  79. package/dist/rest/catalog.js +63 -0
  80. package/dist/rest/common.d.ts +637 -0
  81. package/dist/rest/common.d.ts.map +1 -0
  82. package/dist/rest/common.js +172 -0
  83. package/dist/rest/contract.d.ts +3480 -0
  84. package/dist/rest/contract.d.ts.map +1 -0
  85. package/dist/rest/contract.js +120 -0
  86. package/dist/rest/events.d.ts +145 -0
  87. package/dist/rest/events.d.ts.map +1 -0
  88. package/dist/rest/events.js +42 -0
  89. package/dist/rest/http.d.ts +49 -0
  90. package/dist/rest/http.d.ts.map +1 -0
  91. package/dist/rest/http.js +25 -0
  92. package/dist/rest/identity.d.ts +627 -0
  93. package/dist/rest/identity.d.ts.map +1 -0
  94. package/dist/rest/identity.js +128 -0
  95. package/dist/rest/index.d.ts +14 -0
  96. package/dist/rest/index.d.ts.map +1 -0
  97. package/dist/rest/index.js +13 -0
  98. package/dist/rest/intents.d.ts +4556 -0
  99. package/dist/rest/intents.d.ts.map +1 -0
  100. package/dist/rest/intents.js +551 -0
  101. package/dist/rest/signatures.d.ts +110 -0
  102. package/dist/rest/signatures.d.ts.map +1 -0
  103. package/dist/rest/signatures.js +113 -0
  104. package/dist/rest/subjects.d.ts +14 -0
  105. package/dist/rest/subjects.d.ts.map +1 -0
  106. package/dist/rest/subjects.js +22 -0
  107. package/dist/service-grants.d.ts +2 -2
  108. package/dist/service-grants.d.ts.map +1 -1
  109. package/dist/service-grants.js +1 -1
  110. package/dist/transport/generated/oauth-api.d.ts +5547 -1448
  111. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  112. package/dist/transport/intents.d.ts +9 -134
  113. package/dist/transport/intents.d.ts.map +1 -1
  114. package/dist/transport/intents.js +21 -405
  115. package/dist/transport/rest.d.ts +15 -5
  116. package/dist/transport/rest.d.ts.map +1 -1
  117. package/dist/userinfo.d.ts +22 -9
  118. package/dist/userinfo.d.ts.map +1 -1
  119. package/dist/userinfo.js +17 -12
  120. package/package.json +13 -2
@@ -0,0 +1,62 @@
1
+ import * as v from "valibot";
2
+ /**
3
+ * One problem with an input, with no words in it: `type` is its public code, a Valibot issue type
4
+ * (`max_length`, `regex`, `strict_object`, ...) when the shape is wrong, or the code of a rule
5
+ * (`note_too_long`) when the shape is right and a rule refuses it. `path` lists the keys that lead
6
+ * to the value, and is absent or `undefined` when the input as a whole is the problem, as in a
7
+ * Valibot issue, which is assignable to this type as it is. `requirement` is what was expected, when
8
+ * there is one to say: `140` for a note that is too long.
9
+ *
10
+ * A screen chooses its own words from `type`, so the same issue reads right in any language.
11
+ *
12
+ * @example
13
+ * const parsed = parseIntentInput(input);
14
+ * if (!parsed.success) for (const issue of parsed.issues) console.log(issue.type, issue.path);
15
+ */
16
+ export type Issue = {
17
+ readonly type: string;
18
+ readonly path?: readonly {
19
+ readonly key: unknown;
20
+ }[] | undefined;
21
+ readonly requirement?: unknown;
22
+ };
23
+ /**
24
+ * What parsing an input answers: its output when the shape is right and every rule holds, or every
25
+ * {@link Issue} found, so a form shows all of them at once.
26
+ */
27
+ export type ParseResult<Output> = {
28
+ readonly success: true;
29
+ readonly output: Output;
30
+ } | {
31
+ readonly success: false;
32
+ readonly issues: readonly Issue[];
33
+ };
34
+ /** Reduces Valibot's issues to {@link Issue}, keeping neither the input nor any message. */
35
+ export declare function issuesOf(issues: readonly v.BaseIssue<unknown>[]): Issue[];
36
+ /**
37
+ * Prefixes the path of every issue with `keys`: how a rule over a nested value reports where that
38
+ * value sits in its parent.
39
+ *
40
+ * @example
41
+ * issuesAt(["subject"], [{ type: "identifier_exceeds_organization_id", path: [{ key: "identifier" }] }]);
42
+ * // [{ type: "identifier_exceeds_organization_id", path: [{ key: "subject" }, { key: "identifier" }] }]
43
+ */
44
+ export declare function issuesAt(keys: readonly unknown[], issues: readonly Issue[]): Issue[];
45
+ /**
46
+ * One issue of `type` for every value of `values` already seen earlier in the list, at that value's
47
+ * index. `identity` says when two values are the same; by default they are compared with `===`.
48
+ *
49
+ * @example
50
+ * duplicateIssues(["read", "read"], "duplicate_action"); // [{ type: "duplicate_action", path: [{ key: 1 }] }]
51
+ */
52
+ export declare function duplicateIssues<Value>(values: readonly Value[], type: string, identity?: (value: Value) => unknown): Issue[];
53
+ /**
54
+ * Parses `input` with `schema`, then applies `rules` to the output: the shape first, so a rule never
55
+ * reads a value of the wrong type, and then every rule at once. Answers the issues of whichever
56
+ * stage fails.
57
+ *
58
+ * @example
59
+ * const parsed = parseWithRules(NoteSchema, (note) => (note.length > 140 ? [{ type: "note_too_long", path: undefined }] : []), input);
60
+ */
61
+ export declare function parseWithRules<const Schema extends v.GenericSchema>(schema: Schema, rules: (output: v.InferOutput<Schema>) => Issue[], input: unknown): ParseResult<v.InferOutput<Schema>>;
62
+ //# sourceMappingURL=issues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../src/issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;KAAE,EAAE,GAAG,SAAS,CAAC;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,MAAM,IAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,CAAC;AAEnE,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,CAMzE;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,KAAK,EAAE,CAKpF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EACnC,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAA0B,GACrD,KAAK,EAAE,CAYT;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC,aAAa,EACjE,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE,EACjD,KAAK,EAAE,OAAO,GACb,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAMpC"}
package/dist/issues.js ADDED
@@ -0,0 +1,61 @@
1
+ import * as v from "valibot";
2
+ /** Reduces Valibot's issues to {@link Issue}, keeping neither the input nor any message. */
3
+ export function issuesOf(issues) {
4
+ return issues.map((issue) => ({
5
+ type: issue.type,
6
+ path: issue.path?.map((item) => ({ key: item.key })),
7
+ requirement: issue.requirement,
8
+ }));
9
+ }
10
+ /**
11
+ * Prefixes the path of every issue with `keys`: how a rule over a nested value reports where that
12
+ * value sits in its parent.
13
+ *
14
+ * @example
15
+ * issuesAt(["subject"], [{ type: "identifier_exceeds_organization_id", path: [{ key: "identifier" }] }]);
16
+ * // [{ type: "identifier_exceeds_organization_id", path: [{ key: "subject" }, { key: "identifier" }] }]
17
+ */
18
+ export function issuesAt(keys, issues) {
19
+ return issues.map((issue) => ({
20
+ ...issue,
21
+ path: [...keys.map((key) => ({ key })), ...(issue.path ?? [])],
22
+ }));
23
+ }
24
+ /**
25
+ * One issue of `type` for every value of `values` already seen earlier in the list, at that value's
26
+ * index. `identity` says when two values are the same; by default they are compared with `===`.
27
+ *
28
+ * @example
29
+ * duplicateIssues(["read", "read"], "duplicate_action"); // [{ type: "duplicate_action", path: [{ key: 1 }] }]
30
+ */
31
+ export function duplicateIssues(values, type, identity = (value) => value) {
32
+ const seen = new Set();
33
+ const issues = [];
34
+ values.forEach((value, index) => {
35
+ const key = identity(value);
36
+ if (seen.has(key)) {
37
+ issues.push({ type, path: [{ key: index }] });
38
+ }
39
+ else {
40
+ seen.add(key);
41
+ }
42
+ });
43
+ return issues;
44
+ }
45
+ /**
46
+ * Parses `input` with `schema`, then applies `rules` to the output: the shape first, so a rule never
47
+ * reads a value of the wrong type, and then every rule at once. Answers the issues of whichever
48
+ * stage fails.
49
+ *
50
+ * @example
51
+ * const parsed = parseWithRules(NoteSchema, (note) => (note.length > 140 ? [{ type: "note_too_long", path: undefined }] : []), input);
52
+ */
53
+ export function parseWithRules(schema, rules, input) {
54
+ const shaped = v.safeParse(schema, input);
55
+ if (!shaped.success)
56
+ return { success: false, issues: issuesOf(shaped.issues) };
57
+ const issues = rules(shaped.output);
58
+ if (issues.length > 0)
59
+ return { success: false, issues };
60
+ return { success: true, output: shaped.output };
61
+ }
@@ -29,7 +29,7 @@ export declare const AndCoBridgeMessageSchema: v.VariantSchema<"type", [v.Strict
29
29
  }, undefined>, v.StrictObjectSchema<{
30
30
  readonly type: v.LiteralSchema<"set-preferences", undefined>;
31
31
  readonly themeMode: v.OptionalSchema<v.PicklistSchema<["dark", "light", "system"], undefined>, undefined>;
32
- readonly locale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.CheckAction<string, undefined>]>, undefined>;
32
+ readonly locale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.RegexAction<string, undefined>]>, undefined>;
33
33
  readonly protocol: v.LiteralSchema<"andco:sdk", undefined>;
34
34
  readonly version: v.LiteralSchema<2, undefined>;
35
35
  }, undefined>, v.StrictObjectSchema<{
@@ -70,6 +70,6 @@ export declare const AndCoBridgeMessageSchema: v.VariantSchema<"type", [v.Strict
70
70
  }, undefined>], undefined>;
71
71
  /** Union of every valid AndCo bridge message. */
72
72
  export type AndCoBridgeMessage = v.InferOutput<typeof AndCoBridgeMessageSchema>;
73
- /** Checks whether an unknown value is a valid AndCo bridge message. */
73
+ /** Checks whether an unknown value is a valid AndCo bridge message: its shape, and the rules a message has. */
74
74
  export declare function isAndCoBridgeMessage(input: unknown): input is AndCoBridgeMessage;
75
75
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAgB7B,oEAAoE;AACpE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAanC,CAAC;AACH,iDAAiD;AACjD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,uEAAuE;AACvE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAEhF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAgB7B,oEAAoE;AACpE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAanC,CAAC;AACH,iDAAiD;AACjD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,+GAA+G;AAC/G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAShF"}
@@ -5,7 +5,7 @@ import { AndCoInitMessageSchema } from "./init.js";
5
5
  import { AndCoIntentCompleteEventSchema, AndCoIntentDismissEventSchema, AndCoOAuthAuthorizationCodeEventSchema, AndCoOAuthCompleteEventSchema, AndCoOAuthDismissEventSchema, AndCoOAuthErrorEventSchema, } from "./popup.js";
6
6
  import { AndCoPresentationResponseMessageSchema } from "./presentation-response.js";
7
7
  import { AndCoReadyEventSchema } from "./ready.js";
8
- import { AndCoSetPreferencesMessageSchema } from "./set-preferences.js";
8
+ import { AndCoSetPreferencesMessageSchema, andCoSetPreferencesIssues } from "./set-preferences.js";
9
9
  /** Schema for every valid message sent through the AndCo bridge. */
10
10
  export const AndCoBridgeMessageSchema = /* @__PURE__ */ v.variant("type", [
11
11
  AndCoPresentationResponseMessageSchema,
@@ -21,7 +21,14 @@ export const AndCoBridgeMessageSchema = /* @__PURE__ */ v.variant("type", [
21
21
  AndCoIntentCompleteEventSchema,
22
22
  AndCoIntentDismissEventSchema,
23
23
  ]);
24
- /** Checks whether an unknown value is a valid AndCo bridge message. */
24
+ /** Checks whether an unknown value is a valid AndCo bridge message: its shape, and the rules a message has. */
25
25
  export function isAndCoBridgeMessage(input) {
26
- return v.safeParse(AndCoBridgeMessageSchema, input).success;
26
+ const parsed = v.safeParse(AndCoBridgeMessageSchema, input);
27
+ if (!parsed.success) {
28
+ return false;
29
+ }
30
+ if (parsed.output.type === "set-preferences") {
31
+ return andCoSetPreferencesIssues(parsed.output).length === 0;
32
+ }
33
+ return true;
27
34
  }
@@ -1,4 +1,5 @@
1
1
  import * as v from "valibot";
2
+ import type { Issue } from "../issues.js";
2
3
  /** Colour-scheme preference for hosted AndCo surfaces. */
3
4
  export declare const AndCoThemeModeSchema: v.PicklistSchema<["dark", "light", "system"], undefined>;
4
5
  /** Colour-scheme preference for hosted AndCo surfaces. */
@@ -7,10 +8,21 @@ export type AndCoThemeMode = v.InferOutput<typeof AndCoThemeModeSchema>;
7
8
  export declare const AndCoSetPreferencesMessageSchema: v.StrictObjectSchema<{
8
9
  readonly type: v.LiteralSchema<"set-preferences", undefined>;
9
10
  readonly themeMode: v.OptionalSchema<v.PicklistSchema<["dark", "light", "system"], undefined>, undefined>;
10
- readonly locale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.CheckAction<string, undefined>]>, undefined>;
11
+ readonly locale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.RegexAction<string, undefined>]>, undefined>;
11
12
  readonly protocol: v.LiteralSchema<"andco:sdk", undefined>;
12
13
  readonly version: v.LiteralSchema<2, undefined>;
13
14
  }, undefined>;
14
15
  /** Message used by the host to update non-authorization widget preferences. */
15
16
  export type AndCoSetPreferencesMessage = v.InferOutput<typeof AndCoSetPreferencesMessageSchema>;
17
+ /**
18
+ * The rule of a locale that its shape does not say: `Intl.getCanonicalLocales` accepts it, which
19
+ * refuses a tag with a repeated variant or an extension without content. Answers `invalid_locale`.
20
+ *
21
+ * @example
22
+ * andCoLocaleIssues("es-CL"); // []
23
+ * andCoLocaleIssues("en-US-posix-posix"); // [{ type: "invalid_locale", path: [{ key: "locale" }] }]
24
+ */
25
+ export declare function andCoLocaleIssues(locale: string | undefined): Issue[];
26
+ /** The rules of a `set-preferences` message that its shape does not say: {@link andCoLocaleIssues}. */
27
+ export declare function andCoSetPreferencesIssues(message: Pick<AndCoSetPreferencesMessage, "locale">): Issue[];
16
28
  //# sourceMappingURL=set-preferences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"set-preferences.d.ts","sourceRoot":"","sources":["../../src/messages/set-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAgB7B,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,0DAA0D,CAAC;AAC5F,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,+EAA+E;AAC/E,eAAO,MAAM,gCAAgC;;;;;;aAK3C,CAAC;AACH,+EAA+E;AAC/E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
1
+ {"version":3,"file":"set-preferences.d.ts","sourceRoot":"","sources":["../../src/messages/set-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAa1C,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,0DAA0D,CAAC;AAC5F,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,+EAA+E;AAC/E,eAAO,MAAM,gCAAgC;;;;;;aAK3C,CAAC;AACH,+EAA+E;AAC/E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEhG;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,EAAE,CAUrE;AAED,uGAAuG;AACvG,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC,GAAG,KAAK,EAAE,CAEtG"}
@@ -1,14 +1,12 @@
1
1
  import * as v from "valibot";
2
2
  import { AndCoMessageBaseEntries } from "./base.js";
3
- const AndCoLocaleSchema = /* @__PURE__ */ v.pipe(v.string(), v.maxLength(35), v.check((locale) => {
4
- try {
5
- Intl.getCanonicalLocales(locale);
6
- return true;
7
- }
8
- catch {
9
- return false;
10
- }
11
- }));
3
+ /**
4
+ * The structure of a BCP 47 language tag: a language, then optionally a script, a region, variants,
5
+ * extensions and a private use part. That the subtags are ones the platform knows is a rule
6
+ * ({@link andCoLocaleIssues}).
7
+ */
8
+ const BCP_47_PATTERN = "^[A-Za-z]{2,8}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-[A-WY-Za-wy-z0-9](-[A-Za-z0-9]{2,8})+)*(-[xX](-[A-Za-z0-9]{1,8})+)?$";
9
+ const AndCoLocaleSchema = /* @__PURE__ */ v.pipe(v.string(), v.maxLength(35), v.regex(new RegExp(BCP_47_PATTERN)));
12
10
  /** Colour-scheme preference for hosted AndCo surfaces. */
13
11
  export const AndCoThemeModeSchema = /* @__PURE__ */ v.picklist(["dark", "light", "system"]);
14
12
  /** Visual preferences that a host can update without recreating the widget. */
@@ -18,3 +16,27 @@ export const AndCoSetPreferencesMessageSchema = /* @__PURE__ */ v.strictObject({
18
16
  themeMode: v.optional(AndCoThemeModeSchema),
19
17
  locale: v.optional(AndCoLocaleSchema),
20
18
  });
19
+ /**
20
+ * The rule of a locale that its shape does not say: `Intl.getCanonicalLocales` accepts it, which
21
+ * refuses a tag with a repeated variant or an extension without content. Answers `invalid_locale`.
22
+ *
23
+ * @example
24
+ * andCoLocaleIssues("es-CL"); // []
25
+ * andCoLocaleIssues("en-US-posix-posix"); // [{ type: "invalid_locale", path: [{ key: "locale" }] }]
26
+ */
27
+ export function andCoLocaleIssues(locale) {
28
+ if (locale === undefined) {
29
+ return [];
30
+ }
31
+ try {
32
+ Intl.getCanonicalLocales(locale);
33
+ return [];
34
+ }
35
+ catch {
36
+ return [{ type: "invalid_locale", path: [{ key: "locale" }] }];
37
+ }
38
+ }
39
+ /** The rules of a `set-preferences` message that its shape does not say: {@link andCoLocaleIssues}. */
40
+ export function andCoSetPreferencesIssues(message) {
41
+ return andCoLocaleIssues(message.locale);
42
+ }
@@ -16,7 +16,7 @@ export declare const AndCoOAuthScopePolicySchema: v.ObjectSchema<{
16
16
  readonly scope: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
17
17
  readonly mode: v.PicklistSchema<["optional", "default", "required"], undefined>;
18
18
  }, undefined>;
19
- /** Public, non-secret OAuth registration returned by bank-webapp. */
19
+ /** Public, non-secret OAuth registration returned by andco-webapp. */
20
20
  export declare const AndCoOAuthClientConfigurationSchema: v.ObjectSchema<{
21
21
  readonly client_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
22
22
  readonly client_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>]>;
@@ -64,7 +64,7 @@ export declare const AndCoMiniappManifestSchema: v.ObjectSchema<{
64
64
  }, undefined>;
65
65
  /** Parsed Miniapp Descriptor consumed by Andco Host Applications. */
66
66
  export type AndCoMiniappManifest = v.InferOutput<typeof AndCoMiniappManifestSchema>;
67
- /** Public OAuth registration loaded from bank-webapp. */
67
+ /** Public OAuth registration loaded from andco-webapp. */
68
68
  export type AndCoOAuthClientConfiguration = v.InferOutput<typeof AndCoOAuthClientConfigurationSchema>;
69
69
  /** Server-authoritative permission policy used by a Host consent surface. */
70
70
  export type AndCoOAuthScopePolicy = v.InferOutput<typeof AndCoOAuthScopePolicySchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"miniapp-manifest.d.ts","sourceRoot":"","sources":["../src/miniapp-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB;;;;;aAKjC,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,uBAAuB;;;aAGlC,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B;;;aAGtC,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;aAQ9C,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;aAYrC,CAAC;AAEH,qEAAqE;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,yDAAyD;AACzD,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mCAAmC,CAAC,CAAC;AACtG,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"miniapp-manifest.d.ts","sourceRoot":"","sources":["../src/miniapp-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB;;;;;aAKjC,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,uBAAuB;;;aAGlC,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B;;;aAGtC,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;aAQ9C,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;aAYrC,CAAC;AAEH,qEAAqE;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,0DAA0D;AAC1D,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mCAAmC,CAAC,CAAC;AACtG,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -20,7 +20,7 @@ export const AndCoOAuthScopePolicySchema = /* @__PURE__ */ v.object({
20
20
  scope: v.pipe(v.string(), v.regex(ANDCO_SCOPE_REGEX)),
21
21
  mode: OAuthScopeModeSchema,
22
22
  });
23
- /** Public, non-secret OAuth registration returned by bank-webapp. */
23
+ /** Public, non-secret OAuth registration returned by andco-webapp. */
24
24
  export const AndCoOAuthClientConfigurationSchema = /* @__PURE__ */ v.object({
25
25
  client_id: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
26
26
  client_name: NonEmptyTextSchema,
@@ -1,19 +1,5 @@
1
1
  import * as v from "valibot";
2
- /**
3
- * An account at another bank, the only destination a person may still correct on a screen.
4
- *
5
- * An Andco account named by AccountKey or identifier already denotes exactly one account, so there is
6
- * nothing on the screen to correct: it is never editable.
7
- */
8
- declare const editableDestination: v.ObjectSchema<{
9
- readonly type: v.LiteralSchema<"external", undefined>;
10
- readonly bank_id: v.StringSchema<undefined>;
11
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
12
- readonly account_id: v.StringSchema<undefined>;
13
- readonly holder_id: v.StringSchema<undefined>;
14
- readonly holder_name: v.StringSchema<undefined>;
15
- readonly editable: v.BooleanSchema<undefined>;
16
- }, undefined>;
2
+ import { type Issue, type ParseResult } from "./issues.js";
17
3
  /** Authenticated Host presentation; bank commands and account ownership remain on Platform. */
18
4
  export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
19
5
  readonly intent: v.VariantSchema<"type", [v.ObjectSchema<{
@@ -91,7 +77,7 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
91
77
  }, undefined>, undefined>;
92
78
  readonly signed: v.BooleanSchema<undefined>;
93
79
  readonly interaction_reason: v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>;
94
- readonly destination: v.VariantSchema<"type", [v.ObjectSchema<{
80
+ readonly destination: v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
95
81
  readonly editable: v.LiteralSchema<false, undefined>;
96
82
  readonly type: v.LiteralSchema<"account_key", undefined>;
97
83
  readonly accountKey: v.StringSchema<undefined>;
@@ -100,14 +86,14 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
100
86
  readonly type: v.LiteralSchema<"account", undefined>;
101
87
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
102
88
  }, undefined>, v.ObjectSchema<{
89
+ readonly editable: v.LiteralSchema<false, undefined>;
103
90
  readonly type: v.LiteralSchema<"external", undefined>;
104
91
  readonly bank_id: v.StringSchema<undefined>;
105
92
  readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
106
93
  readonly account_id: v.StringSchema<undefined>;
107
94
  readonly holder_id: v.StringSchema<undefined>;
108
95
  readonly holder_name: v.StringSchema<undefined>;
109
- readonly editable: v.BooleanSchema<undefined>;
110
- }, undefined>], undefined>;
96
+ }, undefined>], undefined>, undefined>;
111
97
  readonly source: v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
112
98
  readonly type: v.LiteralSchema<"account_key", undefined>;
113
99
  readonly accountKey: v.StringSchema<undefined>;
@@ -183,16 +169,16 @@ export declare const AndCoNativeIntentCommandSchema: v.VariantSchema<"action", [
183
169
  }, undefined>, v.StrictObjectSchema<{
184
170
  readonly action: v.LiteralSchema<"confirm_transfer", undefined>;
185
171
  readonly sourceAccountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
186
- readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>;
172
+ readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
187
173
  readonly destination: v.OptionalSchema<v.StrictObjectSchema<{
188
174
  type: v.LiteralSchema<"external", undefined>;
189
175
  bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
190
176
  account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
191
177
  account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
192
178
  holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
193
- holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
179
+ holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
194
180
  }, undefined>, undefined>;
195
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
181
+ readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
196
182
  }, undefined>, v.StrictObjectSchema<{
197
183
  readonly action: v.LiteralSchema<"close_deposit", undefined>;
198
184
  }, undefined>, v.StrictObjectSchema<{
@@ -202,9 +188,30 @@ export declare const AndCoNativeIntentCommandSchema: v.VariantSchema<"action", [
202
188
  }, undefined>, v.StrictObjectSchema<{
203
189
  readonly action: v.LiteralSchema<"assign_deposit_credits", undefined>;
204
190
  readonly expectedVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>;
205
- readonly selectedMovements: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.CheckAction<string[], undefined>]>;
191
+ readonly selectedMovements: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.MetadataAction<string[], {
192
+ readonly uniqueItems: true;
193
+ }>]>;
206
194
  }, undefined>], undefined>;
207
195
  export type AndCoNativeIntentCommand = v.InferOutput<typeof AndCoNativeIntentCommandSchema>;
196
+ /**
197
+ * The rules of a command that its shape does not say: a confirmed transfer's note is at most
198
+ * `NOTE_MAX_LENGTH` code points (`note_too_long`) and its destination's holder name at most
199
+ * `HOLDER_NAME_MAX_LENGTH` (`holder_name_too_long`), and `assign_deposit_credits` selects each
200
+ * movement once (`duplicate_movement`, at the repeated entry).
201
+ *
202
+ * @example
203
+ * nativeIntentCommandIssues({ action: "assign_deposit_credits", expectedVersion: 1, selectedMovements: [id, id] });
204
+ * // [{ type: "duplicate_movement", path: [{ key: "selectedMovements" }, { key: 1 }] }]
205
+ */
206
+ export declare function nativeIntentCommandIssues(command: AndCoNativeIntentCommand): Issue[];
207
+ /**
208
+ * Parses a command the native presentation sends: its shape, and then {@link nativeIntentCommandIssues}.
209
+ *
210
+ * @example
211
+ * const parsed = parseNativeIntentCommand(await request.json());
212
+ * if (!parsed.success) return invalid(parsed.issues);
213
+ */
214
+ export declare function parseNativeIntentCommand(input: unknown): ParseResult<AndCoNativeIntentCommand>;
208
215
  /** Recognizes only the canonical Intent path, never a generic trusted-origin URL. */
209
216
  export declare function ANDCO_NATIVE_INTENT_ID(value: string | URL, bankOrigin: string | URL): string | null;
210
217
  /** Validates a presentation's callbacks against the active Miniapp, independently of the Intent's authority. */
@@ -218,7 +225,10 @@ export declare function ANDCO_NATIVE_INTENT_PRESENTATION(value: string, bankOrig
218
225
  export type AndCoNativeIntentPresentation = ReturnType<typeof ANDCO_NATIVE_INTENT_PRESENTATION>;
219
226
  /** Returns to the original document without changing the financial operation. */
220
227
  export declare function ANDCO_NATIVE_INTENT_CALLBACK(presentation: AndCoNativeIntentPresentation, result: "complete" | "dismiss"): string;
221
- /** Reads the current state or submits one explicit command; commands are never retried automatically. */
228
+ /**
229
+ * Reads the current state or submits one explicit command; commands are never retried automatically.
230
+ * The server validates the command, so a malformed one comes back as an error response.
231
+ */
222
232
  export declare function requestAndCoNativeIntent(options: {
223
233
  accessToken: string;
224
234
  bankOrigin: string;
@@ -310,14 +320,14 @@ export declare function requestAndCoNativeIntent(options: {
310
320
  type: "account";
311
321
  id: string;
312
322
  } | {
323
+ editable: false;
313
324
  type: "external";
314
325
  bank_id: string;
315
326
  account_type: "checking" | "debit" | "savings";
316
327
  account_id: string;
317
328
  holder_id: string;
318
329
  holder_name: string;
319
- editable: boolean;
320
- };
330
+ } | null;
321
331
  source: {
322
332
  type: "account_key";
323
333
  accountKey: string;
@@ -415,8 +425,19 @@ export declare function ANDCO_NATIVE_INTENT_VIEW(data: AndCoNativeIntentPreparat
415
425
  remaining: number | null;
416
426
  canSubmit: boolean;
417
427
  };
418
- /** The destination a person may still correct, which is the only one a screen may send back. */
419
- export type AndCoNativeIntentDestination = v.InferOutput<typeof editableDestination>;
428
+ /**
429
+ * Where the money lands, as the person writes it on a screen when the Intent left it to her: another
430
+ * bank's account, field by field, with every field empty until she writes it. `bank_id` is one of the
431
+ * preparation's `banks`. It is `null` in an {@link AndCoNativeIntentForm} when the Intent named its
432
+ * destination, because a named destination is shown, never edited.
433
+ */
434
+ export type AndCoNativeIntentDestination = {
435
+ bank_id: string;
436
+ account_type: "checking" | "debit" | "savings" | "";
437
+ account_id: string;
438
+ holder_id: string;
439
+ holder_name: string;
440
+ };
420
441
  /** User-edited values, separate from the durable financial state. */
421
442
  export type AndCoNativeIntentForm = {
422
443
  source: string;
@@ -440,5 +461,4 @@ export declare function ANDCO_NATIVE_DEPOSIT_CHECKLIST(intentId: string, checkli
440
461
  conflict: boolean;
441
462
  moving: boolean;
442
463
  };
443
- export {};
444
464
  //# sourceMappingURL=native-intent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-intent.d.ts","sourceRoot":"","sources":["../src/native-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAsB7B;;;;;GAKG;AACH,QAAA,MAAM,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