adapty 0.8.9 → 0.9.1

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 (205) hide show
  1. package/README.md +147 -2
  2. package/dist/cli/base/adapty/adapty-command.d.ts +3 -2
  3. package/dist/cli/base/adapty/adapty-command.js +8 -5
  4. package/dist/cli/base/adapty/build.d.ts +6 -1
  5. package/dist/cli/base/adapty/build.js +1 -0
  6. package/dist/cli/base/adapty/index.d.ts +1 -0
  7. package/dist/cli/base/adapty/index.js +1 -0
  8. package/dist/cli/base/adapty/migration-command.d.ts +11 -0
  9. package/dist/cli/base/adapty/migration-command.js +17 -0
  10. package/dist/cli/base/base-command.d.ts +6 -0
  11. package/dist/cli/base/base-command.js +14 -0
  12. package/dist/cli/commands/apps/create.d.ts +1 -1
  13. package/dist/cli/commands/apps/get.js +1 -1
  14. package/dist/cli/commands/apps/list.js +1 -1
  15. package/dist/cli/commands/apps/update.js +1 -1
  16. package/dist/cli/commands/attribution/report/command.d.ts +18 -0
  17. package/dist/cli/commands/attribution/report/command.js +93 -0
  18. package/dist/cli/commands/attribution/report/index.d.ts +1 -18
  19. package/dist/cli/commands/attribution/report/index.js +1 -93
  20. package/dist/cli/commands/attribution/values.js +1 -1
  21. package/dist/cli/commands/auth/login.js +3 -2
  22. package/dist/cli/commands/auth/{logout.d.ts → logout/command.d.ts} +1 -1
  23. package/dist/cli/commands/auth/logout/command.js +33 -0
  24. package/dist/cli/commands/auth/logout/index.d.ts +1 -0
  25. package/dist/cli/commands/auth/logout/index.js +1 -0
  26. package/dist/cli/commands/auth/logout/lib/cleanup.d.ts +3 -0
  27. package/dist/cli/commands/auth/logout/lib/cleanup.js +21 -0
  28. package/dist/cli/commands/auth/{revoke.d.ts → revoke/command.d.ts} +1 -1
  29. package/dist/cli/commands/auth/{revoke.js → revoke/command.js} +7 -7
  30. package/dist/cli/commands/auth/revoke/index.d.ts +1 -0
  31. package/dist/cli/commands/auth/revoke/index.js +1 -0
  32. package/dist/cli/commands/auth/revoke/lib/cleanup.d.ts +4 -0
  33. package/dist/cli/commands/auth/revoke/lib/cleanup.js +29 -0
  34. package/dist/cli/commands/auth/status/command.d.ts +7 -0
  35. package/dist/cli/commands/auth/status/command.js +23 -0
  36. package/dist/cli/commands/auth/status/index.d.ts +1 -7
  37. package/dist/cli/commands/auth/status/index.js +1 -22
  38. package/dist/cli/commands/auth/status/lib/render.js +3 -0
  39. package/dist/cli/commands/auth/status/lib/result.d.ts +1 -0
  40. package/dist/cli/commands/migrations/close/command.d.ts +16 -0
  41. package/dist/cli/commands/migrations/close/command.js +58 -0
  42. package/dist/cli/commands/migrations/close/index.d.ts +1 -0
  43. package/dist/cli/commands/migrations/close/index.js +1 -0
  44. package/dist/cli/commands/migrations/create/command.d.ts +20 -0
  45. package/dist/cli/commands/migrations/create/command.js +86 -0
  46. package/dist/cli/commands/migrations/create/index.d.ts +1 -0
  47. package/dist/cli/commands/migrations/create/index.js +1 -0
  48. package/dist/cli/commands/migrations/current/command.d.ts +12 -0
  49. package/dist/cli/commands/migrations/current/command.js +25 -0
  50. package/dist/cli/commands/migrations/current/index.d.ts +1 -0
  51. package/dist/cli/commands/migrations/current/index.js +1 -0
  52. package/dist/cli/commands/migrations/list/command.d.ts +11 -0
  53. package/dist/cli/commands/migrations/list/command.js +27 -0
  54. package/dist/cli/commands/migrations/list/index.d.ts +1 -0
  55. package/dist/cli/commands/migrations/list/index.js +1 -0
  56. package/dist/cli/commands/migrations/list/lib/render.d.ts +3 -0
  57. package/dist/cli/commands/migrations/list/lib/render.js +77 -0
  58. package/dist/cli/commands/migrations/run/command.d.ts +25 -0
  59. package/dist/cli/commands/migrations/run/command.js +141 -0
  60. package/dist/cli/commands/migrations/run/index.d.ts +1 -0
  61. package/dist/cli/commands/migrations/run/index.js +1 -0
  62. package/dist/cli/commands/migrations/run/lib/action-view.d.ts +7 -0
  63. package/dist/cli/commands/migrations/run/lib/action-view.js +2 -0
  64. package/dist/cli/commands/migrations/run/lib/actions.d.ts +4 -0
  65. package/dist/cli/commands/migrations/run/lib/actions.js +20 -0
  66. package/dist/cli/commands/migrations/run/lib/https.d.ts +1 -0
  67. package/dist/cli/commands/migrations/run/lib/https.js +8 -0
  68. package/dist/cli/commands/migrations/run/lib/input.d.ts +10 -0
  69. package/dist/cli/commands/migrations/run/lib/input.js +51 -0
  70. package/dist/cli/commands/migrations/run/lib/open-link.d.ts +7 -0
  71. package/dist/cli/commands/migrations/run/lib/open-link.js +11 -0
  72. package/dist/cli/commands/migrations/show/command.d.ts +17 -0
  73. package/dist/cli/commands/migrations/show/command.js +47 -0
  74. package/dist/cli/commands/migrations/show/index.d.ts +1 -0
  75. package/dist/cli/commands/migrations/show/index.js +1 -0
  76. package/dist/cli/commands/migrations/show/lib/render.d.ts +4 -0
  77. package/dist/cli/commands/migrations/show/lib/render.js +27 -0
  78. package/dist/cli/commands/migrations/status/command.d.ts +18 -0
  79. package/dist/cli/commands/migrations/status/command.js +54 -0
  80. package/dist/cli/commands/migrations/status/index.d.ts +1 -0
  81. package/dist/cli/commands/migrations/status/index.js +1 -0
  82. package/dist/cli/commands/migrations/status/lib/flags.d.ts +8 -0
  83. package/dist/cli/commands/migrations/status/lib/flags.js +29 -0
  84. package/dist/cli/commands/migrations/status/lib/notice.d.ts +3 -0
  85. package/dist/cli/commands/migrations/status/lib/notice.js +10 -0
  86. package/dist/cli/commands/migrations/steps/command.d.ts +14 -0
  87. package/dist/cli/commands/migrations/steps/command.js +34 -0
  88. package/dist/cli/commands/migrations/steps/index.d.ts +1 -0
  89. package/dist/cli/commands/migrations/steps/index.js +1 -0
  90. package/dist/cli/commands/migrations/steps/lib/render.d.ts +3 -0
  91. package/dist/cli/commands/migrations/steps/lib/render.js +28 -0
  92. package/dist/cli/commands/migrations/unuse/command.d.ts +11 -0
  93. package/dist/cli/commands/migrations/unuse/command.js +23 -0
  94. package/dist/cli/commands/migrations/unuse/index.d.ts +1 -0
  95. package/dist/cli/commands/migrations/unuse/index.js +1 -0
  96. package/dist/cli/commands/migrations/use/command.d.ts +14 -0
  97. package/dist/cli/commands/migrations/use/command.js +24 -0
  98. package/dist/cli/commands/migrations/use/index.d.ts +1 -0
  99. package/dist/cli/commands/migrations/use/index.js +1 -0
  100. package/dist/cli/context/migration/current.d.ts +32 -0
  101. package/dist/cli/context/migration/current.js +30 -0
  102. package/dist/cli/context/migration/index.d.ts +4 -0
  103. package/dist/cli/context/migration/index.js +2 -0
  104. package/dist/cli/context/migration/model.d.ts +14 -0
  105. package/dist/cli/context/migration/model.js +30 -0
  106. package/dist/cli/context/migration/resolve.d.ts +16 -0
  107. package/dist/cli/context/migration/resolve.js +26 -0
  108. package/dist/cli/context/migration/store.d.ts +9 -0
  109. package/dist/cli/context/migration/store.js +99 -0
  110. package/dist/cli/errors/wizard.d.ts +5 -0
  111. package/dist/cli/errors/wizard.js +54 -0
  112. package/dist/cli/errors.d.ts +37 -4
  113. package/dist/cli/errors.js +58 -4
  114. package/dist/cli/input/app.d.ts +8 -0
  115. package/dist/cli/{flags.js → input/app.js} +2 -9
  116. package/dist/cli/input/migration.d.ts +7 -0
  117. package/dist/cli/input/migration.js +17 -0
  118. package/dist/cli/input/pagination.d.ts +11 -0
  119. package/dist/cli/input/pagination.js +8 -0
  120. package/dist/cli/views/migrations/envelope/action-block.d.ts +2 -0
  121. package/dist/cli/views/migrations/envelope/action-block.js +32 -0
  122. package/dist/cli/views/migrations/envelope/envelope.d.ts +3 -0
  123. package/dist/cli/views/migrations/envelope/envelope.js +40 -0
  124. package/dist/cli/views/migrations/envelope/issue-block.d.ts +2 -0
  125. package/dist/cli/views/migrations/envelope/issue-block.js +13 -0
  126. package/dist/cli/views/migrations/notices.d.ts +7 -0
  127. package/dist/cli/views/migrations/notices.js +7 -0
  128. package/dist/commands/access-levels/create.js +1 -1
  129. package/dist/commands/access-levels/get.js +1 -1
  130. package/dist/commands/access-levels/list.js +1 -1
  131. package/dist/commands/access-levels/update.js +1 -1
  132. package/dist/commands/auth/logout.d.ts +1 -1
  133. package/dist/commands/auth/logout.js +1 -1
  134. package/dist/commands/auth/revoke.d.ts +1 -1
  135. package/dist/commands/auth/revoke.js +1 -1
  136. package/dist/commands/flows/config/get.js +1 -1
  137. package/dist/commands/flows/config/update.js +1 -1
  138. package/dist/commands/flows/config/validate.js +1 -1
  139. package/dist/commands/flows/create.js +1 -1
  140. package/dist/commands/flows/get.js +1 -1
  141. package/dist/commands/flows/list.js +1 -1
  142. package/dist/commands/flows/media/upload.js +1 -1
  143. package/dist/commands/flows/publish.js +1 -1
  144. package/dist/commands/flows/update.js +1 -1
  145. package/dist/commands/migrations/close.d.ts +1 -0
  146. package/dist/commands/migrations/close.js +2 -0
  147. package/dist/commands/migrations/create.d.ts +1 -0
  148. package/dist/commands/migrations/create.js +2 -0
  149. package/dist/commands/migrations/current.d.ts +1 -0
  150. package/dist/commands/migrations/current.js +1 -0
  151. package/dist/commands/migrations/list.d.ts +1 -0
  152. package/dist/commands/migrations/list.js +2 -0
  153. package/dist/commands/migrations/run.d.ts +1 -0
  154. package/dist/commands/migrations/run.js +2 -0
  155. package/dist/commands/migrations/show.d.ts +1 -0
  156. package/dist/commands/migrations/show.js +2 -0
  157. package/dist/commands/migrations/status.d.ts +1 -0
  158. package/dist/commands/migrations/status.js +2 -0
  159. package/dist/commands/migrations/steps.d.ts +1 -0
  160. package/dist/commands/migrations/steps.js +2 -0
  161. package/dist/commands/migrations/unuse.d.ts +1 -0
  162. package/dist/commands/migrations/unuse.js +1 -0
  163. package/dist/commands/migrations/use.d.ts +1 -0
  164. package/dist/commands/migrations/use.js +1 -0
  165. package/dist/commands/paywalls/create.js +1 -1
  166. package/dist/commands/paywalls/get.js +1 -1
  167. package/dist/commands/paywalls/list.js +1 -1
  168. package/dist/commands/paywalls/placements.js +1 -1
  169. package/dist/commands/paywalls/update.js +1 -1
  170. package/dist/commands/placements/create.js +1 -1
  171. package/dist/commands/placements/get.js +1 -1
  172. package/dist/commands/placements/list.js +1 -1
  173. package/dist/commands/placements/update.js +1 -1
  174. package/dist/commands/products/create.js +1 -1
  175. package/dist/commands/products/get.js +1 -1
  176. package/dist/commands/products/list.js +1 -1
  177. package/dist/commands/products/update.js +1 -1
  178. package/dist/commands/segments/get.js +1 -1
  179. package/dist/commands/segments/list.js +1 -1
  180. package/dist/lib/config.d.ts +1 -1
  181. package/dist/sdk/adapty/auth/model.d.ts +0 -1
  182. package/dist/sdk/adapty/errors.d.ts +4 -0
  183. package/dist/sdk/adapty/errors.js +25 -0
  184. package/dist/sdk/adapty/index.d.ts +5 -0
  185. package/dist/sdk/adapty/index.js +29 -3
  186. package/dist/sdk/adapty/migrations/action.d.ts +15 -0
  187. package/dist/sdk/adapty/migrations/action.js +17 -0
  188. package/dist/sdk/adapty/migrations/close.d.ts +16 -0
  189. package/dist/sdk/adapty/migrations/close.js +7 -0
  190. package/dist/sdk/adapty/migrations/create.d.ts +16 -0
  191. package/dist/sdk/adapty/migrations/create.js +43 -0
  192. package/dist/sdk/adapty/migrations/index.d.ts +9 -0
  193. package/dist/sdk/adapty/migrations/index.js +4 -0
  194. package/dist/sdk/adapty/migrations/model.d.ts +100 -0
  195. package/dist/sdk/adapty/migrations/model.js +1 -0
  196. package/dist/sdk/adapty/migrations/resource.d.ts +27 -0
  197. package/dist/sdk/adapty/migrations/resource.js +52 -0
  198. package/dist/sdk/adapty/migrations/wait.d.ts +6 -0
  199. package/dist/sdk/adapty/migrations/wait.js +9 -0
  200. package/dist/sdk/core/session.d.ts +1 -1
  201. package/dist/sdk/core/session.js +4 -3
  202. package/oclif.manifest.json +1002 -397
  203. package/package.json +4 -1
  204. package/dist/cli/commands/auth/logout.js +0 -28
  205. package/dist/cli/flags.d.ts +0 -20
@@ -0,0 +1,8 @@
1
+ /** Spread into a command: `static args = { ...appIdArg }`. Texts kept as published. */
2
+ export declare const appIdArg: {
3
+ app_id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
4
+ };
5
+ /** `appIdArg` as a flag: `static flags = { ...appIdFlag }`. Texts kept as the published `--app`. */
6
+ export declare const appIdFlag: {
7
+ app: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ };
@@ -1,9 +1,9 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
- import { usageError } from './errors.js';
2
+ import { usageError } from '../errors.js';
3
3
  const UUID_PATTERN = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/i;
4
4
  /** The published wording of both the `app_id` arg and the `--app` flag. */
5
5
  const APP_ID_HINT = 'Invalid app ID format. Run `adapty apps list` to find your app ID.';
6
- export const isUuid = (value) => UUID_PATTERN.test(value);
6
+ const isUuid = (value) => UUID_PATTERN.test(value);
7
7
  /**
8
8
  * Checking the shape of a value is the parser's job, so a run() never starts with one. oclif turns
9
9
  * a *flag* parser's failure into exit 2 itself but passes an *arg* parser's error through, hence
@@ -28,10 +28,3 @@ export const appIdFlag = {
28
28
  required: true,
29
29
  }),
30
30
  };
31
- /** The published defaults, so a migrated `list` asks for the same page as an untouched one. */
32
- export const paginationFlags = {
33
- 'page': Flags.integer({ default: 1, description: 'Page number', min: 1 }),
34
- 'page-size': Flags.integer({ default: 20, description: 'Items per page (max 100)', max: 100, min: 1 }),
35
- };
36
- /** The one place where flag names meet sdk field names. */
37
- export const pageParams = (flags) => ({ page: flags.page, pageSize: flags['page-size'] });
@@ -0,0 +1,7 @@
1
+ export declare const migrationArgs: {
2
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
3
+ };
4
+ /** Explicit ID wins over the environment and the saved selection, resolved after parsing. */
5
+ export declare const migrationFlags: {
6
+ migration: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ };
@@ -0,0 +1,17 @@
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { validateMigrationId } from '../context/migration/index.js';
3
+ export const migrationArgs = {
4
+ id: Args.string({
5
+ description: 'Migration ID from `adapty migrations list`',
6
+ required: true,
7
+ parse: value => Promise.resolve(validateMigrationId(value)),
8
+ }),
9
+ };
10
+ /** Explicit ID wins over the environment and the saved selection, resolved after parsing. */
11
+ export const migrationFlags = {
12
+ migration: Flags.string({
13
+ char: 'm',
14
+ description: 'Migration ID; overrides ADAPTY_MIGRATION and the saved selection from migrations use/create',
15
+ helpValue: 'ID',
16
+ }),
17
+ };
@@ -0,0 +1,11 @@
1
+ import type { PageParams } from '../../sdk/adapty/index.js';
2
+ /** The published defaults, so a migrated `list` asks for the same page as an untouched one. */
3
+ export declare const paginationFlags: {
4
+ page: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
5
+ 'page-size': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
6
+ };
7
+ /** The one place where flag names meet sdk field names. */
8
+ export declare const pageParams: (flags: {
9
+ "page": number;
10
+ "page-size": number;
11
+ }) => PageParams;
@@ -0,0 +1,8 @@
1
+ import { Flags } from '@oclif/core';
2
+ /** The published defaults, so a migrated `list` asks for the same page as an untouched one. */
3
+ export const paginationFlags = {
4
+ 'page': Flags.integer({ default: 1, description: 'Page number', min: 1 }),
5
+ 'page-size': Flags.integer({ default: 20, description: 'Items per page (max 100)', max: 100, min: 1 }),
6
+ };
7
+ /** The one place where flag names meet sdk field names. */
8
+ export const pageParams = (flags) => ({ page: flags.page, pageSize: flags['page-size'] });
@@ -0,0 +1,2 @@
1
+ import type { Action } from '../../../../sdk/adapty/index.js';
2
+ export declare const actionBlock: (action: Action, migrationId: string) => string[];
@@ -0,0 +1,32 @@
1
+ const knownKinds = new Set(['external', 'input', 'upload']);
2
+ const indent = (text, pad) => {
3
+ return text.split('\n').map(line => `${pad}${line}`).join('\n');
4
+ };
5
+ export const actionBlock = (action, migrationId) => {
6
+ const lines = [` ${action.action_id} (${action.kind}) ${action.title}`];
7
+ const href = 'href' in action ? action.href : undefined;
8
+ if (action.detail !== null) {
9
+ lines.push(indent(action.detail, ' '));
10
+ }
11
+ if (href !== undefined) {
12
+ lines.push(` ${href}`);
13
+ }
14
+ if (action.reads.length > 0) {
15
+ const commands = action.reads.map(name => `adapty migrations show ${name} -m ${migrationId}`);
16
+ lines.push(` Read first: ${commands.join(', ')}`);
17
+ }
18
+ if (action.confirm !== null) {
19
+ lines.push(' Confirmation:', indent(action.confirm, ' '));
20
+ if (action.kind === 'input') {
21
+ lines.push(' Review this text before passing --yes.');
22
+ }
23
+ }
24
+ if (action.kind === 'upload') {
25
+ lines.push(' File uploads are not supported by this CLI.');
26
+ lines.push(' Use the dashboard or an offered Cloud Export action.');
27
+ }
28
+ if (!knownKinds.has(action.kind)) {
29
+ lines.push(' This action needs a newer adapty-cli');
30
+ }
31
+ return lines;
32
+ };
@@ -0,0 +1,3 @@
1
+ import type { Envelope } from '../../../../sdk/adapty/index.js';
2
+ /** Preserve server wording so new steps and actions need no CLI update. */
3
+ export declare const renderEnvelope: (envelope: Envelope) => string;
@@ -0,0 +1,40 @@
1
+ import { actionBlock } from './action-block.js';
2
+ import { issueBlock } from './issue-block.js';
3
+ const knownStates = new Set([
4
+ 'running', 'action_required', 'completed', 'failed', 'canceled',
5
+ ]);
6
+ const appLine = (app) => {
7
+ return app === null ? 'App: not created yet' : `App: ${app.name} (${app.id})`;
8
+ };
9
+ const progressLine = (progress) => {
10
+ const done = progress.total === null ? String(progress.done) : `${progress.done} of ${progress.total}`;
11
+ return `Progress: ${done} ${progress.unit}`;
12
+ };
13
+ /** Preserve server wording so new steps and actions need no CLI update. */
14
+ export const renderEnvelope = (envelope) => {
15
+ const { migration } = envelope;
16
+ const lines = [
17
+ `${migration.id} ${migration.flow} ${migration.state}`,
18
+ appLine(migration.app),
19
+ migration.summary,
20
+ ];
21
+ if (!knownStates.has(migration.state)) {
22
+ lines.push('This migration state needs a newer adapty-cli');
23
+ }
24
+ if (migration.progress !== null) {
25
+ lines.push(progressLine(migration.progress));
26
+ }
27
+ if (envelope.issues.length > 0) {
28
+ lines.push('', 'Issues:', ...envelope.issues.flatMap(issue => issueBlock(issue, migration.id)));
29
+ }
30
+ if (envelope.next_actions.length > 0) {
31
+ lines.push('', 'Do next:', ...envelope.next_actions.flatMap(action => actionBlock(action, migration.id)));
32
+ }
33
+ if (envelope.available_actions.length > 0) {
34
+ lines.push('', 'Also available:', ...envelope.available_actions.flatMap(action => actionBlock(action, migration.id)));
35
+ }
36
+ if (envelope.resources.length > 0) {
37
+ lines.push('', `Readable now: ${envelope.resources.map(resource => resource.name).join(', ')}`);
38
+ }
39
+ return lines.join('\n');
40
+ };
@@ -0,0 +1,2 @@
1
+ import type { Issue } from '../../../../sdk/adapty/index.js';
2
+ export declare const issueBlock: (issue: Issue, migrationId: string) => string[];
@@ -0,0 +1,13 @@
1
+ const indent = (text, pad) => {
2
+ return text.split('\n').map(line => `${pad}${line}`).join('\n');
3
+ };
4
+ export const issueBlock = (issue, migrationId) => {
5
+ const lines = [` ${issue.title} (${issue.code})`];
6
+ if (issue.detail !== null) {
7
+ lines.push(indent(issue.detail, ' '));
8
+ }
9
+ if (issue.action_id !== null) {
10
+ lines.push(` Fix with: adapty migrations run ${issue.action_id} -m ${migrationId}`);
11
+ }
12
+ return lines;
13
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * ADAPTY_MIGRATION outlives both a save and a clear, so "saved" or "cleared" alone would be a lie.
3
+ * Commands write these to stderr rather than through `warn()`, which oclif silences under --json:
4
+ * a selection that is not in effect is exactly what a script has to be told about.
5
+ */
6
+ export declare const envOverridesSelection = "Warning: ADAPTY_MIGRATION still overrides the saved selection. Unset it in your shell to use this ID.\n";
7
+ export declare const envSuppliesMigration = "Warning: ADAPTY_MIGRATION still supplies a migration ID. Unset it in your shell.\n";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * ADAPTY_MIGRATION outlives both a save and a clear, so "saved" or "cleared" alone would be a lie.
3
+ * Commands write these to stderr rather than through `warn()`, which oclif silences under --json:
4
+ * a selection that is not in effect is exactly what a script has to be told about.
5
+ */
6
+ export const envOverridesSelection = 'Warning: ADAPTY_MIGRATION still overrides the saved selection. Unset it in your shell to use this ID.\n';
7
+ export const envSuppliesMigration = 'Warning: ADAPTY_MIGRATION still supplies a migration ID. Unset it in your shell.\n';
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { printResponse } from '../../lib/output.js';
5
5
  export default class AccessLevelsCreate extends Command {
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { paginationFlags, paginationParams } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1 +1 @@
1
- export { default } from '../../cli/commands/auth/logout.js';
1
+ export { default } from '../../cli/commands/auth/logout/index.js';
@@ -1,2 +1,2 @@
1
1
  // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
- export { default } from '../../cli/commands/auth/logout.js';
2
+ export { default } from '../../cli/commands/auth/logout/index.js';
@@ -1 +1 @@
1
- export { default } from '../../cli/commands/auth/revoke.js';
1
+ export { default } from '../../cli/commands/auth/revoke/index.js';
@@ -1,2 +1,2 @@
1
1
  // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
- export { default } from '../../cli/commands/auth/revoke.js';
2
+ export { default } from '../../cli/commands/auth/revoke/index.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../../cli/flags.js';
2
+ import { appIdFlag } from '../../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../../lib/flags.js';
5
5
  import { printResponse } from '../../../lib/output.js';
@@ -1,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { Args, Command, Flags } from '@oclif/core';
3
- import { appIdFlag } from '../../../cli/flags.js';
3
+ import { appIdFlag } from '../../../cli/input/app.js';
4
4
  import { createAuthenticatedClient } from '../../../lib/client-from-config.js';
5
5
  import { isValidUuid } from '../../../lib/flags.js';
6
6
  import { printResponse } from '../../../lib/output.js';
@@ -1,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { Args, Command, Flags } from '@oclif/core';
3
- import { appIdFlag } from '../../../cli/flags.js';
3
+ import { appIdFlag } from '../../../cli/input/app.js';
4
4
  import { createAuthenticatedClient } from '../../../lib/client-from-config.js';
5
5
  import { isValidUuid } from '../../../lib/flags.js';
6
6
  import { printResponse } from '../../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { printResponse } from '../../lib/output.js';
5
5
  export default class FlowsCreate extends Command {
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { paginationFlags, paginationParams } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,7 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { basename, extname } from 'node:path';
3
3
  import { Args, Command } from '@oclif/core';
4
- import { appIdFlag } from '../../../cli/flags.js';
4
+ import { appIdFlag } from '../../../cli/input/app.js';
5
5
  import { createAuthenticatedClient } from '../../../lib/client-from-config.js';
6
6
  import { printResponse } from '../../../lib/output.js';
7
7
  const IMAGE_MIME_TYPES = {
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { confirmFlags, confirmMutation } from '../../lib/confirm.js';
5
5
  import { ApiError } from '../../lib/errors.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/close/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/close/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/create/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/create/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/current/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/current/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/list/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/list/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/run/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/run/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/show/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/show/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/status/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/status/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/steps/index.js';
@@ -0,0 +1,2 @@
1
+ // Implementation lives in the new cli layer; oclif discovers commands only under src/commands.
2
+ export { default } from '../../cli/commands/migrations/steps/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/unuse/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/unuse/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/use/index.js';
@@ -0,0 +1 @@
1
+ export { default } from '../../cli/commands/migrations/use/index.js';
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { printResponse } from '../../lib/output.js';
5
5
  export default class PaywallsCreate extends Command {
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { paginationFlags, paginationParams } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { draftFlowError } from '../../lib/flow-help.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { paginationFlags, paginationParams } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { draftFlowError } from '../../lib/flow-help.js';
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { printResponse } from '../../lib/output.js';
5
5
  const VALID_PERIODS = [
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { paginationFlags, paginationParams } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Args, Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { isValidUuid } from '../../lib/flags.js';
5
5
  import { printResponse } from '../../lib/output.js';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- import { appIdFlag } from '../../cli/flags.js';
2
+ import { appIdFlag } from '../../cli/input/app.js';
3
3
  import { createAuthenticatedClient } from '../../lib/client-from-config.js';
4
4
  import { paginationFlags, paginationParams } from '../../lib/flags.js';
5
5
  import { printList } from '../../lib/output.js';
@@ -1,7 +1,7 @@
1
1
  export type AdaptyConfig = {
2
2
  access_token?: string;
3
3
  user?: {
4
- email: string;
4
+ email?: string;
5
5
  name: string;
6
6
  };
7
7
  };
@@ -3,7 +3,6 @@
3
3
  * gives itself. An input shape belongs to its operation, not here.
4
4
  */
5
5
  export type AuthUser = {
6
- email: string;
7
6
  name: string;
8
7
  };
9
8
  export type IssuedToken = {
@@ -6,5 +6,9 @@ import type { ErrorParser } from '../core/http/index.js';
6
6
  *
7
7
  * Wired once in createAdapty: which shapes a service speaks is product knowledge, and ASA speaks
8
8
  * another — which is why the transport takes the parser as a parameter.
9
+ *
10
+ * The Wizard Service sits behind the same transport (section 4.5 of the CLI–WS contract) and
11
+ * words its rejection as `{ error: { code, message } }` (`WizardError`) — one shape this parser
12
+ * now reads too, alongside the ones the developer API sends.
9
13
  */
10
14
  export declare const developerErrorParser: ErrorParser;