@ankhorage/contracts 22.2.0 → 22.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ankhorage/contracts
2
2
 
3
+ ## 22.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d31c482: Publish the canonical auth-flow structure descriptor root for descriptor-driven Studio route authoring.
8
+
9
+ ## 22.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 1125463: Publish the generated ScreenRequirements structure root with canonical set semantics for permissions and capabilities.
14
+
3
15
  ## 22.2.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/contracts
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v22.2.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v22.4.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
9
9
 
@@ -1,13 +1,70 @@
1
1
  export declare const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = "6.0.3";
2
- export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:be044f4aeb00c3790561556c7688623084944d3d85d860daedc7989ab5989cf6";
2
+ export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:6c7d63faf1de59cb1ecdd60c60a3d3c2f501b855796943745858fde61a926198";
3
3
  export declare const STRUCTURE_DESCRIPTOR: {
4
4
  readonly protocolVersion: 1;
5
5
  readonly packageName: "@ankhorage/contracts";
6
- readonly packageVersion: "22.1.2";
6
+ readonly packageVersion: "22.3.0";
7
7
  readonly roots: {
8
+ readonly "auth-flow": "AuthFlowConfig";
8
9
  readonly "screen-metadata": "ScreenMetadataSpec";
10
+ readonly "screen-requirements": "ScreenRequirements";
9
11
  };
10
12
  readonly descriptors: {
13
+ readonly AuthFlowConfig: {
14
+ readonly id: "AuthFlowConfig";
15
+ readonly descriptor: {
16
+ readonly kind: "object";
17
+ readonly fields: {
18
+ readonly forgotPasswordRoute: {
19
+ readonly value: {
20
+ readonly kind: "scalar";
21
+ readonly type: "string";
22
+ };
23
+ readonly optional: true;
24
+ };
25
+ readonly otpRoute: {
26
+ readonly value: {
27
+ readonly kind: "scalar";
28
+ readonly type: "string";
29
+ };
30
+ readonly optional: true;
31
+ };
32
+ readonly postSignInRoute: {
33
+ readonly value: {
34
+ readonly kind: "scalar";
35
+ readonly type: "string";
36
+ };
37
+ };
38
+ readonly signInRoute: {
39
+ readonly value: {
40
+ readonly kind: "scalar";
41
+ readonly type: "string";
42
+ };
43
+ };
44
+ readonly signOutRoute: {
45
+ readonly value: {
46
+ readonly kind: "scalar";
47
+ readonly type: "string";
48
+ };
49
+ readonly optional: true;
50
+ };
51
+ readonly signUpRoute: {
52
+ readonly value: {
53
+ readonly kind: "scalar";
54
+ readonly type: "string";
55
+ };
56
+ readonly optional: true;
57
+ };
58
+ readonly unauthorizedRoute: {
59
+ readonly value: {
60
+ readonly kind: "scalar";
61
+ readonly type: "string";
62
+ };
63
+ readonly optional: true;
64
+ };
65
+ };
66
+ };
67
+ };
11
68
  readonly ScreenMetadataSpec: {
12
69
  readonly id: "ScreenMetadataSpec";
13
70
  readonly descriptor: {
@@ -42,6 +99,34 @@ export declare const STRUCTURE_DESCRIPTOR: {
42
99
  };
43
100
  };
44
101
  };
102
+ readonly ScreenRequirements: {
103
+ readonly id: "ScreenRequirements";
104
+ readonly descriptor: {
105
+ readonly kind: "object";
106
+ readonly fields: {
107
+ readonly capabilities: {
108
+ readonly value: {
109
+ readonly kind: "set";
110
+ readonly member: {
111
+ readonly kind: "enum";
112
+ readonly values: readonly ["barcodeScanner", "cameraPreview", "clipboard", "ebookReader", "filePicker", "location", "mediaPicker", "notifications"];
113
+ };
114
+ };
115
+ readonly optional: true;
116
+ };
117
+ readonly permissions: {
118
+ readonly value: {
119
+ readonly kind: "set";
120
+ readonly member: {
121
+ readonly kind: "enum";
122
+ readonly values: readonly ["camera", "clipboard", "locationBackground", "locationForeground", "mediaLibrary", "mediaLibraryWrite", "microphone", "notifications"];
123
+ };
124
+ };
125
+ readonly optional: true;
126
+ };
127
+ };
128
+ };
129
+ };
45
130
  };
46
131
  };
47
132
  //# sourceMappingURL=generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qCAAqC,UAAU,CAAC;AAC7D,eAAO,MAAM,gCAAgC,4EAA4E,CAAC;AAE1H,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Ce,CAAC"}
1
+ {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qCAAqC,UAAU,CAAC;AAC7D,eAAO,MAAM,gCAAgC,4EAA4E,CAAC;AAE1H,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJe,CAAC"}
@@ -1,13 +1,70 @@
1
1
  export const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';
2
- export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:be044f4aeb00c3790561556c7688623084944d3d85d860daedc7989ab5989cf6';
2
+ export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:6c7d63faf1de59cb1ecdd60c60a3d3c2f501b855796943745858fde61a926198';
3
3
  export const STRUCTURE_DESCRIPTOR = {
4
4
  "protocolVersion": 1,
5
5
  "packageName": "@ankhorage/contracts",
6
- "packageVersion": "22.1.2",
6
+ "packageVersion": "22.3.0",
7
7
  "roots": {
8
- "screen-metadata": "ScreenMetadataSpec"
8
+ "auth-flow": "AuthFlowConfig",
9
+ "screen-metadata": "ScreenMetadataSpec",
10
+ "screen-requirements": "ScreenRequirements"
9
11
  },
10
12
  "descriptors": {
13
+ "AuthFlowConfig": {
14
+ "id": "AuthFlowConfig",
15
+ "descriptor": {
16
+ "kind": "object",
17
+ "fields": {
18
+ "forgotPasswordRoute": {
19
+ "value": {
20
+ "kind": "scalar",
21
+ "type": "string"
22
+ },
23
+ "optional": true
24
+ },
25
+ "otpRoute": {
26
+ "value": {
27
+ "kind": "scalar",
28
+ "type": "string"
29
+ },
30
+ "optional": true
31
+ },
32
+ "postSignInRoute": {
33
+ "value": {
34
+ "kind": "scalar",
35
+ "type": "string"
36
+ }
37
+ },
38
+ "signInRoute": {
39
+ "value": {
40
+ "kind": "scalar",
41
+ "type": "string"
42
+ }
43
+ },
44
+ "signOutRoute": {
45
+ "value": {
46
+ "kind": "scalar",
47
+ "type": "string"
48
+ },
49
+ "optional": true
50
+ },
51
+ "signUpRoute": {
52
+ "value": {
53
+ "kind": "scalar",
54
+ "type": "string"
55
+ },
56
+ "optional": true
57
+ },
58
+ "unauthorizedRoute": {
59
+ "value": {
60
+ "kind": "scalar",
61
+ "type": "string"
62
+ },
63
+ "optional": true
64
+ }
65
+ }
66
+ }
67
+ },
11
68
  "ScreenMetadataSpec": {
12
69
  "id": "ScreenMetadataSpec",
13
70
  "descriptor": {
@@ -41,6 +98,52 @@ export const STRUCTURE_DESCRIPTOR = {
41
98
  }
42
99
  }
43
100
  }
101
+ },
102
+ "ScreenRequirements": {
103
+ "id": "ScreenRequirements",
104
+ "descriptor": {
105
+ "kind": "object",
106
+ "fields": {
107
+ "capabilities": {
108
+ "value": {
109
+ "kind": "set",
110
+ "member": {
111
+ "kind": "enum",
112
+ "values": [
113
+ "barcodeScanner",
114
+ "cameraPreview",
115
+ "clipboard",
116
+ "ebookReader",
117
+ "filePicker",
118
+ "location",
119
+ "mediaPicker",
120
+ "notifications"
121
+ ]
122
+ }
123
+ },
124
+ "optional": true
125
+ },
126
+ "permissions": {
127
+ "value": {
128
+ "kind": "set",
129
+ "member": {
130
+ "kind": "enum",
131
+ "values": [
132
+ "camera",
133
+ "clipboard",
134
+ "locationBackground",
135
+ "locationForeground",
136
+ "mediaLibrary",
137
+ "mediaLibraryWrite",
138
+ "microphone",
139
+ "notifications"
140
+ ]
141
+ }
142
+ },
143
+ "optional": true
144
+ }
145
+ }
146
+ }
44
147
  }
45
148
  }
46
149
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qCAAqC,GAAG,OAAO,CAAC;AAC7D,MAAM,CAAC,MAAM,gCAAgC,GAAG,yEAAyE,CAAC;AAE1H,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iBAAiB,EAAE,CAAC;IACpB,aAAa,EAAE,sBAAsB;IACrC,gBAAgB,EAAE,QAAQ;IAC1B,OAAO,EAAE;QACP,iBAAiB,EAAE,oBAAoB;KACxC;IACD,aAAa,EAAE;QACb,oBAAoB,EAAE;YACpB,IAAI,EAAE,oBAAoB;YAC1B,YAAY,EAAE;gBACZ,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE;oBACR,aAAa,EAAE;wBACb,OAAO,EAAE;4BACP,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;yBACjB;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,IAAI,EAAE;wBACJ,OAAO,EAAE;4BACP,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;yBACjB;qBACF;oBACD,MAAM,EAAE;wBACN,OAAO,EAAE;4BACP,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;yBACjB;qBACF;oBACD,OAAO,EAAE;wBACP,OAAO,EAAE;4BACP,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;yBACjB;wBACD,UAAU,EAAE,IAAI;qBACjB;iBACF;aACF;SACF;KACF;CAC6C,CAAC","sourcesContent":["/* This file is generated by @ankhorage/devtools. Do not edit manually. */\nimport type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';\n\nexport const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';\nexport const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:be044f4aeb00c3790561556c7688623084944d3d85d860daedc7989ab5989cf6';\n\nexport const STRUCTURE_DESCRIPTOR = {\n \"protocolVersion\": 1,\n \"packageName\": \"@ankhorage/contracts\",\n \"packageVersion\": \"22.1.2\",\n \"roots\": {\n \"screen-metadata\": \"ScreenMetadataSpec\"\n },\n \"descriptors\": {\n \"ScreenMetadataSpec\": {\n \"id\": \"ScreenMetadataSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"description\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n }\n }\n} as const satisfies StructureDescriptorDocument;\n"]}
1
+ {"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"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","sourcesContent":["/* This file is generated by @ankhorage/devtools. Do not edit manually. */\nimport type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';\n\nexport const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';\nexport const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:6c7d63faf1de59cb1ecdd60c60a3d3c2f501b855796943745858fde61a926198';\n\nexport const STRUCTURE_DESCRIPTOR = {\n \"protocolVersion\": 1,\n \"packageName\": \"@ankhorage/contracts\",\n \"packageVersion\": \"22.3.0\",\n \"roots\": {\n \"auth-flow\": \"AuthFlowConfig\",\n \"screen-metadata\": \"ScreenMetadataSpec\",\n \"screen-requirements\": \"ScreenRequirements\"\n },\n \"descriptors\": {\n \"AuthFlowConfig\": {\n \"id\": \"AuthFlowConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"forgotPasswordRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"otpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"postSignInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signOutRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"signUpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"unauthorizedRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenMetadataSpec\": {\n \"id\": \"ScreenMetadataSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"description\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenRequirements\": {\n \"id\": \"ScreenRequirements\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"capabilities\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"barcodeScanner\",\n \"cameraPreview\",\n \"clipboard\",\n \"ebookReader\",\n \"filePicker\",\n \"location\",\n \"mediaPicker\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n },\n \"permissions\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"camera\",\n \"clipboard\",\n \"locationBackground\",\n \"locationForeground\",\n \"mediaLibrary\",\n \"mediaLibraryWrite\",\n \"microphone\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n }\n }\n }\n }\n }\n} as const satisfies StructureDescriptorDocument;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
- "version": "22.2.0",
3
+ "version": "22.4.0",
4
4
  "main": "./dist/index.js",
5
5
  "ankh": {
6
6
  "category": "contracts",
@@ -11,9 +11,17 @@
11
11
  "structure": {
12
12
  "output": "src/structure/generated.ts",
13
13
  "roots": {
14
+ "auth-flow": {
15
+ "source": "src/auth.ts",
16
+ "export": "AuthFlowConfig"
17
+ },
14
18
  "screen-metadata": {
15
19
  "source": "src/types.ts",
16
20
  "export": "ScreenMetadataSpec"
21
+ },
22
+ "screen-requirements": {
23
+ "source": "src/requirements.ts",
24
+ "export": "ScreenRequirements"
17
25
  }
18
26
  }
19
27
  }
@@ -23,7 +31,7 @@
23
31
  "@ankhorage/utility": "^1.4.0"
24
32
  },
25
33
  "devDependencies": {
26
- "@ankhorage/devtools": "^1.18.4",
34
+ "@ankhorage/devtools": "^1.18.5",
27
35
  "@ankhorage/paradox": "^0.1.26",
28
36
  "@types/bun": "^1.4.1",
29
37
  "@types/node": "^25.2.3",
@@ -0,0 +1,38 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import { STRUCTURE_DESCRIPTOR } from './structure';
4
+
5
+ test('publishes AuthFlowConfig route semantics from the generated owner document', () => {
6
+ expect(STRUCTURE_DESCRIPTOR.roots['auth-flow']).toBe('AuthFlowConfig');
7
+ expect(STRUCTURE_DESCRIPTOR.descriptors.AuthFlowConfig.descriptor).toEqual({
8
+ kind: 'object',
9
+ fields: {
10
+ forgotPasswordRoute: {
11
+ value: { kind: 'scalar', type: 'string' },
12
+ optional: true,
13
+ },
14
+ otpRoute: {
15
+ value: { kind: 'scalar', type: 'string' },
16
+ optional: true,
17
+ },
18
+ postSignInRoute: {
19
+ value: { kind: 'scalar', type: 'string' },
20
+ },
21
+ signInRoute: {
22
+ value: { kind: 'scalar', type: 'string' },
23
+ },
24
+ signOutRoute: {
25
+ value: { kind: 'scalar', type: 'string' },
26
+ optional: true,
27
+ },
28
+ signUpRoute: {
29
+ value: { kind: 'scalar', type: 'string' },
30
+ optional: true,
31
+ },
32
+ unauthorizedRoute: {
33
+ value: { kind: 'scalar', type: 'string' },
34
+ optional: true,
35
+ },
36
+ },
37
+ });
38
+ });
@@ -62,10 +62,18 @@ describe('contracts', () => {
62
62
  structure: {
63
63
  output: 'src/structure/generated.ts',
64
64
  roots: {
65
+ 'auth-flow': {
66
+ source: 'src/auth.ts',
67
+ export: 'AuthFlowConfig',
68
+ },
65
69
  'screen-metadata': {
66
70
  source: 'src/types.ts',
67
71
  export: 'ScreenMetadataSpec',
68
72
  },
73
+ 'screen-requirements': {
74
+ source: 'src/requirements.ts',
75
+ export: 'ScreenRequirements',
76
+ },
69
77
  },
70
78
  },
71
79
  } as const satisfies AnkhPackageMetadata;
@@ -0,0 +1,50 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import { STRUCTURE_DESCRIPTOR } from './structure';
4
+
5
+ test('publishes ScreenRequirements set semantics from the generated owner document', () => {
6
+ expect(STRUCTURE_DESCRIPTOR.roots['screen-requirements']).toBe('ScreenRequirements');
7
+ expect(STRUCTURE_DESCRIPTOR.descriptors.ScreenRequirements.descriptor).toEqual({
8
+ kind: 'object',
9
+ fields: {
10
+ capabilities: {
11
+ value: {
12
+ kind: 'set',
13
+ member: {
14
+ kind: 'enum',
15
+ values: [
16
+ 'barcodeScanner',
17
+ 'cameraPreview',
18
+ 'clipboard',
19
+ 'ebookReader',
20
+ 'filePicker',
21
+ 'location',
22
+ 'mediaPicker',
23
+ 'notifications',
24
+ ],
25
+ },
26
+ },
27
+ optional: true,
28
+ },
29
+ permissions: {
30
+ value: {
31
+ kind: 'set',
32
+ member: {
33
+ kind: 'enum',
34
+ values: [
35
+ 'camera',
36
+ 'clipboard',
37
+ 'locationBackground',
38
+ 'locationForeground',
39
+ 'mediaLibrary',
40
+ 'mediaLibraryWrite',
41
+ 'microphone',
42
+ 'notifications',
43
+ ],
44
+ },
45
+ },
46
+ optional: true,
47
+ },
48
+ },
49
+ });
50
+ });
@@ -2,16 +2,73 @@
2
2
  import type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';
3
3
 
4
4
  export const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';
5
- export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:b0afb6c562efc3e866bcb65467aaa4ba673cd631f09fdbe9cb94f3324e852e66';
5
+ export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:f6a99b95cba4bd58a24107d995844df7e9c1713ce87118f4ae16e033c9e24936';
6
6
 
7
7
  export const STRUCTURE_DESCRIPTOR = {
8
8
  "protocolVersion": 1,
9
9
  "packageName": "@ankhorage/contracts",
10
- "packageVersion": "22.2.0",
10
+ "packageVersion": "22.4.0",
11
11
  "roots": {
12
- "screen-metadata": "ScreenMetadataSpec"
12
+ "auth-flow": "AuthFlowConfig",
13
+ "screen-metadata": "ScreenMetadataSpec",
14
+ "screen-requirements": "ScreenRequirements"
13
15
  },
14
16
  "descriptors": {
17
+ "AuthFlowConfig": {
18
+ "id": "AuthFlowConfig",
19
+ "descriptor": {
20
+ "kind": "object",
21
+ "fields": {
22
+ "forgotPasswordRoute": {
23
+ "value": {
24
+ "kind": "scalar",
25
+ "type": "string"
26
+ },
27
+ "optional": true
28
+ },
29
+ "otpRoute": {
30
+ "value": {
31
+ "kind": "scalar",
32
+ "type": "string"
33
+ },
34
+ "optional": true
35
+ },
36
+ "postSignInRoute": {
37
+ "value": {
38
+ "kind": "scalar",
39
+ "type": "string"
40
+ }
41
+ },
42
+ "signInRoute": {
43
+ "value": {
44
+ "kind": "scalar",
45
+ "type": "string"
46
+ }
47
+ },
48
+ "signOutRoute": {
49
+ "value": {
50
+ "kind": "scalar",
51
+ "type": "string"
52
+ },
53
+ "optional": true
54
+ },
55
+ "signUpRoute": {
56
+ "value": {
57
+ "kind": "scalar",
58
+ "type": "string"
59
+ },
60
+ "optional": true
61
+ },
62
+ "unauthorizedRoute": {
63
+ "value": {
64
+ "kind": "scalar",
65
+ "type": "string"
66
+ },
67
+ "optional": true
68
+ }
69
+ }
70
+ }
71
+ },
15
72
  "ScreenMetadataSpec": {
16
73
  "id": "ScreenMetadataSpec",
17
74
  "descriptor": {
@@ -45,6 +102,52 @@ export const STRUCTURE_DESCRIPTOR = {
45
102
  }
46
103
  }
47
104
  }
105
+ },
106
+ "ScreenRequirements": {
107
+ "id": "ScreenRequirements",
108
+ "descriptor": {
109
+ "kind": "object",
110
+ "fields": {
111
+ "capabilities": {
112
+ "value": {
113
+ "kind": "set",
114
+ "member": {
115
+ "kind": "enum",
116
+ "values": [
117
+ "barcodeScanner",
118
+ "cameraPreview",
119
+ "clipboard",
120
+ "ebookReader",
121
+ "filePicker",
122
+ "location",
123
+ "mediaPicker",
124
+ "notifications"
125
+ ]
126
+ }
127
+ },
128
+ "optional": true
129
+ },
130
+ "permissions": {
131
+ "value": {
132
+ "kind": "set",
133
+ "member": {
134
+ "kind": "enum",
135
+ "values": [
136
+ "camera",
137
+ "clipboard",
138
+ "locationBackground",
139
+ "locationForeground",
140
+ "mediaLibrary",
141
+ "mediaLibraryWrite",
142
+ "microphone",
143
+ "notifications"
144
+ ]
145
+ }
146
+ },
147
+ "optional": true
148
+ }
149
+ }
150
+ }
48
151
  }
49
152
  }
50
153
  } as const satisfies StructureDescriptorDocument;