@appwrite.io/console 0.5.0 → 0.6.0-rc.2

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 (83) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +2100 -112
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +2100 -113
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +2100 -112
  7. package/docs/examples/account/add-authenticator.md +18 -0
  8. package/docs/examples/account/create-challenge.md +18 -0
  9. package/docs/examples/account/{delete.md → list-providers.md} +1 -1
  10. package/docs/examples/account/update-challenge.md +18 -0
  11. package/docs/examples/account/update-m-f-a.md +18 -0
  12. package/docs/examples/account/update-recovery.md +1 -1
  13. package/docs/examples/account/verify-authenticator.md +18 -0
  14. package/docs/examples/messaging/create-apns-provider.md +18 -0
  15. package/docs/examples/messaging/create-email-message.md +18 -0
  16. package/docs/examples/messaging/create-fcm-provider.md +18 -0
  17. package/docs/examples/messaging/create-mailgun-provider.md +18 -0
  18. package/docs/examples/messaging/create-msg91provider.md +18 -0
  19. package/docs/examples/messaging/create-push-message.md +18 -0
  20. package/docs/examples/messaging/create-s-m-s-message.md +18 -0
  21. package/docs/examples/messaging/create-sendgrid-provider.md +18 -0
  22. package/docs/examples/messaging/create-subscriber.md +18 -0
  23. package/docs/examples/messaging/create-telesign-provider.md +18 -0
  24. package/docs/examples/messaging/create-textmagic-provider.md +18 -0
  25. package/docs/examples/messaging/create-topic.md +18 -0
  26. package/docs/examples/messaging/create-twilio-provider.md +18 -0
  27. package/docs/examples/messaging/create-vonage-provider.md +18 -0
  28. package/docs/examples/messaging/delete-provider.md +18 -0
  29. package/docs/examples/messaging/delete-subscriber.md +18 -0
  30. package/docs/examples/messaging/delete-topic.md +18 -0
  31. package/docs/examples/messaging/get-message.md +18 -0
  32. package/docs/examples/messaging/get-provider.md +18 -0
  33. package/docs/examples/messaging/get-subscriber.md +18 -0
  34. package/docs/examples/messaging/get-topic.md +18 -0
  35. package/docs/examples/messaging/list-message-logs.md +18 -0
  36. package/docs/examples/messaging/list-messages.md +18 -0
  37. package/docs/examples/messaging/list-provider-logs.md +18 -0
  38. package/docs/examples/messaging/list-providers.md +18 -0
  39. package/docs/examples/messaging/list-subscriber-logs.md +18 -0
  40. package/docs/examples/messaging/list-subscribers.md +18 -0
  41. package/docs/examples/messaging/list-topic-logs.md +18 -0
  42. package/docs/examples/messaging/list-topics.md +18 -0
  43. package/docs/examples/messaging/update-apns-provider.md +18 -0
  44. package/docs/examples/messaging/update-email.md +18 -0
  45. package/docs/examples/messaging/update-fcm-provider.md +18 -0
  46. package/docs/examples/messaging/update-mailgun-provider.md +18 -0
  47. package/docs/examples/messaging/update-msg91provider.md +18 -0
  48. package/docs/examples/messaging/update-push-notification.md +18 -0
  49. package/docs/examples/messaging/update-s-m-s.md +18 -0
  50. package/docs/examples/messaging/update-sendgrid-provider.md +18 -0
  51. package/docs/examples/messaging/update-telesign-provider.md +18 -0
  52. package/docs/examples/messaging/update-textmagic-provider.md +18 -0
  53. package/docs/examples/messaging/update-topic.md +18 -0
  54. package/docs/examples/messaging/update-twilio-provider.md +18 -0
  55. package/docs/examples/messaging/update-vonage-provider.md +18 -0
  56. package/docs/examples/project/get-usage.md +1 -1
  57. package/docs/examples/projects/get-usage.md +18 -0
  58. package/docs/examples/projects/update-auth-mfa-factors.md +18 -0
  59. package/docs/examples/users/create-target.md +18 -0
  60. package/docs/examples/users/delete-target.md +18 -0
  61. package/docs/examples/users/get-target.md +18 -0
  62. package/docs/examples/users/list-targets.md +18 -0
  63. package/docs/examples/users/update-target.md +18 -0
  64. package/package.json +1 -1
  65. package/src/client.ts +1 -1
  66. package/src/index.ts +1 -0
  67. package/src/models.ts +534 -199
  68. package/src/services/account.ts +158 -18
  69. package/src/services/functions.ts +1 -1
  70. package/src/services/messaging.ts +1901 -0
  71. package/src/services/project.ts +4 -22
  72. package/src/services/projects.ts +58 -0
  73. package/src/services/storage.ts +1 -1
  74. package/src/services/users.ts +188 -1
  75. package/types/index.d.ts +1 -0
  76. package/types/models.d.ts +534 -199
  77. package/types/services/account.d.ts +56 -9
  78. package/types/services/functions.d.ts +1 -1
  79. package/types/services/messaging.d.ts +553 -0
  80. package/types/services/project.d.ts +2 -4
  81. package/types/services/projects.d.ts +20 -0
  82. package/types/services/storage.d.ts +1 -1
  83. package/types/services/users.d.ts +59 -1
package/types/models.d.ts CHANGED
@@ -402,6 +402,71 @@ export declare namespace Models {
402
402
  */
403
403
  localeCodes: LocaleCode[];
404
404
  };
405
+ /**
406
+ * Provider list
407
+ */
408
+ type ProviderList = {
409
+ /**
410
+ * Total number of providers documents that matched your query.
411
+ */
412
+ total: number;
413
+ /**
414
+ * List of providers.
415
+ */
416
+ providers: Provider[];
417
+ };
418
+ /**
419
+ * Message list
420
+ */
421
+ type MessageList = {
422
+ /**
423
+ * Total number of messages documents that matched your query.
424
+ */
425
+ total: number;
426
+ /**
427
+ * List of messages.
428
+ */
429
+ messages: Message[];
430
+ };
431
+ /**
432
+ * Topic list
433
+ */
434
+ type TopicList = {
435
+ /**
436
+ * Total number of topics documents that matched your query.
437
+ */
438
+ total: number;
439
+ /**
440
+ * List of topics.
441
+ */
442
+ topics: Topic[];
443
+ };
444
+ /**
445
+ * Subscriber list
446
+ */
447
+ type SubscriberList = {
448
+ /**
449
+ * Total number of subscribers documents that matched your query.
450
+ */
451
+ total: number;
452
+ /**
453
+ * List of subscribers.
454
+ */
455
+ subscribers: Subscriber[];
456
+ };
457
+ /**
458
+ * Target list
459
+ */
460
+ type TargetList = {
461
+ /**
462
+ * Total number of targets documents that matched your query.
463
+ */
464
+ total: number;
465
+ /**
466
+ * List of targets.
467
+ */
468
+ targets: Target[];
469
+ };
405
470
  /**
406
471
  * Migrations List
407
472
  */
@@ -1117,10 +1182,18 @@ export declare namespace Models {
1117
1182
  * Phone verification status.
1118
1183
  */
1119
1184
  phoneVerification: boolean;
1185
+ /**
1186
+ * Multi factor authentication status.
1187
+ */
1188
+ mfa: boolean;
1120
1189
  /**
1121
1190
  * User preferences as a key-value object
1122
1191
  */
1123
1192
  prefs: Preferences;
1193
+ /**
1194
+ * A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.
1195
+ */
1196
+ targets: Target[];
1124
1197
  /**
1125
1198
  * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
1126
1199
  */
@@ -1339,6 +1412,10 @@ export declare namespace Models {
1339
1412
  * Returns true if this the current user session.
1340
1413
  */
1341
1414
  current: boolean;
1415
+ /**
1416
+ * Returns true if this the current user session.
1417
+ */
1418
+ factors: number;
1342
1419
  };
1343
1420
  /**
1344
1421
  * Identity
@@ -2106,9 +2183,9 @@ export declare namespace Models {
2106
2183
  */
2107
2184
  authPersonalDataCheck: boolean;
2108
2185
  /**
2109
- * List of Providers.
2186
+ * List of Auth Providers.
2110
2187
  */
2111
- providers: Provider[];
2188
+ oAuthProviders: AuthProvider[];
2112
2189
  /**
2113
2190
  * List of Platforms.
2114
2191
  */
@@ -2221,6 +2298,10 @@ export declare namespace Models {
2221
2298
  * GraphQL service status
2222
2299
  */
2223
2300
  serviceStatusForGraphql: boolean;
2301
+ /**
2302
+ * Messaging service status
2303
+ */
2304
+ serviceStatusForMessaging: boolean;
2224
2305
  };
2225
2306
  /**
2226
2307
  * Webhook
@@ -2309,15 +2390,15 @@ export declare namespace Models {
2309
2390
  sdks: string[];
2310
2391
  };
2311
2392
  /**
2312
- * Provider
2393
+ * AuthProvider
2313
2394
  */
2314
- type Provider = {
2395
+ type AuthProvider = {
2315
2396
  /**
2316
- * Provider.
2397
+ * Auth Provider.
2317
2398
  */
2318
2399
  key: string;
2319
2400
  /**
2320
- * Provider name.
2401
+ * Auth Provider name.
2321
2402
  */
2322
2403
  name: string;
2323
2404
  /**
@@ -2329,7 +2410,7 @@ export declare namespace Models {
2329
2410
  */
2330
2411
  secret: string;
2331
2412
  /**
2332
- * Provider is active and can be used to create session.
2413
+ * Auth Provider is active and can be used to create session.
2333
2414
  */
2334
2415
  enabled: boolean;
2335
2416
  };
@@ -2574,370 +2655,360 @@ export declare namespace Models {
2574
2655
  date: string;
2575
2656
  };
2576
2657
  /**
2577
- * Metric Breakdown
2658
+ * UsageDatabases
2578
2659
  */
2579
- type MetricBreakdown = {
2660
+ type UsageDatabases = {
2580
2661
  /**
2581
- * Resource ID.
2662
+ * The time range of the usage stats.
2582
2663
  */
2583
- resourceId: string;
2664
+ range: string;
2584
2665
  /**
2585
- * Resource name.
2666
+ * Aggregated stats for total number of documents.
2586
2667
  */
2587
- name: string;
2668
+ databasesCount: Metric[];
2588
2669
  /**
2589
- * The value of this metric at the timestamp.
2670
+ * Aggregated stats for total number of documents.
2590
2671
  */
2591
- value: number;
2592
- };
2593
- /**
2594
- * UsageDatabases
2595
- */
2596
- type UsageDatabases = {
2672
+ documentsCount: Metric[];
2597
2673
  /**
2598
- * Time range of the usage stats.
2674
+ * Aggregated stats for total number of collections.
2599
2675
  */
2600
- range: string;
2676
+ collectionsCount: Metric[];
2601
2677
  /**
2602
- * Total aggregated number of databases.
2678
+ * Aggregated stats for documents created.
2603
2679
  */
2604
- databasesTotal: number;
2680
+ databasesCreate: Metric[];
2605
2681
  /**
2606
- * Total aggregated number of collections.
2682
+ * Aggregated stats for documents read.
2607
2683
  */
2608
- collectionsTotal: number;
2684
+ databasesRead: Metric[];
2609
2685
  /**
2610
- * Total aggregated number of documents.
2686
+ * Aggregated stats for documents updated.
2611
2687
  */
2612
- documentsTotal: number;
2688
+ databasesUpdate: Metric[];
2613
2689
  /**
2614
- * Aggregated number of databases per period.
2690
+ * Aggregated stats for total number of collections.
2615
2691
  */
2616
- databases: Metric[];
2692
+ databasesDelete: Metric[];
2617
2693
  /**
2618
- * Aggregated number of collections per period.
2694
+ * Aggregated stats for documents created.
2619
2695
  */
2620
- collections: Metric[];
2696
+ documentsCreate: Metric[];
2621
2697
  /**
2622
- * Aggregated number of documents per period.
2698
+ * Aggregated stats for documents read.
2623
2699
  */
2624
- documents: Metric[];
2625
- };
2626
- /**
2627
- * UsageDatabase
2628
- */
2629
- type UsageDatabase = {
2700
+ documentsRead: Metric[];
2630
2701
  /**
2631
- * Time range of the usage stats.
2702
+ * Aggregated stats for documents updated.
2632
2703
  */
2633
- range: string;
2704
+ documentsUpdate: Metric[];
2634
2705
  /**
2635
- * Total aggregated number of collections.
2706
+ * Aggregated stats for documents deleted.
2636
2707
  */
2637
- collectionsTotal: number;
2708
+ documentsDelete: Metric[];
2638
2709
  /**
2639
- * Total aggregated number of documents.
2710
+ * Aggregated stats for collections created.
2640
2711
  */
2641
- documentsTotal: number;
2712
+ collectionsCreate: Metric[];
2642
2713
  /**
2643
- * Aggregated number of collections per period.
2714
+ * Aggregated stats for collections read.
2644
2715
  */
2645
- collections: Metric[];
2716
+ collectionsRead: Metric[];
2646
2717
  /**
2647
- * Aggregated number of documents per period.
2718
+ * Aggregated stats for collections updated.
2648
2719
  */
2649
- documents: Metric[];
2720
+ collectionsUpdate: Metric[];
2721
+ /**
2722
+ * Aggregated stats for collections delete.
2723
+ */
2724
+ collectionsDelete: Metric[];
2650
2725
  };
2651
2726
  /**
2652
- * UsageCollection
2727
+ * UsageDatabase
2653
2728
  */
2654
- type UsageCollection = {
2729
+ type UsageDatabase = {
2655
2730
  /**
2656
- * Time range of the usage stats.
2731
+ * The time range of the usage stats.
2657
2732
  */
2658
2733
  range: string;
2659
2734
  /**
2660
- * Total aggregated number of of documents.
2735
+ * Aggregated stats for total number of documents.
2661
2736
  */
2662
- documentsTotal: number;
2737
+ documentsCount: Metric[];
2663
2738
  /**
2664
- * Aggregated number of documents per period.
2739
+ * Aggregated stats for total number of collections.
2665
2740
  */
2666
- documents: Metric[];
2667
- };
2668
- /**
2669
- * UsageUsers
2670
- */
2671
- type UsageUsers = {
2741
+ collectionsCount: Metric[];
2672
2742
  /**
2673
- * Time range of the usage stats.
2743
+ * Aggregated stats for documents created.
2674
2744
  */
2675
- range: string;
2745
+ documentsCreate: Metric[];
2676
2746
  /**
2677
- * Total aggregated number of statistics of users.
2747
+ * Aggregated stats for documents read.
2678
2748
  */
2679
- usersTotal: number;
2749
+ documentsRead: Metric[];
2680
2750
  /**
2681
- * Total aggregated number of active sessions.
2751
+ * Aggregated stats for documents updated.
2682
2752
  */
2683
- sessionsTotal: number;
2753
+ documentsUpdate: Metric[];
2684
2754
  /**
2685
- * Aggregated number of users per period.
2755
+ * Aggregated stats for documents deleted.
2686
2756
  */
2687
- users: Metric[];
2757
+ documentsDelete: Metric[];
2758
+ /**
2759
+ * Aggregated stats for collections created.
2760
+ */
2761
+ collectionsCreate: Metric[];
2762
+ /**
2763
+ * Aggregated stats for collections read.
2764
+ */
2765
+ collectionsRead: Metric[];
2766
+ /**
2767
+ * Aggregated stats for collections updated.
2768
+ */
2769
+ collectionsUpdate: Metric[];
2688
2770
  /**
2689
- * Aggregated number of active sessions per period.
2771
+ * Aggregated stats for collections delete.
2690
2772
  */
2691
- sessions: Metric[];
2773
+ collectionsDelete: Metric[];
2692
2774
  };
2693
2775
  /**
2694
- * StorageUsage
2776
+ * UsageCollection
2695
2777
  */
2696
- type UsageStorage = {
2778
+ type UsageCollection = {
2697
2779
  /**
2698
- * Time range of the usage stats.
2780
+ * The time range of the usage stats.
2699
2781
  */
2700
2782
  range: string;
2701
2783
  /**
2702
- * Total aggregated number of buckets
2784
+ * Aggregated stats for total number of documents.
2703
2785
  */
2704
- bucketsTotal: number;
2786
+ documentsCount: Metric[];
2705
2787
  /**
2706
- * Total aggregated number of files.
2788
+ * Aggregated stats for documents created.
2707
2789
  */
2708
- filesTotal: number;
2790
+ documentsCreate: Metric[];
2709
2791
  /**
2710
- * Total aggregated number of files storage (in bytes).
2792
+ * Aggregated stats for documents read.
2711
2793
  */
2712
- filesStorageTotal: number;
2794
+ documentsRead: Metric[];
2713
2795
  /**
2714
- * Aggregated number of buckets per period.
2796
+ * Aggregated stats for documents updated.
2715
2797
  */
2716
- buckets: Metric[];
2717
- /**
2718
- * Aggregated number of files per period.
2719
- */
2720
- files: Metric[];
2798
+ documentsUpdate: Metric[];
2721
2799
  /**
2722
- * Aggregated number of files storage (in bytes) per period .
2800
+ * Aggregated stats for documents deleted.
2723
2801
  */
2724
- storage: Metric[];
2802
+ documentsDelete: Metric[];
2725
2803
  };
2726
2804
  /**
2727
- * UsageBuckets
2805
+ * UsageUsers
2728
2806
  */
2729
- type UsageBuckets = {
2807
+ type UsageUsers = {
2730
2808
  /**
2731
- * Time range of the usage stats.
2809
+ * The time range of the usage stats.
2732
2810
  */
2733
2811
  range: string;
2734
2812
  /**
2735
- * Total aggregated number of bucket files.
2813
+ * Aggregated stats for total number of users.
2736
2814
  */
2737
- filesTotal: number;
2815
+ usersCount: Metric[];
2738
2816
  /**
2739
- * Total aggregated number of bucket files storage (in bytes).
2817
+ * Aggregated stats for users created.
2740
2818
  */
2741
- filesStorageTotal: number;
2819
+ usersCreate: Metric[];
2742
2820
  /**
2743
- * Aggregated number of bucket files per period.
2821
+ * Aggregated stats for users read.
2744
2822
  */
2745
- files: Metric[];
2823
+ usersRead: Metric[];
2746
2824
  /**
2747
- * Aggregated number of bucket storage files (in bytes) per period.
2825
+ * Aggregated stats for users updated.
2748
2826
  */
2749
- storage: Metric[];
2750
- };
2751
- /**
2752
- * UsageFunctions
2753
- */
2754
- type UsageFunctions = {
2827
+ usersUpdate: Metric[];
2755
2828
  /**
2756
- * Time range of the usage stats.
2829
+ * Aggregated stats for users deleted.
2757
2830
  */
2758
- range: string;
2831
+ usersDelete: Metric[];
2759
2832
  /**
2760
- * Total aggregated number of functions.
2833
+ * Aggregated stats for sessions created.
2761
2834
  */
2762
- functionsTotal: number;
2835
+ sessionsCreate: Metric[];
2763
2836
  /**
2764
- * Total aggregated number of functions deployments.
2837
+ * Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).
2765
2838
  */
2766
- deploymentsTotal: number;
2839
+ sessionsProviderCreate: Metric[];
2767
2840
  /**
2768
- * Total aggregated sum of functions deployment storage.
2841
+ * Aggregated stats for sessions deleted.
2769
2842
  */
2770
- deploymentsStorageTotal: number;
2843
+ sessionsDelete: Metric[];
2844
+ };
2845
+ /**
2846
+ * StorageUsage
2847
+ */
2848
+ type UsageStorage = {
2771
2849
  /**
2772
- * Total aggregated number of functions build.
2850
+ * The time range of the usage stats.
2773
2851
  */
2774
- buildsTotal: number;
2852
+ range: string;
2775
2853
  /**
2776
- * total aggregated sum of functions build storage.
2854
+ * Aggregated stats for the occupied storage size (in bytes).
2777
2855
  */
2778
- buildsStorageTotal: number;
2856
+ storage: Metric[];
2779
2857
  /**
2780
- * Total aggregated sum of functions build compute time.
2858
+ * Aggregated stats for total number of files.
2781
2859
  */
2782
- buildsTimeTotal: number;
2860
+ filesCount: Metric[];
2783
2861
  /**
2784
- * Total aggregated number of functions execution.
2862
+ * Aggregated stats for total number of buckets.
2785
2863
  */
2786
- executionsTotal: number;
2864
+ bucketsCount: Metric[];
2787
2865
  /**
2788
- * Total aggregated sum of functions execution compute time.
2866
+ * Aggregated stats for buckets created.
2789
2867
  */
2790
- executionsTimeTotal: number;
2868
+ bucketsCreate: Metric[];
2791
2869
  /**
2792
- * Aggregated number of functions per period.
2870
+ * Aggregated stats for buckets read.
2793
2871
  */
2794
- functions: Metric[];
2872
+ bucketsRead: Metric[];
2795
2873
  /**
2796
- * Aggregated number of functions deployment per period.
2874
+ * Aggregated stats for buckets updated.
2797
2875
  */
2798
- deployments: Metric[];
2876
+ bucketsUpdate: Metric[];
2799
2877
  /**
2800
- * Aggregated number of functions deployment storage per period.
2878
+ * Aggregated stats for buckets deleted.
2801
2879
  */
2802
- deploymentsStorage: Metric[];
2880
+ bucketsDelete: Metric[];
2803
2881
  /**
2804
- * Aggregated number of functions build per period.
2882
+ * Aggregated stats for files created.
2805
2883
  */
2806
- builds: Metric[];
2884
+ filesCreate: Metric[];
2807
2885
  /**
2808
- * Aggregated sum of functions build storage per period.
2886
+ * Aggregated stats for files read.
2809
2887
  */
2810
- buildsStorage: Metric[];
2888
+ filesRead: Metric[];
2811
2889
  /**
2812
- * Aggregated sum of functions build compute time per period.
2890
+ * Aggregated stats for files updated.
2813
2891
  */
2814
- buildsTime: Metric[];
2892
+ filesUpdate: Metric[];
2815
2893
  /**
2816
- * Aggregated number of functions execution per period.
2894
+ * Aggregated stats for files deleted.
2817
2895
  */
2818
- executions: Metric[];
2819
- /**
2820
- * Aggregated number of functions execution compute time per period.
2821
- */
2822
- executionsTime: Metric[];
2896
+ filesDelete: Metric[];
2823
2897
  };
2824
2898
  /**
2825
- * UsageFunction
2899
+ * UsageBuckets
2826
2900
  */
2827
- type UsageFunction = {
2901
+ type UsageBuckets = {
2828
2902
  /**
2829
2903
  * The time range of the usage stats.
2830
2904
  */
2831
2905
  range: string;
2832
2906
  /**
2833
- * Total aggregated number of function deployments.
2907
+ * Aggregated stats for total number of files in this bucket.
2834
2908
  */
2835
- deploymentsTotal: number;
2909
+ filesCount: Metric[];
2836
2910
  /**
2837
- * Total aggregated sum of function deployments storage.
2911
+ * Aggregated stats for total storage of files in this bucket.
2838
2912
  */
2839
- deploymentsStorageTotal: number;
2913
+ filesStorage: Metric[];
2840
2914
  /**
2841
- * Total aggregated number of function builds.
2915
+ * Aggregated stats for files created.
2842
2916
  */
2843
- buildsTotal: number;
2917
+ filesCreate: Metric[];
2844
2918
  /**
2845
- * total aggregated sum of function builds storage.
2919
+ * Aggregated stats for files read.
2846
2920
  */
2847
- buildsStorageTotal: number;
2921
+ filesRead: Metric[];
2848
2922
  /**
2849
- * Total aggregated sum of function builds compute time.
2923
+ * Aggregated stats for files updated.
2850
2924
  */
2851
- buildsTimeTotal: number;
2925
+ filesUpdate: Metric[];
2852
2926
  /**
2853
- * Total aggregated number of function executions.
2927
+ * Aggregated stats for files deleted.
2854
2928
  */
2855
- executionsTotal: number;
2929
+ filesDelete: Metric[];
2930
+ };
2931
+ /**
2932
+ * UsageFunctions
2933
+ */
2934
+ type UsageFunctions = {
2856
2935
  /**
2857
- * Total aggregated sum of function executions compute time.
2936
+ * The time range of the usage stats.
2858
2937
  */
2859
- executionsTimeTotal: number;
2938
+ range: string;
2860
2939
  /**
2861
- * Aggregated number of function deployments per period.
2940
+ * Aggregated stats for number of function executions.
2862
2941
  */
2863
- deployments: Metric[];
2942
+ executionsTotal: Metric[];
2864
2943
  /**
2865
- * Aggregated number of function deployments storage per period.
2944
+ * Aggregated stats for function execution failures.
2866
2945
  */
2867
- deploymentsStorage: Metric[];
2946
+ executionsFailure: Metric[];
2868
2947
  /**
2869
- * Aggregated number of function builds per period.
2948
+ * Aggregated stats for function execution successes.
2870
2949
  */
2871
- builds: Metric[];
2950
+ executionsSuccess: Metric[];
2872
2951
  /**
2873
- * Aggregated sum of function builds storage per period.
2952
+ * Aggregated stats for function execution duration.
2874
2953
  */
2875
- buildsStorage: Metric[];
2954
+ executionsTime: Metric[];
2876
2955
  /**
2877
- * Aggregated sum of function builds compute time per period.
2956
+ * Aggregated stats for number of function builds.
2878
2957
  */
2879
- buildsTime: Metric[];
2958
+ buildsTotal: Metric[];
2880
2959
  /**
2881
- * Aggregated number of function executions per period.
2960
+ * Aggregated stats for function build failures.
2882
2961
  */
2883
- executions: Metric[];
2962
+ buildsFailure: Metric[];
2884
2963
  /**
2885
- * Aggregated number of function executions compute time per period.
2964
+ * Aggregated stats for function build successes.
2886
2965
  */
2887
- executionsTime: Metric[];
2966
+ buildsSuccess: Metric[];
2967
+ /**
2968
+ * Aggregated stats for function build duration.
2969
+ */
2970
+ buildsTime: Metric[];
2888
2971
  };
2889
2972
  /**
2890
2973
  * UsageProject
2891
2974
  */
2892
2975
  type UsageProject = {
2893
2976
  /**
2894
- * Total aggregated number of function executions.
2895
- */
2896
- executionsTotal: number;
2897
- /**
2898
- * Total aggregated number of documents.
2899
- */
2900
- documentsTotal: number;
2901
- /**
2902
- * Total aggregated number of databases.
2977
+ * The time range of the usage stats.
2903
2978
  */
2904
- databasesTotal: number;
2979
+ range: string;
2905
2980
  /**
2906
- * Total aggregated number of users.
2981
+ * Aggregated stats for number of requests.
2907
2982
  */
2908
- usersTotal: number;
2983
+ requests: Metric[];
2909
2984
  /**
2910
- * Total aggregated sum of files storage size (in bytes).
2985
+ * Aggregated stats for consumed bandwidth.
2911
2986
  */
2912
- filesStorageTotal: number;
2987
+ network: Metric[];
2913
2988
  /**
2914
- * Total aggregated number of buckets.
2989
+ * Aggregated stats for function executions.
2915
2990
  */
2916
- bucketsTotal: number;
2991
+ executions: Metric[];
2917
2992
  /**
2918
- * Aggregated number of requests per period.
2993
+ * Aggregated stats for number of documents.
2919
2994
  */
2920
- requests: Metric[];
2995
+ documents: Metric[];
2921
2996
  /**
2922
- * Aggregated number of consumed bandwidth per period.
2997
+ * Aggregated stats for number of databases.
2923
2998
  */
2924
- network: Metric[];
2999
+ databases: Metric[];
2925
3000
  /**
2926
- * Aggregated number of users per period.
3001
+ * Aggregated stats for number of users.
2927
3002
  */
2928
3003
  users: Metric[];
2929
3004
  /**
2930
- * Aggregated number of executions per period.
3005
+ * Aggregated stats for the occupied storage size (in bytes).
2931
3006
  */
2932
- executions: Metric[];
2933
- /**
2934
- * Aggregated breakdown in totals of executions by functions.
2935
- */
2936
- executionsBreakdown: MetricBreakdown[];
3007
+ storage: Metric[];
2937
3008
  /**
2938
- * Aggregated breakdown in totals of usage by buckets.
3009
+ * Aggregated stats for number of buckets.
2939
3010
  */
2940
- bucketsBreakdown: MetricBreakdown[];
3011
+ buckets: Metric[];
2941
3012
  };
2942
3013
  /**
2943
3014
  * Headers
@@ -3076,6 +3147,270 @@ export declare namespace Models {
3076
3147
  */
3077
3148
  _APP_ASSISTANT_ENABLED: boolean;
3078
3149
  };
3150
+ /**
3151
+ * MFA Challenge
3152
+ */
3153
+ type MfaChallenge = {
3154
+ /**
3155
+ * Token ID.
3156
+ */
3157
+ $id: string;
3158
+ /**
3159
+ * Token creation date in ISO 8601 format.
3160
+ */
3161
+ $createdAt: string;
3162
+ /**
3163
+ * User ID.
3164
+ */
3165
+ userId: string;
3166
+ /**
3167
+ * Token expiration date in ISO 8601 format.
3168
+ */
3169
+ expire: string;
3170
+ };
3171
+ /**
3172
+ * MFAProvider
3173
+ */
3174
+ type MfaProvider = {
3175
+ /**
3176
+ * backup codes
3177
+ */
3178
+ backups: string[];
3179
+ /**
3180
+ * secret used for top auth
3181
+ */
3182
+ secret: string;
3183
+ /**
3184
+ * uri for otp app
3185
+ */
3186
+ uri: string;
3187
+ };
3188
+ /**
3189
+ * MFAProviders
3190
+ */
3191
+ type MfaProviders = {
3192
+ /**
3193
+ * TOTP
3194
+ */
3195
+ totp: boolean;
3196
+ /**
3197
+ * Phone
3198
+ */
3199
+ phone: boolean;
3200
+ /**
3201
+ * Email
3202
+ */
3203
+ email: boolean;
3204
+ };
3205
+ /**
3206
+ * Provider
3207
+ */
3208
+ type Provider = {
3209
+ /**
3210
+ * Provider ID.
3211
+ */
3212
+ $id: string;
3213
+ /**
3214
+ * Provider creation time in ISO 8601 format.
3215
+ */
3216
+ $createdAt: string;
3217
+ /**
3218
+ * Provider update date in ISO 8601 format.
3219
+ */
3220
+ $updatedAt: string;
3221
+ /**
3222
+ * The name for the provider instance.
3223
+ */
3224
+ name: string;
3225
+ /**
3226
+ * The name of the provider service.
3227
+ */
3228
+ provider: string;
3229
+ /**
3230
+ * Is provider enabled?
3231
+ */
3232
+ enabled: boolean;
3233
+ /**
3234
+ * Type of provider.
3235
+ */
3236
+ type: string;
3237
+ /**
3238
+ * Provider credentials.
3239
+ */
3240
+ credentials: object;
3241
+ /**
3242
+ * Provider options.
3243
+ */
3244
+ options?: object;
3245
+ };
3246
+ /**
3247
+ * Message
3248
+ */
3249
+ type Message = {
3250
+ /**
3251
+ * Message ID.
3252
+ */
3253
+ $id: string;
3254
+ /**
3255
+ * Message creation time in ISO 8601 format.
3256
+ */
3257
+ $createdAt: string;
3258
+ /**
3259
+ * Message update date in ISO 8601 format.
3260
+ */
3261
+ $updatedAt: string;
3262
+ /**
3263
+ * Message provider type.
3264
+ */
3265
+ providerType: string;
3266
+ /**
3267
+ * Topic IDs set as recipients.
3268
+ */
3269
+ topics: string[];
3270
+ /**
3271
+ * User IDs set as recipients.
3272
+ */
3273
+ users: string[];
3274
+ /**
3275
+ * Target IDs set as recipients.
3276
+ */
3277
+ targets: string[];
3278
+ /**
3279
+ * The scheduled time for message.
3280
+ */
3281
+ scheduledAt?: string;
3282
+ /**
3283
+ * The time when the message was delivered.
3284
+ */
3285
+ deliveredAt?: string;
3286
+ /**
3287
+ * Delivery errors if any.
3288
+ */
3289
+ deliveryErrors?: string[];
3290
+ /**
3291
+ * Number of recipients the message was delivered to.
3292
+ */
3293
+ deliveredTotal: number;
3294
+ /**
3295
+ * Data of the message.
3296
+ */
3297
+ data: object;
3298
+ /**
3299
+ * Status of delivery.
3300
+ */
3301
+ status: string;
3302
+ /**
3303
+ * Message description.
3304
+ */
3305
+ description?: string;
3306
+ };
3307
+ /**
3308
+ * Topic
3309
+ */
3310
+ type Topic = {
3311
+ /**
3312
+ * Topic ID.
3313
+ */
3314
+ $id: string;
3315
+ /**
3316
+ * Topic creation time in ISO 8601 format.
3317
+ */
3318
+ $createdAt: string;
3319
+ /**
3320
+ * Topic update date in ISO 8601 format.
3321
+ */
3322
+ $updatedAt: string;
3323
+ /**
3324
+ * The name of the topic.
3325
+ */
3326
+ name: string;
3327
+ /**
3328
+ * Total count of subscribers subscribed to topic.
3329
+ */
3330
+ total: number;
3331
+ /**
3332
+ * Description of the topic.
3333
+ */
3334
+ description?: string;
3335
+ };
3336
+ /**
3337
+ * Subscriber
3338
+ */
3339
+ type Subscriber = {
3340
+ /**
3341
+ * Subscriber ID.
3342
+ */
3343
+ $id: string;
3344
+ /**
3345
+ * Subscriber creation time in ISO 8601 format.
3346
+ */
3347
+ $createdAt: string;
3348
+ /**
3349
+ * Subscriber update date in ISO 8601 format.
3350
+ */
3351
+ $updatedAt: string;
3352
+ /**
3353
+ * Target ID.
3354
+ */
3355
+ targetId: string;
3356
+ /**
3357
+ * Target.
3358
+ */
3359
+ target: Target;
3360
+ /**
3361
+ * Topic ID.
3362
+ */
3363
+ userId: string;
3364
+ /**
3365
+ * User Name.
3366
+ */
3367
+ userName: string;
3368
+ /**
3369
+ * Topic ID.
3370
+ */
3371
+ topicId: string;
3372
+ /**
3373
+ * The target provider type. Can be one of the following: `email`, `sms` or `push`.
3374
+ */
3375
+ providerType: string;
3376
+ };
3377
+ /**
3378
+ * Target
3379
+ */
3380
+ type Target = {
3381
+ /**
3382
+ * Target ID.
3383
+ */
3384
+ $id: string;
3385
+ /**
3386
+ * Target creation time in ISO 8601 format.
3387
+ */
3388
+ $createdAt: string;
3389
+ /**
3390
+ * Target update date in ISO 8601 format.
3391
+ */
3392
+ $updatedAt: string;
3393
+ /**
3394
+ * Target Name.
3395
+ */
3396
+ name: string;
3397
+ /**
3398
+ * User ID.
3399
+ */
3400
+ userId: string;
3401
+ /**
3402
+ * Provider ID.
3403
+ */
3404
+ providerId?: string;
3405
+ /**
3406
+ * The target provider type. Can be one of the following: `email`, `sms` or `push`.
3407
+ */
3408
+ providerType: string;
3409
+ /**
3410
+ * The target identifier.
3411
+ */
3412
+ identifier: string;
3413
+ };
3079
3414
  /**
3080
3415
  * Migration
3081
3416
  */