@autifyhq/autify-cli 0.39.0 → 0.40.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/README.md CHANGED
@@ -41,6 +41,8 @@ See our official document: https://help.autify.com/docs/autify-command-line-inte
41
41
  * [`autify web api describe-scenario`](#autify-web-api-describe-scenario)
42
42
  * [`autify web api execute-scenarios`](#autify-web-api-execute-scenarios)
43
43
  * [`autify web api execute-schedule`](#autify-web-api-execute-schedule)
44
+ * [`autify web api get-credit-usage`](#autify-web-api-get-credit-usage)
45
+ * [`autify web api get-project-info`](#autify-web-api-get-project-info)
44
46
  * [`autify web api list-access-points`](#autify-web-api-list-access-points)
45
47
  * [`autify web api list-capabilities`](#autify-web-api-list-capabilities)
46
48
  * [`autify web api list-results`](#autify-web-api-list-results)
@@ -70,7 +72,7 @@ EXAMPLES
70
72
  $ autify connect access-point create --name NAME --web-workspace-id ID
71
73
  ```
72
74
 
73
- _See code: [src/commands/connect/access-point/create.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/connect/access-point/create.ts)_
75
+ _See code: [src/commands/connect/access-point/create.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/connect/access-point/create.ts)_
74
76
 
75
77
  ## `autify connect access-point set`
76
78
 
@@ -96,7 +98,7 @@ EXAMPLES
96
98
  $ autify connect access-point set --name=NAME < key.txt
97
99
  ```
98
100
 
99
- _See code: [src/commands/connect/access-point/set.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/connect/access-point/set.ts)_
101
+ _See code: [src/commands/connect/access-point/set.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/connect/access-point/set.ts)_
100
102
 
101
103
  ## `autify connect client install [VERSION]`
102
104
 
@@ -126,7 +128,7 @@ EXAMPLES
126
128
  $ autify connect client install stable
127
129
  ```
128
130
 
129
- _See code: [src/commands/connect/client/install.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/connect/client/install.ts)_
131
+ _See code: [src/commands/connect/client/install.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/connect/client/install.ts)_
130
132
 
131
133
  ## `autify connect client start`
132
134
 
@@ -160,7 +162,7 @@ EXAMPLES
160
162
  $ autify connect client start --web-workspace-id 000
161
163
  ```
162
164
 
163
- _See code: [src/commands/connect/client/start.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/connect/client/start.ts)_
165
+ _See code: [src/commands/connect/client/start.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/connect/client/start.ts)_
164
166
 
165
167
  ## `autify help [COMMANDS]`
166
168
 
@@ -201,7 +203,7 @@ EXAMPLES
201
203
  $ autify mobile api describe-test-result
202
204
  ```
203
205
 
204
- _See code: [src/commands/mobile/api/describe-test-result.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/api/describe-test-result.ts)_
206
+ _See code: [src/commands/mobile/api/describe-test-result.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/api/describe-test-result.ts)_
205
207
 
206
208
  ## `autify mobile api list-test-results`
207
209
 
@@ -225,7 +227,7 @@ EXAMPLES
225
227
  $ autify mobile api list-test-results
226
228
  ```
227
229
 
228
- _See code: [src/commands/mobile/api/list-test-results.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/api/list-test-results.ts)_
230
+ _See code: [src/commands/mobile/api/list-test-results.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/api/list-test-results.ts)_
229
231
 
230
232
  ## `autify mobile api run-test-plan`
231
233
 
@@ -246,7 +248,7 @@ EXAMPLES
246
248
  $ autify mobile api run-test-plan
247
249
  ```
248
250
 
249
- _See code: [src/commands/mobile/api/run-test-plan.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/api/run-test-plan.ts)_
251
+ _See code: [src/commands/mobile/api/run-test-plan.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/api/run-test-plan.ts)_
250
252
 
251
253
  ## `autify mobile api upload-build`
252
254
 
@@ -267,7 +269,7 @@ EXAMPLES
267
269
  $ autify mobile api upload-build
268
270
  ```
269
271
 
270
- _See code: [src/commands/mobile/api/upload-build.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/api/upload-build.ts)_
272
+ _See code: [src/commands/mobile/api/upload-build.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/api/upload-build.ts)_
271
273
 
272
274
  ## `autify mobile auth login`
273
275
 
@@ -290,7 +292,7 @@ EXAMPLES
290
292
  $ autify mobile auth login < token.txt
291
293
  ```
292
294
 
293
- _See code: [src/commands/mobile/auth/login.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/auth/login.ts)_
295
+ _See code: [src/commands/mobile/auth/login.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/auth/login.ts)_
294
296
 
295
297
  ## `autify mobile build upload BUILD-PATH`
296
298
 
@@ -324,7 +326,7 @@ EXAMPLES
324
326
  $ autify mobile build upload --workspace-id AAA ./my.app --json
325
327
  ```
326
328
 
327
- _See code: [src/commands/mobile/build/upload.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/build/upload.ts)_
329
+ _See code: [src/commands/mobile/build/upload.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/build/upload.ts)_
328
330
 
329
331
  ## `autify mobile test run TEST-PLAN-URL`
330
332
 
@@ -364,7 +366,7 @@ EXAMPLES
364
366
  --timeout 600
365
367
  ```
366
368
 
367
- _See code: [src/commands/mobile/test/run.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/test/run.ts)_
369
+ _See code: [src/commands/mobile/test/run.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/test/run.ts)_
368
370
 
369
371
  ## `autify mobile test wait TEST-RESULT-URL`
370
372
 
@@ -388,7 +390,7 @@ EXAMPLES
388
390
  $ autify mobile test wait https://mobile-app.autify.com/projects/AAA/results/BBB
389
391
  ```
390
392
 
391
- _See code: [src/commands/mobile/test/wait.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/mobile/test/wait.ts)_
393
+ _See code: [src/commands/mobile/test/wait.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/mobile/test/wait.ts)_
392
394
 
393
395
  ## `autify update [CHANNEL]`
394
396
 
@@ -447,7 +449,7 @@ EXAMPLES
447
449
  $ autify web api create-access-point
448
450
  ```
449
451
 
450
- _See code: [src/commands/web/api/create-access-point.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/create-access-point.ts)_
452
+ _See code: [src/commands/web/api/create-access-point.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/create-access-point.ts)_
451
453
 
452
454
  ## `autify web api create-url-replacement`
453
455
 
@@ -469,7 +471,7 @@ EXAMPLES
469
471
  $ autify web api create-url-replacement
470
472
  ```
471
473
 
472
- _See code: [src/commands/web/api/create-url-replacement.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/create-url-replacement.ts)_
474
+ _See code: [src/commands/web/api/create-url-replacement.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/create-url-replacement.ts)_
473
475
 
474
476
  ## `autify web api delete-access-point`
475
477
 
@@ -491,7 +493,7 @@ EXAMPLES
491
493
  $ autify web api delete-access-point
492
494
  ```
493
495
 
494
- _See code: [src/commands/web/api/delete-access-point.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/delete-access-point.ts)_
496
+ _See code: [src/commands/web/api/delete-access-point.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/delete-access-point.ts)_
495
497
 
496
498
  ## `autify web api delete-url-replacement`
497
499
 
@@ -513,7 +515,7 @@ EXAMPLES
513
515
  $ autify web api delete-url-replacement
514
516
  ```
515
517
 
516
- _See code: [src/commands/web/api/delete-url-replacement.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/delete-url-replacement.ts)_
518
+ _See code: [src/commands/web/api/delete-url-replacement.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/delete-url-replacement.ts)_
517
519
 
518
520
  ## `autify web api describe-result`
519
521
 
@@ -534,7 +536,7 @@ EXAMPLES
534
536
  $ autify web api describe-result
535
537
  ```
536
538
 
537
- _See code: [src/commands/web/api/describe-result.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/describe-result.ts)_
539
+ _See code: [src/commands/web/api/describe-result.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/describe-result.ts)_
538
540
 
539
541
  ## `autify web api describe-scenario`
540
542
 
@@ -555,7 +557,7 @@ EXAMPLES
555
557
  $ autify web api describe-scenario
556
558
  ```
557
559
 
558
- _See code: [src/commands/web/api/describe-scenario.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/describe-scenario.ts)_
560
+ _See code: [src/commands/web/api/describe-scenario.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/describe-scenario.ts)_
559
561
 
560
562
  ## `autify web api execute-scenarios`
561
563
 
@@ -578,7 +580,7 @@ EXAMPLES
578
580
  $ autify web api execute-scenarios
579
581
  ```
580
582
 
581
- _See code: [src/commands/web/api/execute-scenarios.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/execute-scenarios.ts)_
583
+ _See code: [src/commands/web/api/execute-scenarios.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/execute-scenarios.ts)_
582
584
 
583
585
  ## `autify web api execute-schedule`
584
586
 
@@ -600,7 +602,59 @@ EXAMPLES
600
602
  $ autify web api execute-schedule
601
603
  ```
602
604
 
603
- _See code: [src/commands/web/api/execute-schedule.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/execute-schedule.ts)_
605
+ _See code: [src/commands/web/api/execute-schedule.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/execute-schedule.ts)_
606
+
607
+ ## `autify web api get-credit-usage`
608
+
609
+ Get the number of credits used in the project\ \ Notes:\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.
610
+
611
+ ```
612
+ USAGE
613
+ $ autify web api get-credit-usage --project-id <value> [--date-from <value>] [--date-to <value>] [--scenario-id <value>]
614
+ [--test-plan-id <value>] [--user-id <value>]
615
+
616
+ FLAGS
617
+ --date-from=<value> The date to start counting used credits from.\ If not specified, the date will be set to 1
618
+ week ago.\ Up to 90 days in advance can be specified. If the specified date is more than 90
619
+ days in the past, the date will be set to 90 days ago.\ Date must follow the format YYYY-MM-DD
620
+ (example: &quot;2023-09-21&quot;).
621
+ --date-to=<value> The date to end counting used credits from.\ If not specified, the date will be set to today.\
622
+ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-28&quot;).
623
+ --project-id=<value> (required) For example, 1 for the following URL: https://app.autify.com/projects/1/credits
624
+ --scenario-id=<value> The scenario ID to filter used credits by.
625
+ --test-plan-id=<value> The test plan ID to filter used credits by.
626
+ --user-id=<value> The user ID that executed tests to filter used credits by.
627
+
628
+ DESCRIPTION
629
+ Get the number of credits used in the project\ \ Notes:\ This endpoint works only for organizations on credit-based
630
+ plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a
631
+ run-based plan.
632
+
633
+ EXAMPLES
634
+ $ autify web api get-credit-usage
635
+ ```
636
+
637
+ _See code: [src/commands/web/api/get-credit-usage.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/get-credit-usage.ts)_
638
+
639
+ ## `autify web api get-project-info`
640
+
641
+ Get project information.
642
+
643
+ ```
644
+ USAGE
645
+ $ autify web api get-project-info --project-id <value>
646
+
647
+ FLAGS
648
+ --project-id=<value> (required) For example, 1 for the following URL: https://app.autify.com/projects/1/project_info
649
+
650
+ DESCRIPTION
651
+ Get project information.
652
+
653
+ EXAMPLES
654
+ $ autify web api get-project-info
655
+ ```
656
+
657
+ _See code: [src/commands/web/api/get-project-info.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/get-project-info.ts)_
604
658
 
605
659
  ## `autify web api list-access-points`
606
660
 
@@ -621,7 +675,7 @@ EXAMPLES
621
675
  $ autify web api list-access-points
622
676
  ```
623
677
 
624
- _See code: [src/commands/web/api/list-access-points.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/list-access-points.ts)_
678
+ _See code: [src/commands/web/api/list-access-points.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/list-access-points.ts)_
625
679
 
626
680
  ## `autify web api list-capabilities`
627
681
 
@@ -644,7 +698,7 @@ EXAMPLES
644
698
  $ autify web api list-capabilities
645
699
  ```
646
700
 
647
- _See code: [src/commands/web/api/list-capabilities.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/list-capabilities.ts)_
701
+ _See code: [src/commands/web/api/list-capabilities.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/list-capabilities.ts)_
648
702
 
649
703
  ## `autify web api list-results`
650
704
 
@@ -667,7 +721,7 @@ EXAMPLES
667
721
  $ autify web api list-results
668
722
  ```
669
723
 
670
- _See code: [src/commands/web/api/list-results.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/list-results.ts)_
724
+ _See code: [src/commands/web/api/list-results.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/list-results.ts)_
671
725
 
672
726
  ## `autify web api list-scenarios`
673
727
 
@@ -688,7 +742,7 @@ EXAMPLES
688
742
  $ autify web api list-scenarios
689
743
  ```
690
744
 
691
- _See code: [src/commands/web/api/list-scenarios.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/list-scenarios.ts)_
745
+ _See code: [src/commands/web/api/list-scenarios.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/list-scenarios.ts)_
692
746
 
693
747
  ## `autify web api list-url-replacements`
694
748
 
@@ -709,7 +763,7 @@ EXAMPLES
709
763
  $ autify web api list-url-replacements
710
764
  ```
711
765
 
712
- _See code: [src/commands/web/api/list-url-replacements.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/list-url-replacements.ts)_
766
+ _See code: [src/commands/web/api/list-url-replacements.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/list-url-replacements.ts)_
713
767
 
714
768
  ## `autify web api update-url-replacement`
715
769
 
@@ -734,7 +788,7 @@ EXAMPLES
734
788
  $ autify web api update-url-replacement
735
789
  ```
736
790
 
737
- _See code: [src/commands/web/api/update-url-replacement.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/api/update-url-replacement.ts)_
791
+ _See code: [src/commands/web/api/update-url-replacement.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/api/update-url-replacement.ts)_
738
792
 
739
793
  ## `autify web auth login`
740
794
 
@@ -757,7 +811,7 @@ EXAMPLES
757
811
  $ autify web auth login < token.txt
758
812
  ```
759
813
 
760
- _See code: [src/commands/web/auth/login.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/auth/login.ts)_
814
+ _See code: [src/commands/web/auth/login.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/auth/login.ts)_
761
815
 
762
816
  ## `autify web test run SCENARIO-OR-TEST-PLAN-URL`
763
817
 
@@ -836,7 +890,7 @@ EXAMPLES
836
890
  $ autify web test run https://app.autify.com/projects/0000/scenarios/0000 --wait --autify-connect-client
837
891
  ```
838
892
 
839
- _See code: [src/commands/web/test/run.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/test/run.ts)_
893
+ _See code: [src/commands/web/test/run.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/test/run.ts)_
840
894
 
841
895
  ## `autify web test wait TEST-RESULT-URL`
842
896
 
@@ -860,5 +914,5 @@ EXAMPLES
860
914
  $ autify web test wait https://app.autify.com/projects/0000/results/0000
861
915
  ```
862
916
 
863
- _See code: [src/commands/web/test/wait.ts](https://github.com/autifyhq/autify-cli/blob/v0.39.0/src/commands/web/test/wait.ts)_
917
+ _See code: [src/commands/web/test/wait.ts](https://github.com/autifyhq/autify-cli/blob/v0.40.0/src/commands/web/test/wait.ts)_
864
918
  <!-- commandsstop -->
@@ -0,0 +1,14 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class WebApiGetCreditUsage extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ "project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ "date-from": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ "date-to": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ "scenario-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ "test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ "user-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const getWebClient_1 = require("../../../autify/web/getWebClient");
5
+ class WebApiGetCreditUsage extends core_1.Command {
6
+ async run() {
7
+ const { flags } = await this.parse(WebApiGetCreditUsage);
8
+ const { configDir, userAgent } = this.config;
9
+ const client = (0, getWebClient_1.getWebClient)(configDir, userAgent);
10
+ const res = await client.getCreditUsage(flags["project-id"], flags["date-from"], flags["date-to"], flags["scenario-id"], flags["test-plan-id"], flags["user-id"]);
11
+ console.log(JSON.stringify(res.data, null, 2));
12
+ }
13
+ }
14
+ WebApiGetCreditUsage.description = "Get the number of credits used in the project\\ \\ Notes:\\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.";
15
+ WebApiGetCreditUsage.examples = ["<%= config.bin %> <%= command.id %>"];
16
+ WebApiGetCreditUsage.flags = {
17
+ "project-id": core_1.Flags.integer({
18
+ description: "For example, 1 for the following URL: https://app.autify.com/projects/1/credits",
19
+ required: true,
20
+ }),
21
+ "date-from": core_1.Flags.string({
22
+ description: "The date to start counting used credits from.\\ If not specified, the date will be set to 1 week ago.\\ Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago.\\ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-21&quot;).",
23
+ required: false,
24
+ }),
25
+ "date-to": core_1.Flags.string({
26
+ description: "The date to end counting used credits from.\\ If not specified, the date will be set to today.\\ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-28&quot;).",
27
+ required: false,
28
+ }),
29
+ "scenario-id": core_1.Flags.integer({
30
+ description: "The scenario ID to filter used credits by.",
31
+ required: false,
32
+ }),
33
+ "test-plan-id": core_1.Flags.integer({
34
+ description: "The test plan ID to filter used credits by.",
35
+ required: false,
36
+ }),
37
+ "user-id": core_1.Flags.integer({
38
+ description: "The user ID that executed tests to filter used credits by.",
39
+ required: false,
40
+ }),
41
+ };
42
+ exports.default = WebApiGetCreditUsage;
@@ -0,0 +1,9 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class WebApiGetProjectInfo extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ "project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const getWebClient_1 = require("../../../autify/web/getWebClient");
5
+ class WebApiGetProjectInfo extends core_1.Command {
6
+ async run() {
7
+ const { flags } = await this.parse(WebApiGetProjectInfo);
8
+ const { configDir, userAgent } = this.config;
9
+ const client = (0, getWebClient_1.getWebClient)(configDir, userAgent);
10
+ const res = await client.getProjectInfo(flags["project-id"]);
11
+ console.log(JSON.stringify(res.data, null, 2));
12
+ }
13
+ }
14
+ WebApiGetProjectInfo.description = "Get project information.";
15
+ WebApiGetProjectInfo.examples = ["<%= config.bin %> <%= command.id %>"];
16
+ WebApiGetProjectInfo.flags = {
17
+ "project-id": core_1.Flags.integer({
18
+ description: "For example, 1 for the following URL: https://app.autify.com/projects/1/project_info",
19
+ required: true,
20
+ }),
21
+ };
22
+ exports.default = WebApiGetProjectInfo;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.39.0",
2
+ "version": "0.40.0",
3
3
  "commands": {
4
4
  "connect:access-point:create": {
5
5
  "id": "connect:access-point:create",
@@ -641,6 +641,85 @@
641
641
  },
642
642
  "args": {}
643
643
  },
644
+ "web:api:get-credit-usage": {
645
+ "id": "web:api:get-credit-usage",
646
+ "description": "Get the number of credits used in the project\\ \\ Notes:\\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.",
647
+ "strict": true,
648
+ "pluginName": "@autifyhq/autify-cli",
649
+ "pluginAlias": "@autifyhq/autify-cli",
650
+ "pluginType": "core",
651
+ "aliases": [],
652
+ "examples": [
653
+ "<%= config.bin %> <%= command.id %>"
654
+ ],
655
+ "flags": {
656
+ "project-id": {
657
+ "name": "project-id",
658
+ "type": "option",
659
+ "description": "For example, 1 for the following URL: https://app.autify.com/projects/1/credits",
660
+ "required": true,
661
+ "multiple": false
662
+ },
663
+ "date-from": {
664
+ "name": "date-from",
665
+ "type": "option",
666
+ "description": "The date to start counting used credits from.\\ If not specified, the date will be set to 1 week ago.\\ Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago.\\ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-21&quot;).",
667
+ "required": false,
668
+ "multiple": false
669
+ },
670
+ "date-to": {
671
+ "name": "date-to",
672
+ "type": "option",
673
+ "description": "The date to end counting used credits from.\\ If not specified, the date will be set to today.\\ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-28&quot;).",
674
+ "required": false,
675
+ "multiple": false
676
+ },
677
+ "scenario-id": {
678
+ "name": "scenario-id",
679
+ "type": "option",
680
+ "description": "The scenario ID to filter used credits by.",
681
+ "required": false,
682
+ "multiple": false
683
+ },
684
+ "test-plan-id": {
685
+ "name": "test-plan-id",
686
+ "type": "option",
687
+ "description": "The test plan ID to filter used credits by.",
688
+ "required": false,
689
+ "multiple": false
690
+ },
691
+ "user-id": {
692
+ "name": "user-id",
693
+ "type": "option",
694
+ "description": "The user ID that executed tests to filter used credits by.",
695
+ "required": false,
696
+ "multiple": false
697
+ }
698
+ },
699
+ "args": {}
700
+ },
701
+ "web:api:get-project-info": {
702
+ "id": "web:api:get-project-info",
703
+ "description": "Get project information.",
704
+ "strict": true,
705
+ "pluginName": "@autifyhq/autify-cli",
706
+ "pluginAlias": "@autifyhq/autify-cli",
707
+ "pluginType": "core",
708
+ "aliases": [],
709
+ "examples": [
710
+ "<%= config.bin %> <%= command.id %>"
711
+ ],
712
+ "flags": {
713
+ "project-id": {
714
+ "name": "project-id",
715
+ "type": "option",
716
+ "description": "For example, 1 for the following URL: https://app.autify.com/projects/1/project_info",
717
+ "required": true,
718
+ "multiple": false
719
+ }
720
+ },
721
+ "args": {}
722
+ },
644
723
  "web:api:list-access-points": {
645
724
  "id": "web:api:list-access-points",
646
725
  "description": "List access points for the project.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autifyhq/autify-cli",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "description": "Autify Command Line Interface (CLI)",
5
5
  "author": "Autify",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "/oclif.manifest.json"
18
18
  ],
19
19
  "dependencies": {
20
- "@autifyhq/autify-sdk": "^0.18.0",
20
+ "@autifyhq/autify-sdk": "^0.19.0",
21
21
  "@oclif/core": "^2.15.0",
22
22
  "@oclif/errors": "^1.3.6",
23
23
  "@oclif/plugin-help": "^5.2.20",