adapty 0.1.3 → 0.1.5

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/README.md CHANGED
@@ -1,11 +1,15 @@
1
- # adapty-cli
1
+ <a href="https://adapty.io/?utm_source=github&utm_medium=referral&utm_campaign=adapty-cli">
2
+ <img src="https://adapty-portal-media-production.s3.amazonaws.com/github/logo-adapty-new.svg">
3
+ </a>
2
4
 
3
- CLI for the [Adapty Developer API](https://docs.adapty.io/docs/developer-api). Manage apps, products, paywalls, placements, and access levels from your terminal.
5
+ # Adapty CLI
6
+
7
+ [Adapty Developer CLI](https://adapty.io/docs/developer-cli). Manage apps, products, paywalls, placements, and access levels from your terminal.
4
8
 
5
9
  ## Installation
6
10
 
7
11
  ```sh
8
- npm install -g adapty-cli
12
+ npm install -g adapty
9
13
  ```
10
14
 
11
15
  Requires Node.js >= 18.
@@ -84,18 +88,18 @@ adapty access-levels update --app UUID ACCESS_LEVEL_ID [flags]
84
88
 
85
89
  ### Global Flags
86
90
 
87
- | Flag | Description |
88
- |------|-------------|
89
- | `--json` | Output as JSON |
90
- | `--help` | Show help |
91
- | `--page` | Page number (default: 1) |
91
+ | Flag | Description |
92
+ | ------------- | -------------------------------------- |
93
+ | `--json` | Output as JSON |
94
+ | `--help` | Show help |
95
+ | `--page` | Page number (default: 1) |
92
96
  | `--page-size` | Items per page (default: 20, max: 100) |
93
97
 
94
98
  ## Environment Variables
95
99
 
96
- | Variable | Description |
97
- |----------|-------------|
98
- | `ADAPTY_TOKEN` | Override stored auth token |
100
+ | Variable | Description |
101
+ | ---------------- | ------------------------------------------------------------------------- |
102
+ | `ADAPTY_TOKEN` | Override stored auth token |
99
103
  | `ADAPTY_API_URL` | Override API base URL (default: `https://api.adapty.io/api/v1/developer`) |
100
104
 
101
105
  ## Development
@@ -1,5 +1,5 @@
1
1
  import { ApiError, NetworkError, parseApiError } from './errors.js';
2
- const DEFAULT_API_URL = 'https://api.adapty.io/api/v1/developer';
2
+ const DEFAULT_API_URL = 'https://api-admin.adapty.io/api/v1/developer';
3
3
  function ensureTrailingSlash(path) {
4
4
  return path.endsWith('/') ? path : `${path}/`;
5
5
  }
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "commands": {
3
- "access-levels:create": {
3
+ "apps:create": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Create a custom access level",
6
+ "description": "Create a new Adapty app",
7
7
  "examples": [
8
- "<%= config.bin %> access-levels create --app 550e8400-... --sdk-id vip --title \"VIP Access\""
8
+ "<%= config.bin %> apps create --title \"My App\" --platform ios --apple-bundle-id com.example.app",
9
+ "<%= config.bin %> apps create --title \"My App\" --platform ios --platform android --apple-bundle-id com.example.app --google-bundle-id com.example.app"
9
10
  ],
10
11
  "flags": {
11
12
  "json": {
@@ -15,24 +16,34 @@
15
16
  "allowNo": false,
16
17
  "type": "boolean"
17
18
  },
18
- "app": {
19
- "description": "App ID (UUID)",
20
- "name": "app",
21
- "required": true,
19
+ "apple-bundle-id": {
20
+ "description": "Apple bundle ID (required with --platform ios)",
21
+ "name": "apple-bundle-id",
22
22
  "hasDynamicHelp": false,
23
23
  "multiple": false,
24
24
  "type": "option"
25
25
  },
26
- "sdk-id": {
27
- "description": "Access level SDK identifier",
28
- "name": "sdk-id",
29
- "required": true,
26
+ "google-bundle-id": {
27
+ "description": "Google bundle ID (required with --platform android)",
28
+ "name": "google-bundle-id",
30
29
  "hasDynamicHelp": false,
31
30
  "multiple": false,
32
31
  "type": "option"
33
32
  },
33
+ "platform": {
34
+ "description": "Platform (ios, android). Repeat for multiple.",
35
+ "name": "platform",
36
+ "required": true,
37
+ "hasDynamicHelp": false,
38
+ "multiple": true,
39
+ "options": [
40
+ "ios",
41
+ "android"
42
+ ],
43
+ "type": "option"
44
+ },
34
45
  "title": {
35
- "description": "Access level title",
46
+ "description": "App title",
36
47
  "name": "title",
37
48
  "required": true,
38
49
  "hasDynamicHelp": false,
@@ -42,7 +53,7 @@
42
53
  },
43
54
  "hasDynamicHelp": false,
44
55
  "hiddenAliases": [],
45
- "id": "access-levels:create",
56
+ "id": "apps:create",
46
57
  "pluginAlias": "adapty",
47
58
  "pluginName": "adapty",
48
59
  "pluginType": "core",
@@ -52,22 +63,22 @@
52
63
  "relativePath": [
53
64
  "dist",
54
65
  "commands",
55
- "access-levels",
66
+ "apps",
56
67
  "create.js"
57
68
  ]
58
69
  },
59
- "access-levels:get": {
70
+ "apps:get": {
60
71
  "aliases": [],
61
72
  "args": {
62
- "access_level_id": {
63
- "description": "Access Level ID (UUID)",
64
- "name": "access_level_id",
73
+ "app_id": {
74
+ "description": "App ID (UUID)",
75
+ "name": "app_id",
65
76
  "required": true
66
77
  }
67
78
  },
68
- "description": "Get access level details",
79
+ "description": "Get app details",
69
80
  "examples": [
70
- "<%= config.bin %> access-levels get --app UUID 550e8400-e29b-41d4-a716-446655440000"
81
+ "<%= config.bin %> apps get 550e8400-e29b-41d4-a716-446655440000"
71
82
  ],
72
83
  "flags": {
73
84
  "json": {
@@ -76,19 +87,11 @@
76
87
  "name": "json",
77
88
  "allowNo": false,
78
89
  "type": "boolean"
79
- },
80
- "app": {
81
- "description": "App ID (UUID)",
82
- "name": "app",
83
- "required": true,
84
- "hasDynamicHelp": false,
85
- "multiple": false,
86
- "type": "option"
87
90
  }
88
91
  },
89
92
  "hasDynamicHelp": false,
90
93
  "hiddenAliases": [],
91
- "id": "access-levels:get",
94
+ "id": "apps:get",
92
95
  "pluginAlias": "adapty",
93
96
  "pluginName": "adapty",
94
97
  "pluginType": "core",
@@ -98,16 +101,17 @@
98
101
  "relativePath": [
99
102
  "dist",
100
103
  "commands",
101
- "access-levels",
104
+ "apps",
102
105
  "get.js"
103
106
  ]
104
107
  },
105
- "access-levels:list": {
108
+ "apps:list": {
106
109
  "aliases": [],
107
110
  "args": {},
108
- "description": "List access levels for an app",
111
+ "description": "List Adapty apps",
109
112
  "examples": [
110
- "<%= config.bin %> access-levels list --app 550e8400-e29b-41d4-a716-446655440000"
113
+ "<%= config.bin %> apps list",
114
+ "<%= config.bin %> apps list --page 2 --page-size 10"
111
115
  ],
112
116
  "flags": {
113
117
  "json": {
@@ -117,14 +121,6 @@
117
121
  "allowNo": false,
118
122
  "type": "boolean"
119
123
  },
120
- "app": {
121
- "description": "App ID (UUID)",
122
- "name": "app",
123
- "required": true,
124
- "hasDynamicHelp": false,
125
- "multiple": false,
126
- "type": "option"
127
- },
128
124
  "page": {
129
125
  "description": "Page number",
130
126
  "name": "page",
@@ -144,7 +140,7 @@
144
140
  },
145
141
  "hasDynamicHelp": false,
146
142
  "hiddenAliases": [],
147
- "id": "access-levels:list",
143
+ "id": "apps:list",
148
144
  "pluginAlias": "adapty",
149
145
  "pluginName": "adapty",
150
146
  "pluginType": "core",
@@ -154,22 +150,22 @@
154
150
  "relativePath": [
155
151
  "dist",
156
152
  "commands",
157
- "access-levels",
153
+ "apps",
158
154
  "list.js"
159
155
  ]
160
156
  },
161
- "access-levels:update": {
157
+ "apps:update": {
162
158
  "aliases": [],
163
159
  "args": {
164
- "access_level_id": {
165
- "description": "Access Level ID (UUID)",
166
- "name": "access_level_id",
160
+ "app_id": {
161
+ "description": "App ID (UUID)",
162
+ "name": "app_id",
167
163
  "required": true
168
164
  }
169
165
  },
170
- "description": "Update an access level",
166
+ "description": "Update an app",
171
167
  "examples": [
172
- "<%= config.bin %> access-levels update --app UUID 550e8400-... --title \"VIP Access\""
168
+ "<%= config.bin %> apps update 550e8400-... --title \"My App\""
173
169
  ],
174
170
  "flags": {
175
171
  "json": {
@@ -179,18 +175,23 @@
179
175
  "allowNo": false,
180
176
  "type": "boolean"
181
177
  },
182
- "app": {
183
- "description": "App ID (UUID)",
184
- "name": "app",
185
- "required": true,
178
+ "apple-bundle-id": {
179
+ "description": "Apple bundle ID",
180
+ "name": "apple-bundle-id",
181
+ "hasDynamicHelp": false,
182
+ "multiple": false,
183
+ "type": "option"
184
+ },
185
+ "google-bundle-id": {
186
+ "description": "Google bundle ID",
187
+ "name": "google-bundle-id",
186
188
  "hasDynamicHelp": false,
187
189
  "multiple": false,
188
190
  "type": "option"
189
191
  },
190
192
  "title": {
191
- "description": "Access level title",
193
+ "description": "App title",
192
194
  "name": "title",
193
- "required": true,
194
195
  "hasDynamicHelp": false,
195
196
  "multiple": false,
196
197
  "type": "option"
@@ -198,7 +199,7 @@
198
199
  },
199
200
  "hasDynamicHelp": false,
200
201
  "hiddenAliases": [],
201
- "id": "access-levels:update",
202
+ "id": "apps:update",
202
203
  "pluginAlias": "adapty",
203
204
  "pluginName": "adapty",
204
205
  "pluginType": "core",
@@ -208,17 +209,16 @@
208
209
  "relativePath": [
209
210
  "dist",
210
211
  "commands",
211
- "access-levels",
212
+ "apps",
212
213
  "update.js"
213
214
  ]
214
215
  },
215
- "apps:create": {
216
+ "access-levels:create": {
216
217
  "aliases": [],
217
218
  "args": {},
218
- "description": "Create a new Adapty app",
219
+ "description": "Create a custom access level",
219
220
  "examples": [
220
- "<%= config.bin %> apps create --title \"My App\" --platform ios --apple-bundle-id com.example.app",
221
- "<%= config.bin %> apps create --title \"My App\" --platform ios --platform android --apple-bundle-id com.example.app --google-bundle-id com.example.app"
221
+ "<%= config.bin %> access-levels create --app 550e8400-... --sdk-id vip --title \"VIP Access\""
222
222
  ],
223
223
  "flags": {
224
224
  "json": {
@@ -228,34 +228,24 @@
228
228
  "allowNo": false,
229
229
  "type": "boolean"
230
230
  },
231
- "apple-bundle-id": {
232
- "description": "Apple bundle ID (required with --platform ios)",
233
- "name": "apple-bundle-id",
234
- "hasDynamicHelp": false,
235
- "multiple": false,
236
- "type": "option"
237
- },
238
- "google-bundle-id": {
239
- "description": "Google bundle ID (required with --platform android)",
240
- "name": "google-bundle-id",
231
+ "app": {
232
+ "description": "App ID (UUID)",
233
+ "name": "app",
234
+ "required": true,
241
235
  "hasDynamicHelp": false,
242
236
  "multiple": false,
243
237
  "type": "option"
244
238
  },
245
- "platform": {
246
- "description": "Platform (ios, android). Repeat for multiple.",
247
- "name": "platform",
239
+ "sdk-id": {
240
+ "description": "Access level SDK identifier",
241
+ "name": "sdk-id",
248
242
  "required": true,
249
243
  "hasDynamicHelp": false,
250
- "multiple": true,
251
- "options": [
252
- "ios",
253
- "android"
254
- ],
244
+ "multiple": false,
255
245
  "type": "option"
256
246
  },
257
247
  "title": {
258
- "description": "App title",
248
+ "description": "Access level title",
259
249
  "name": "title",
260
250
  "required": true,
261
251
  "hasDynamicHelp": false,
@@ -265,7 +255,7 @@
265
255
  },
266
256
  "hasDynamicHelp": false,
267
257
  "hiddenAliases": [],
268
- "id": "apps:create",
258
+ "id": "access-levels:create",
269
259
  "pluginAlias": "adapty",
270
260
  "pluginName": "adapty",
271
261
  "pluginType": "core",
@@ -275,22 +265,22 @@
275
265
  "relativePath": [
276
266
  "dist",
277
267
  "commands",
278
- "apps",
268
+ "access-levels",
279
269
  "create.js"
280
270
  ]
281
271
  },
282
- "apps:get": {
272
+ "access-levels:get": {
283
273
  "aliases": [],
284
274
  "args": {
285
- "app_id": {
286
- "description": "App ID (UUID)",
287
- "name": "app_id",
275
+ "access_level_id": {
276
+ "description": "Access Level ID (UUID)",
277
+ "name": "access_level_id",
288
278
  "required": true
289
279
  }
290
280
  },
291
- "description": "Get app details",
281
+ "description": "Get access level details",
292
282
  "examples": [
293
- "<%= config.bin %> apps get 550e8400-e29b-41d4-a716-446655440000"
283
+ "<%= config.bin %> access-levels get --app UUID 550e8400-e29b-41d4-a716-446655440000"
294
284
  ],
295
285
  "flags": {
296
286
  "json": {
@@ -299,11 +289,19 @@
299
289
  "name": "json",
300
290
  "allowNo": false,
301
291
  "type": "boolean"
292
+ },
293
+ "app": {
294
+ "description": "App ID (UUID)",
295
+ "name": "app",
296
+ "required": true,
297
+ "hasDynamicHelp": false,
298
+ "multiple": false,
299
+ "type": "option"
302
300
  }
303
301
  },
304
302
  "hasDynamicHelp": false,
305
303
  "hiddenAliases": [],
306
- "id": "apps:get",
304
+ "id": "access-levels:get",
307
305
  "pluginAlias": "adapty",
308
306
  "pluginName": "adapty",
309
307
  "pluginType": "core",
@@ -313,17 +311,16 @@
313
311
  "relativePath": [
314
312
  "dist",
315
313
  "commands",
316
- "apps",
314
+ "access-levels",
317
315
  "get.js"
318
316
  ]
319
317
  },
320
- "apps:list": {
318
+ "access-levels:list": {
321
319
  "aliases": [],
322
320
  "args": {},
323
- "description": "List Adapty apps",
321
+ "description": "List access levels for an app",
324
322
  "examples": [
325
- "<%= config.bin %> apps list",
326
- "<%= config.bin %> apps list --page 2 --page-size 10"
323
+ "<%= config.bin %> access-levels list --app 550e8400-e29b-41d4-a716-446655440000"
327
324
  ],
328
325
  "flags": {
329
326
  "json": {
@@ -333,6 +330,14 @@
333
330
  "allowNo": false,
334
331
  "type": "boolean"
335
332
  },
333
+ "app": {
334
+ "description": "App ID (UUID)",
335
+ "name": "app",
336
+ "required": true,
337
+ "hasDynamicHelp": false,
338
+ "multiple": false,
339
+ "type": "option"
340
+ },
336
341
  "page": {
337
342
  "description": "Page number",
338
343
  "name": "page",
@@ -352,7 +357,7 @@
352
357
  },
353
358
  "hasDynamicHelp": false,
354
359
  "hiddenAliases": [],
355
- "id": "apps:list",
360
+ "id": "access-levels:list",
356
361
  "pluginAlias": "adapty",
357
362
  "pluginName": "adapty",
358
363
  "pluginType": "core",
@@ -362,22 +367,22 @@
362
367
  "relativePath": [
363
368
  "dist",
364
369
  "commands",
365
- "apps",
370
+ "access-levels",
366
371
  "list.js"
367
372
  ]
368
373
  },
369
- "apps:update": {
374
+ "access-levels:update": {
370
375
  "aliases": [],
371
376
  "args": {
372
- "app_id": {
373
- "description": "App ID (UUID)",
374
- "name": "app_id",
377
+ "access_level_id": {
378
+ "description": "Access Level ID (UUID)",
379
+ "name": "access_level_id",
375
380
  "required": true
376
381
  }
377
382
  },
378
- "description": "Update an app",
383
+ "description": "Update an access level",
379
384
  "examples": [
380
- "<%= config.bin %> apps update 550e8400-... --title \"My App\""
385
+ "<%= config.bin %> access-levels update --app UUID 550e8400-... --title \"VIP Access\""
381
386
  ],
382
387
  "flags": {
383
388
  "json": {
@@ -387,23 +392,18 @@
387
392
  "allowNo": false,
388
393
  "type": "boolean"
389
394
  },
390
- "apple-bundle-id": {
391
- "description": "Apple bundle ID",
392
- "name": "apple-bundle-id",
393
- "hasDynamicHelp": false,
394
- "multiple": false,
395
- "type": "option"
396
- },
397
- "google-bundle-id": {
398
- "description": "Google bundle ID",
399
- "name": "google-bundle-id",
395
+ "app": {
396
+ "description": "App ID (UUID)",
397
+ "name": "app",
398
+ "required": true,
400
399
  "hasDynamicHelp": false,
401
400
  "multiple": false,
402
401
  "type": "option"
403
402
  },
404
403
  "title": {
405
- "description": "App title",
404
+ "description": "Access level title",
406
405
  "name": "title",
406
+ "required": true,
407
407
  "hasDynamicHelp": false,
408
408
  "multiple": false,
409
409
  "type": "option"
@@ -411,7 +411,7 @@
411
411
  },
412
412
  "hasDynamicHelp": false,
413
413
  "hiddenAliases": [],
414
- "id": "apps:update",
414
+ "id": "access-levels:update",
415
415
  "pluginAlias": "adapty",
416
416
  "pluginName": "adapty",
417
417
  "pluginType": "core",
@@ -421,7 +421,7 @@
421
421
  "relativePath": [
422
422
  "dist",
423
423
  "commands",
424
- "apps",
424
+ "access-levels",
425
425
  "update.js"
426
426
  ]
427
427
  },
@@ -1283,5 +1283,5 @@
1283
1283
  ]
1284
1284
  }
1285
1285
  },
1286
- "version": "0.1.3"
1286
+ "version": "0.1.5"
1287
1287
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adapty",
3
3
  "description": "Adapty command line interface",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "author": "Adapty team <support@adapty.io>",
6
6
  "bin": {
7
7
  "adapty": "./bin/run.js"
@@ -42,7 +42,7 @@
42
42
  "./dist",
43
43
  "./oclif.manifest.json"
44
44
  ],
45
- "homepage": "https://github.com/adaptyteam/adapty-cli",
45
+ "homepage": "https://adapty.io/docs/developer-cli",
46
46
  "keywords": [
47
47
  "adapty",
48
48
  "cli",