palbase 0.14.0 → 0.14.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 (53) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{MDKUD5KF.js → 3AENUHVO.js} +2 -2
  8. package/dist/chunks/{VI7VITLG.js → 427AGWP3.js} +2 -2
  9. package/dist/chunks/{VYPEK5RA.js → 44ULNVPP.js} +1 -1
  10. package/dist/chunks/{YX4W5H7Q.js → 4UQ4J7RV.js} +2 -2
  11. package/dist/chunks/{JGUZOLS4.js → 5H7UNNH6.js} +2 -2
  12. package/dist/chunks/{R2FKMKIY.js → 6NC5RYCS.js} +1 -1
  13. package/dist/chunks/{DQ4XHMZN.js → 7DQ76T2V.js} +2 -2
  14. package/dist/chunks/{OIKBZFMC.js → A46IASZE.js} +2 -2
  15. package/dist/chunks/{FGKFL5W3.js → BRHGS5AI.js} +2 -2
  16. package/dist/chunks/{XA7ML545.js → CUL5OL4P.js} +2 -2
  17. package/dist/chunks/{7MGWLEW2.js → DIOZGDFQ.js} +1 -1
  18. package/dist/chunks/{XUX2HR4Z.js → HHZSOYPP.js} +1 -1
  19. package/dist/chunks/{QGGRIABQ.js → JKWWY2LJ.js} +2 -2
  20. package/dist/chunks/LUFWGH2V.js +2 -0
  21. package/dist/chunks/OMK2YEDZ.js +2 -0
  22. package/dist/chunks/{22WJEDHI.js → P67I4TNQ.js} +1 -1
  23. package/dist/chunks/{KOR6BP5M.js → PRJZTG2I.js} +1 -1
  24. package/dist/chunks/{UUS5URWX.js → QZH6GPCR.js} +2 -2
  25. package/dist/chunks/{AGZIRK5O.js → RD5JFDGQ.js} +2 -2
  26. package/dist/chunks/{FQV5NKI4.js → SBUC7GHR.js} +2 -2
  27. package/dist/chunks/{ZSICMUJY.js → W3OCV3QH.js} +2 -2
  28. package/dist/chunks/{OG5U5HFP.js → WXNFMEW7.js} +2 -2
  29. package/dist/chunks/{HQTKK3LU.js → ZZNGA77G.js} +1 -1
  30. package/dist/cli.js +130 -130
  31. package/dist/refuse/ai.js +1 -1
  32. package/dist/refuse/backend.js +1 -1
  33. package/dist/refuse/server.js +1 -1
  34. package/dist/server/index.js +2 -2
  35. package/dist/server/testing.js +2 -2
  36. package/dist/web/index.js +2 -2
  37. package/dist/web/message.js +2 -2
  38. package/dist/web/palbe.js +2 -2
  39. package/dist/web/paywall.js +2 -2
  40. package/dist/web/push-sw.js +1 -1
  41. package/dist/web/ssr.js +2 -2
  42. package/dist/web/vite.js +2 -2
  43. package/package.json +2 -2
  44. package/types/internal/src/modules/ai.d.ts +3 -7
  45. package/types/internal/src/modules/events.d.ts +4 -3
  46. package/types/internal/src/modules/index.d.ts +1 -0
  47. package/types/internal/src/modules/journeys.d.ts +1223 -0
  48. package/types/internal/src/modules/notify.d.ts +8 -0
  49. package/types/internal/src/modules/secrets.d.ts +1 -1
  50. package/types/internal/src/modules/stores.d.ts +777 -0
  51. package/types/server/src/transit.d.ts +8 -1
  52. package/dist/chunks/5LC7GWQ4.js +0 -2
  53. package/dist/chunks/XMJ4WMD2.js +0 -2
@@ -110,6 +110,31 @@ export type ActionPage = {
110
110
  */
111
111
  next_cursor?: string;
112
112
  };
113
+ /**
114
+ * A rate Play saw go wrong against the 28 days before.
115
+ */
116
+ export type Anomaly = {
117
+ /**
118
+ * Its first day.
119
+ */
120
+ from?: string;
121
+ /**
122
+ * The rate.
123
+ */
124
+ metric: string;
125
+ /**
126
+ * Its last.
127
+ */
128
+ to?: string;
129
+ /**
130
+ * Its value.
131
+ */
132
+ value: number | null;
133
+ /**
134
+ * The version code, when it is one's.
135
+ */
136
+ version_code?: number;
137
+ };
113
138
  /**
114
139
  * An app of the project linked to its store: an iOS app to the App Store, an Android app to Google Play.
115
140
  */
@@ -460,6 +485,103 @@ export type AppleGrant = {
460
485
  */
461
486
  grant: string;
462
487
  };
488
+ /**
489
+ * What App Store Connect keeps of an iOS app's health.
490
+ */
491
+ export type AppleHealth = {
492
+ /**
493
+ * ok; none_yet: Apple's report has no day yet; requested: asked of Apple now, its first days come in a day or two; not_requested: the module asks with its next round; admin_key_needed: only an Admin key may ask Apple for an app's analytics reports.
494
+ */
495
+ crash_counts: "ok" | "none_yet" | "requested" | "not_requested" | "admin_key_needed";
496
+ /**
497
+ * App Store crashes by day and version, the last 30 days, newest first.
498
+ */
499
+ crash_days: CrashDay[];
500
+ /**
501
+ * Its App Store versions' terminations, hangs and launches.
502
+ */
503
+ metrics: HealthMetric[];
504
+ /**
505
+ * The newest builds' TestFlight counts, newest first: what Apple counted of each from its upload, at most a year back.
506
+ */
507
+ testflight_builds: TestFlightBuildUsage[];
508
+ /**
509
+ * The newest crashes testers sent from TestFlight (read one with its log: GET …/feedback/crash/{id}).
510
+ */
511
+ testflight_crashes: Feedback[];
512
+ };
513
+ /**
514
+ * App Store Connect's webhook event: its JSON:API envelope (data: type, id, attributes, relationships.instance), as Apple sends it.
515
+ */
516
+ export type AppleWebhookDelivery = {
517
+ [key: string]: unknown;
518
+ };
519
+ /**
520
+ * stores.beta_review.changed: a build's TestFlight state for external testers changed (in Beta App Review, approved, rejected, ready for testing…).
521
+ */
522
+ export type BetaReviewChangedEvent = {
523
+ /**
524
+ * The app.
525
+ */
526
+ app_id: string;
527
+ /**
528
+ * App Store Connect's id of the build.
529
+ */
530
+ asc_build_id: string;
531
+ /**
532
+ * Its external state now.
533
+ */
534
+ state: string;
535
+ /**
536
+ * What it was.
537
+ */
538
+ previous_state: string | null;
539
+ /**
540
+ * The package a delivery of the module's sent it of; null otherwise.
541
+ */
542
+ package_id: string | null;
543
+ /**
544
+ * Who said it: apple_webhook (App Store Connect's webhook, the moment it happened), poll (the module's read), action (the module's own action).
545
+ */
546
+ source: "apple_webhook" | "poll" | "action";
547
+ };
548
+ /**
549
+ * stores.build.changed: App Store Connect said a build upload of the app came to a new state (processing, complete, failed) — the module's deliveries' and a build uploaded any other way.
550
+ */
551
+ export type BuildChangedEvent = {
552
+ /**
553
+ * The app.
554
+ */
555
+ app_id: string;
556
+ /**
557
+ * App Store Connect's id of the upload.
558
+ */
559
+ asc_upload_id: string;
560
+ /**
561
+ * Its build's, once it has one.
562
+ */
563
+ asc_build_id: string | null;
564
+ /**
565
+ * The build's version.
566
+ */
567
+ version: string;
568
+ /**
569
+ * Its build number.
570
+ */
571
+ build_number: string;
572
+ /**
573
+ * What the upload is now.
574
+ */
575
+ state: string;
576
+ /**
577
+ * The package a delivery of the module's sent it of; null for a build uploaded another way.
578
+ */
579
+ package_id: string | null;
580
+ /**
581
+ * Who said it: apple_webhook (App Store Connect's webhook, the moment it happened), poll (the module's read), action (the module's own action).
582
+ */
583
+ source: "apple_webhook" | "poll" | "action";
584
+ };
463
585
  /**
464
586
  * Where a Play delivery's signed bundle is downloaded from: the project's own address, with a token sealed for that bundle.
465
587
  */
@@ -525,6 +647,27 @@ export type ConnectAppleKeyRequest = {
525
647
  */
526
648
  private_key: string;
527
649
  };
650
+ /**
651
+ * A day's App Store crashes of a version, as the App Crashes report counts them.
652
+ */
653
+ export type CrashDay = {
654
+ /**
655
+ * Crashes that day.
656
+ */
657
+ crashes: number;
658
+ /**
659
+ * The day.
660
+ */
661
+ date: string;
662
+ /**
663
+ * Devices they were on.
664
+ */
665
+ devices: number;
666
+ /**
667
+ * The app's version.
668
+ */
669
+ version: string;
670
+ };
528
671
  /**
529
672
  * A package of an app.
530
673
  */
@@ -680,6 +823,47 @@ export type DeliveryRequestedEvent = {
680
823
  */
681
824
  package_id: string;
682
825
  };
826
+ /**
827
+ * One of an Android app's errors, as Play groups its reports.
828
+ */
829
+ export type ErrorIssue = {
830
+ /**
831
+ * What happened.
832
+ */
833
+ cause: string;
834
+ /**
835
+ * The first version code it was seen in.
836
+ */
837
+ first_version_code?: number;
838
+ /**
839
+ * Its last report.
840
+ */
841
+ last_report_at?: string;
842
+ /**
843
+ * The last.
844
+ */
845
+ last_version_code?: number;
846
+ /**
847
+ * Where.
848
+ */
849
+ location: string;
850
+ /**
851
+ * Reports of it.
852
+ */
853
+ reports: number;
854
+ /**
855
+ * CRASH, ANR or NON_FATAL.
856
+ */
857
+ type: string;
858
+ /**
859
+ * It in Play Console.
860
+ */
861
+ uri?: string;
862
+ /**
863
+ * Users it reached.
864
+ */
865
+ users: number;
866
+ };
683
867
  export type ErrorResponse = {
684
868
  /**
685
869
  * Machine-readable error code (snake_case)
@@ -727,6 +911,88 @@ export type Feedback = {
727
911
  */
728
912
  kind: "screenshot" | "crash";
729
913
  };
914
+ /**
915
+ * A tester's TestFlight feedback as Apple keeps it: from what device and build, with a crash's log.
916
+ */
917
+ export type FeedbackDetail = {
918
+ /**
919
+ * App Store Connect's id of the build the tester ran.
920
+ */
921
+ asc_build_id?: string;
922
+ /**
923
+ * The build's bundle id.
924
+ */
925
+ bundle_id?: string;
926
+ /**
927
+ * What the tester wrote.
928
+ */
929
+ comment?: string;
930
+ /**
931
+ * A crash's log, cut at 32 KiB (the exception and the crashed thread come first); none when Apple has none.
932
+ */
933
+ crash_log?: string;
934
+ /**
935
+ * Whether the log was cut.
936
+ */
937
+ crash_log_cut?: boolean;
938
+ /**
939
+ * When it was sent.
940
+ */
941
+ created_at: string;
942
+ /**
943
+ * The device (Apple's model id, iPhone17,1).
944
+ */
945
+ device_model?: string;
946
+ /**
947
+ * The tester's address.
948
+ */
949
+ email?: string;
950
+ /**
951
+ * Apple's id.
952
+ */
953
+ id: string;
954
+ /**
955
+ * What it is.
956
+ */
957
+ kind: "screenshot" | "crash";
958
+ /**
959
+ * Its locale.
960
+ */
961
+ locale?: string;
962
+ /**
963
+ * Its system's version.
964
+ */
965
+ os_version?: string;
966
+ /**
967
+ * The app's platform.
968
+ */
969
+ platform?: string;
970
+ /**
971
+ * A screenshot feedback's images.
972
+ */
973
+ screenshots?: FeedbackImage[];
974
+ };
975
+ /**
976
+ * One of a screenshot feedback's images: Apple's link, which expires.
977
+ */
978
+ export type FeedbackImage = {
979
+ /**
980
+ * When Apple's link stops working.
981
+ */
982
+ expires_at: string;
983
+ /**
984
+ * Its height in pixels.
985
+ */
986
+ height: number;
987
+ /**
988
+ * The image.
989
+ */
990
+ url: string;
991
+ /**
992
+ * Its width in pixels.
993
+ */
994
+ width: number;
995
+ };
730
996
  /**
731
997
  * An app's newest tester feedback.
732
998
  */
@@ -736,6 +1002,67 @@ export type FeedbackPage = {
736
1002
  */
737
1003
  feedback: Feedback[];
738
1004
  };
1005
+ /**
1006
+ * stores.feedback.received: a tester sent TestFlight feedback — a crash with its log, or a screenshot. Never the tester's address: GET /stores/apps/{app_id}/feedback/{kind}/{id} reads it.
1007
+ */
1008
+ export type FeedbackReceivedEvent = {
1009
+ /**
1010
+ * The app.
1011
+ */
1012
+ app_id: string;
1013
+ /**
1014
+ * What it is.
1015
+ */
1016
+ kind: "crash" | "screenshot";
1017
+ /**
1018
+ * Apple's id of it.
1019
+ */
1020
+ feedback_id: string;
1021
+ /**
1022
+ * When it was sent.
1023
+ */
1024
+ created_at: string;
1025
+ /**
1026
+ * What the tester wrote.
1027
+ */
1028
+ comment: string | null;
1029
+ /**
1030
+ * The device.
1031
+ */
1032
+ device_model: string | null;
1033
+ /**
1034
+ * Its system's version.
1035
+ */
1036
+ os_version: string | null;
1037
+ /**
1038
+ * Its locale.
1039
+ */
1040
+ locale: string | null;
1041
+ /**
1042
+ * The build the tester ran.
1043
+ */
1044
+ asc_build_id: string | null;
1045
+ /**
1046
+ * The package a delivery of the module's sent it of.
1047
+ */
1048
+ package_id: string | null;
1049
+ /**
1050
+ * A crash's log, cut at 32 KiB.
1051
+ */
1052
+ crash_log: string | null;
1053
+ /**
1054
+ * Whether the log was cut.
1055
+ */
1056
+ crash_log_cut: boolean;
1057
+ /**
1058
+ * A screenshot feedback's images (Apple's links, which expire).
1059
+ */
1060
+ screenshots: FeedbackImage[];
1061
+ /**
1062
+ * Who said it: apple_webhook (App Store Connect's webhook, the moment it happened), poll (the module's read), action (the module's own action).
1063
+ */
1064
+ source: "apple_webhook" | "poll" | "action";
1065
+ };
739
1066
  /**
740
1067
  * The project's Play connection as the API shows it: the service account its Play Console invites, and what Play let it reach. There is no key: Palbase acts as the account.
741
1068
  */
@@ -941,6 +1268,39 @@ export type GroupTester = {
941
1268
  */
942
1269
  side: "internal" | "external";
943
1270
  };
1271
+ /**
1272
+ * One value of an app's power and performance metrics, as Apple publishes them once enough people who share their data ran its App Store version.
1273
+ */
1274
+ export type HealthMetric = {
1275
+ /**
1276
+ * TERMINATION, HANG or LAUNCH.
1277
+ */
1278
+ category: string;
1279
+ /**
1280
+ * The devices it is of (all_iphones, …).
1281
+ */
1282
+ device?: string;
1283
+ /**
1284
+ * The metric.
1285
+ */
1286
+ identifier: string;
1287
+ /**
1288
+ * The percentile it is of.
1289
+ */
1290
+ percentile?: string;
1291
+ /**
1292
+ * Its unit.
1293
+ */
1294
+ unit?: string;
1295
+ /**
1296
+ * The value.
1297
+ */
1298
+ value: number;
1299
+ /**
1300
+ * The app's version.
1301
+ */
1302
+ version: string;
1303
+ };
944
1304
  /**
945
1305
  * The build as the build machine made it: an unsigned .ipa, or an Android App Bundle (.aab) — unsigned, or signed with the app's upload key.
946
1306
  */
@@ -1320,6 +1680,101 @@ export type PlannedShot = {
1320
1680
  */
1321
1681
  format: "png" | "jpeg";
1322
1682
  };
1683
+ /**
1684
+ * stores.play_release.changed: a release on one of an Android app's Play tracks came to a new state (draft, in review, approved, not approved, published).
1685
+ */
1686
+ export type PlayReleaseChangedEvent = {
1687
+ /**
1688
+ * The app.
1689
+ */
1690
+ app_id: string;
1691
+ /**
1692
+ * Its package name.
1693
+ */
1694
+ package_name: string;
1695
+ /**
1696
+ * The track.
1697
+ */
1698
+ track: string;
1699
+ /**
1700
+ * The release.
1701
+ */
1702
+ release_name: string;
1703
+ /**
1704
+ * The version codes it carries.
1705
+ */
1706
+ version_codes: number[];
1707
+ /**
1708
+ * What it is now.
1709
+ */
1710
+ state: string;
1711
+ /**
1712
+ * What it was; null when first seen.
1713
+ */
1714
+ previous_state: string | null;
1715
+ /**
1716
+ * Who said it: apple_webhook (App Store Connect's webhook, the moment it happened), poll (the module's read), action (the module's own action).
1717
+ */
1718
+ source: "apple_webhook" | "poll" | "action";
1719
+ };
1720
+ /**
1721
+ * What Google Play's Android vitals have of an Android app's health.
1722
+ */
1723
+ export type PlayVitals = {
1724
+ /**
1725
+ * What Play flagged.
1726
+ */
1727
+ anomalies: Anomaly[];
1728
+ /**
1729
+ * The app's errors of the last day, most reports first.
1730
+ */
1731
+ issues: ErrorIssue[];
1732
+ /**
1733
+ * The last whole day (Play's, America/Los_Angeles) the rates are of; null while Play has none.
1734
+ */
1735
+ through: string | null;
1736
+ /**
1737
+ * Each version code's rates, highest first.
1738
+ */
1739
+ versions: VersionRates[];
1740
+ };
1741
+ /**
1742
+ * stores.product.changed: an in-app purchase's or a subscription's App Store state changed — sent to App Review with a version, approved, rejected, back to ready to submit.
1743
+ */
1744
+ export type ProductChangedEvent = {
1745
+ /**
1746
+ * The app.
1747
+ */
1748
+ app_id: string;
1749
+ /**
1750
+ * The store.
1751
+ */
1752
+ store: "app_store";
1753
+ /**
1754
+ * Its product id.
1755
+ */
1756
+ product_id: string;
1757
+ /**
1758
+ * App Store Connect's id of it.
1759
+ */
1760
+ apple_id: string;
1761
+ /**
1762
+ * What it is.
1763
+ */
1764
+ kind: "subscription" | "in_app_purchase";
1765
+ /**
1766
+ * Its state now.
1767
+ */
1768
+ state: string;
1769
+ /**
1770
+ * What it was.
1771
+ */
1772
+ previous_state: string | null;
1773
+ /**
1774
+ * Who said it: apple_webhook (App Store Connect's webhook, the moment it happened), poll (the module's read), action (the module's own action).
1775
+ */
1776
+ source: "apple_webhook" | "poll" | "action";
1777
+ };
1323
1778
  /**
1324
1779
  * One thing the sandbox needs.
1325
1780
  */
@@ -1578,6 +2033,59 @@ export type SubmitRequest = {
1578
2033
  */
1579
2034
  in_app_purchases?: string[];
1580
2035
  };
2036
+ /**
2037
+ * What TestFlight counted of one of an iOS app's builds, as Apple keeps it.
2038
+ */
2039
+ export type TestFlightBuildUsage = {
2040
+ /**
2041
+ * The build at App Store Connect.
2042
+ */
2043
+ asc_build_id: string;
2044
+ /**
2045
+ * Its build number (CFBundleVersion).
2046
+ */
2047
+ build_number: string;
2048
+ /**
2049
+ * Crashes on testers' devices.
2050
+ */
2051
+ crashes: number;
2052
+ /**
2053
+ * Whether it expired in TestFlight.
2054
+ */
2055
+ expired: boolean;
2056
+ /**
2057
+ * Feedback testers sent of it.
2058
+ */
2059
+ feedback: number;
2060
+ /**
2061
+ * The first day Apple counted (absent while Apple keeps no counts of it).
2062
+ */
2063
+ from?: string;
2064
+ /**
2065
+ * Installs by testers.
2066
+ */
2067
+ installs: number;
2068
+ /**
2069
+ * Invitations it went out with.
2070
+ */
2071
+ invites: number;
2072
+ /**
2073
+ * Sessions testers ran it.
2074
+ */
2075
+ sessions: number;
2076
+ /**
2077
+ * The last day Apple counted.
2078
+ */
2079
+ to?: string;
2080
+ /**
2081
+ * When it was uploaded.
2082
+ */
2083
+ uploaded_at: string;
2084
+ /**
2085
+ * Its app version (CFBundleShortVersionString).
2086
+ */
2087
+ version: string;
2088
+ };
1581
2089
  /**
1582
2090
  * A person to have in a group.
1583
2091
  */
@@ -1666,6 +2174,39 @@ export type VersionChangedEvent = {
1666
2174
  * App Review's answer: approved, rejected; null when the state is none.
1667
2175
  */
1668
2176
  result: ("approved" | "rejected" | null) | null;
2177
+ /**
2178
+ * Who said it: apple_webhook (App Store Connect's webhook, the moment it happened), poll (the module's read), action (the module's own action).
2179
+ */
2180
+ source: "apple_webhook" | "poll" | "action";
2181
+ };
2182
+ /**
2183
+ * One version code's crash and ANR rates — fractions of its users, over the seven days to `through`, weighted by users (Play's 7-day user-weighted rates); null where Play has too few users.
2184
+ */
2185
+ export type VersionRates = {
2186
+ /**
2187
+ * Users who had an ANR.
2188
+ */
2189
+ anr_rate: number | null;
2190
+ /**
2191
+ * Users who had a crash.
2192
+ */
2193
+ crash_rate: number | null;
2194
+ /**
2195
+ * Users who had an ANR while using the app.
2196
+ */
2197
+ user_perceived_anr_rate: number | null;
2198
+ /**
2199
+ * Users who had a crash while using the app.
2200
+ */
2201
+ user_perceived_crash_rate: number | null;
2202
+ /**
2203
+ * Its users that day.
2204
+ */
2205
+ users: number;
2206
+ /**
2207
+ * The version code.
2208
+ */
2209
+ version_code: number;
1669
2210
  };
1670
2211
  /**
1671
2212
  * stores.version.reviewed: App Review approved or rejected a project's version. Sent to Palbase's own project, whose Studio tells the organization's owners.
@@ -1700,6 +2241,70 @@ export type VersionReviewedEvent = {
1700
2241
  */
1701
2242
  result: "approved" | "rejected";
1702
2243
  };
2244
+ /**
2245
+ * An app's health as its store has it, read now. A new day of it is the environment's stores.vitals.changed.
2246
+ */
2247
+ export type Vitals = {
2248
+ /**
2249
+ * The app.
2250
+ */
2251
+ app_id: string;
2252
+ apple?: AppleHealth;
2253
+ /**
2254
+ * Its platform.
2255
+ */
2256
+ platform: "ios" | "android";
2257
+ play?: PlayVitals;
2258
+ /**
2259
+ * When it was read.
2260
+ */
2261
+ read_at: string;
2262
+ /**
2263
+ * The last day the store's crash data is of; null while it has none.
2264
+ */
2265
+ through: string | null;
2266
+ };
2267
+ /**
2268
+ * stores.vitals.changed: the store published a new day of an app's crash data. The rest of it: GET /stores/apps/{app_id}/vitals.
2269
+ */
2270
+ export type VitalsChangedEvent = {
2271
+ /**
2272
+ * The app.
2273
+ */
2274
+ app_id: string;
2275
+ /**
2276
+ * Its platform.
2277
+ */
2278
+ platform: "ios" | "android";
2279
+ /**
2280
+ * The day it is of.
2281
+ */
2282
+ through: string;
2283
+ /**
2284
+ * The store.
2285
+ */
2286
+ store: "app_store" | "play_store";
2287
+ /**
2288
+ * Play: each version code's rates (the newest ten).
2289
+ */
2290
+ versions?: VersionRates[];
2291
+ /**
2292
+ * Play: the anomalies it flagged.
2293
+ */
2294
+ anomalies?: number;
2295
+ /**
2296
+ * Play: the errors of the day.
2297
+ */
2298
+ issues?: number;
2299
+ /**
2300
+ * The App Store: the day's crashes by version.
2301
+ */
2302
+ crash_days?: CrashDay[];
2303
+ /**
2304
+ * The App Store: the newest TestFlight crashes Apple keeps.
2305
+ */
2306
+ testflight_crashes?: number;
2307
+ };
1703
2308
  /**
1704
2309
  * The state the module last saw of the app's newest submitted version.
1705
2310
  */
@@ -1721,6 +2326,72 @@ export type WatchedVersion = {
1721
2326
  */
1722
2327
  checked_at: string;
1723
2328
  };
2329
+ /**
2330
+ * stores.webhook.changed: an app's App Store Connect webhook came on, or was refused (the key's role) or failed.
2331
+ */
2332
+ export type WebhookChangedEvent = {
2333
+ /**
2334
+ * The app.
2335
+ */
2336
+ app_id: string;
2337
+ /**
2338
+ * What it is now.
2339
+ */
2340
+ state: "on" | "refused" | "failed";
2341
+ /**
2342
+ * App Store Connect's id of it; null when it is not on.
2343
+ */
2344
+ asc_webhook_id: string | null;
2345
+ /**
2346
+ * Why it is not on; null when it is.
2347
+ */
2348
+ error: string | null;
2349
+ };
2350
+ /**
2351
+ * An app's App Store Connect webhook, which the module makes for it: Apple tells it each change of the app's version, builds and testers' feedback the moment it happens. The module's reads stay behind it.
2352
+ */
2353
+ export type WebhookInfo = {
2354
+ /**
2355
+ * App Store Connect's id of it.
2356
+ */
2357
+ asc_webhook_id?: string;
2358
+ /**
2359
+ * When the module last made or checked it.
2360
+ */
2361
+ checked_at?: string;
2362
+ /**
2363
+ * Why it is not on.
2364
+ */
2365
+ error?: string;
2366
+ /**
2367
+ * What Apple tells it.
2368
+ */
2369
+ event_types: string[];
2370
+ /**
2371
+ * When it was made, or pointed here again.
2372
+ */
2373
+ installed_at?: string;
2374
+ /**
2375
+ * When Apple last delivered to it.
2376
+ */
2377
+ last_delivery_at?: string;
2378
+ /**
2379
+ * What Apple last delivered (App Store Connect's event type).
2380
+ */
2381
+ last_delivery_type?: string;
2382
+ /**
2383
+ * When Apple last delivered a ping (POST …/webhook/ping).
2384
+ */
2385
+ pinged_at?: string;
2386
+ /**
2387
+ * on; refused: the connected key's role may not make webhooks (Admin or App Manager may); failed: Apple refused it otherwise; none: not made yet. While it is not on, the module reads Apple every few minutes.
2388
+ */
2389
+ state: "on" | "refused" | "failed" | "none";
2390
+ /**
2391
+ * Where Apple reports: the environment's own address.
2392
+ */
2393
+ url?: string;
2394
+ };
1724
2395
  /**
1725
2396
  * A build's note to testers.
1726
2397
  */
@@ -1748,6 +2419,14 @@ export interface Events {
1748
2419
  * stores.apple.changed: the project's Apple account was connected, checked (and Apple's answer changed) or disconnected. Never the key.
1749
2420
  */
1750
2421
  "stores.apple.changed": AppleChangedEvent;
2422
+ /**
2423
+ * stores.beta_review.changed: a build's TestFlight state for external testers changed (in Beta App Review, approved, rejected, ready for testing…).
2424
+ */
2425
+ "stores.beta_review.changed": BetaReviewChangedEvent;
2426
+ /**
2427
+ * stores.build.changed: App Store Connect said a build upload of the app came to a new state (processing, complete, failed) — the module's deliveries' and a build uploaded any other way.
2428
+ */
2429
+ "stores.build.changed": BuildChangedEvent;
1751
2430
  /**
1752
2431
  * stores.delivery.changed: a delivery moved: queued, signing, uploading, processing, compliance, ready or failed.
1753
2432
  */
@@ -1756,6 +2435,10 @@ export interface Events {
1756
2435
  * stores.delivery.requested: a delivery was sent (or sent again); the stores module runs it.
1757
2436
  */
1758
2437
  "stores.delivery.requested": DeliveryRequestedEvent;
2438
+ /**
2439
+ * stores.feedback.received: a tester sent TestFlight feedback — a crash with its log, or a screenshot. Never the tester's address: GET /stores/apps/{app_id}/feedback/{kind}/{id} reads it.
2440
+ */
2441
+ "stores.feedback.received": FeedbackReceivedEvent;
1759
2442
  /**
1760
2443
  * stores.google.changed: the project's Play connection was made, checked (and Play's answer changed) or disconnected.
1761
2444
  */
@@ -1768,6 +2451,14 @@ export interface Events {
1768
2451
  * stores.package.changed: a package was made, or its build arrived.
1769
2452
  */
1770
2453
  "stores.package.changed": PackageChangedEvent;
2454
+ /**
2455
+ * stores.play_release.changed: a release on one of an Android app's Play tracks came to a new state (draft, in review, approved, not approved, published).
2456
+ */
2457
+ "stores.play_release.changed": PlayReleaseChangedEvent;
2458
+ /**
2459
+ * stores.product.changed: an in-app purchase's or a subscription's App Store state changed — sent to App Review with a version, approved, rejected, back to ready to submit.
2460
+ */
2461
+ "stores.product.changed": ProductChangedEvent;
1771
2462
  /**
1772
2463
  * stores.version.changed: an app's App Store version came to a new state (sent to App Review, in review, approved, rejected, withdrawn, released).
1773
2464
  */
@@ -1776,6 +2467,14 @@ export interface Events {
1776
2467
  * stores.version.reviewed: App Review approved or rejected a project's version. Sent to Palbase's own project, whose Studio tells the organization's owners.
1777
2468
  */
1778
2469
  "stores.version.reviewed": VersionReviewedEvent;
2470
+ /**
2471
+ * stores.vitals.changed: the store published a new day of an app's crash data. The rest of it: GET /stores/apps/{app_id}/vitals.
2472
+ */
2473
+ "stores.vitals.changed": VitalsChangedEvent;
2474
+ /**
2475
+ * stores.webhook.changed: an app's App Store Connect webhook came on, or was refused (the key's role) or failed.
2476
+ */
2477
+ "stores.webhook.changed": WebhookChangedEvent;
1779
2478
  }
1780
2479
  /** Palbase Stores */
1781
2480
  export declare function client(t: Transport): {
@@ -1938,6 +2637,19 @@ export declare function client(t: Transport): {
1938
2637
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1939
2638
  signal?: AbortSignal;
1940
2639
  }): Promise<Reply<200, FeedbackPage>>;
2640
+ /**
2641
+ * Read one tester feedback
2642
+ *
2643
+ * One of the app's TestFlight feedback submissions as Apple keeps it: the device, the build, and a crash's log.
2644
+ */
2645
+ getFeedback(input: {
2646
+ path: {
2647
+ app_id: string; /** Its kind. */
2648
+ kind: "crash" | "screenshot"; /** Apple's id of it. */
2649
+ feedback_id: string;
2650
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2651
+ signal?: AbortSignal;
2652
+ }): Promise<Reply<200, FeedbackDetail>>;
1941
2653
  /**
1942
2654
  * List an app's groups
1943
2655
  *
@@ -2177,6 +2889,56 @@ export declare function client(t: Transport): {
2177
2889
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2178
2890
  signal?: AbortSignal;
2179
2891
  }): Promise<Reply<201, Action>>;
2892
+ /**
2893
+ * Read the app's health
2894
+ *
2895
+ * The app's health as its store has it now: an iOS app's TestFlight crashes, power and performance metrics and App Store crash counts (the App Crashes report, an Admin key's); an Android app's crash and ANR rates by version code, errors and anomalies (Play's Android vitals). What to do about it is the caller's.
2896
+ */
2897
+ getAppVitals(input: {
2898
+ path: {
2899
+ app_id: string;
2900
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2901
+ signal?: AbortSignal;
2902
+ }): Promise<Reply<200, Vitals>>;
2903
+ /**
2904
+ * Read the app's webhook
2905
+ *
2906
+ * The app's App Store Connect webhook as the module made it: on, refused for the connected key's role, failed, or not made yet; and Apple's last delivery. The module makes it when the app is linked, and tries again every day while it is not on.
2907
+ */
2908
+ getAppWebhook(input: {
2909
+ path: {
2910
+ app_id: string;
2911
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2912
+ signal?: AbortSignal;
2913
+ }): Promise<Reply<200, WebhookInfo>>;
2914
+ /**
2915
+ * Make the app's webhook again
2916
+ *
2917
+ * Makes the app's App Store Connect webhook again: Apple's webhook at the environment's address is pointed at it with a new secret, or one is made. A key whose role may not make webhooks is recorded refused (Admin or App Manager may).
2918
+ */
2919
+ makeAppWebhook(input: {
2920
+ path: {
2921
+ app_id: string;
2922
+ };
2923
+ headers?: {
2924
+ "Idempotency-Key"?: string;
2925
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2926
+ signal?: AbortSignal;
2927
+ }): Promise<Reply<200, WebhookInfo>>;
2928
+ /**
2929
+ * Ping the app's webhook
2930
+ *
2931
+ * Asks Apple to send the app's webhook a ping: its arrival is the webhook's last delivery (GET …/webhook).
2932
+ */
2933
+ pingAppWebhook(input: {
2934
+ path: {
2935
+ app_id: string;
2936
+ };
2937
+ headers?: {
2938
+ "Idempotency-Key"?: string;
2939
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2940
+ signal?: AbortSignal;
2941
+ }): Promise<Reply<202, undefined>>;
2180
2942
  /**
2181
2943
  * Download a signed bundle with its link
2182
2944
  *
@@ -2455,5 +3217,20 @@ export declare function client(t: Transport): {
2455
3217
  body: WhatToTest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2456
3218
  signal?: AbortSignal;
2457
3219
  }): Promise<Reply<200, Delivery>>;
3220
+ /**
3221
+ * Take an App Store Connect webhook delivery
3222
+ *
3223
+ * Where the app's App Store Connect webhook reports, with no key: each delivery is checked against Apple's signature (x-apple-signature, HMAC-SHA256 with the webhook's secret), and what it says is told as the environment's event. A delivery sent again is answered and told once. Apple's to call, no one else's.
3224
+ */
3225
+ takeAppleWebhook(input: {
3226
+ path: {
3227
+ app_id: string;
3228
+ };
3229
+ headers: {
3230
+ "x-apple-signature": string;
3231
+ };
3232
+ body: AppleWebhookDelivery; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3233
+ signal?: AbortSignal;
3234
+ }): Promise<Reply<200, undefined>>;
2458
3235
  };
2459
3236
  export type Client = ReturnType<typeof client>;