@expo/apple-utils 2.1.11 → 2.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/apple-utils",
3
- "version": "2.1.11",
3
+ "version": "2.1.12",
4
4
  "main": "build",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -26,7 +26,6 @@
26
26
  "build"
27
27
  ],
28
28
  "devDependencies": {
29
- "@types/fs-extra": "^9.0.1",
30
29
  "@types/prompts": "^2.0.6",
31
30
  "@types/terser": "^3.12.0",
32
31
  "@vercel/ncc": "^0.36.1",
@@ -7,6 +7,10 @@ declare module "network/CSRF" {
7
7
  export function ensureCSRFAsync(kind: string, blockAsync: () => Promise<any>): Promise<void>;
8
8
  export function clearCachedCSRFTokens(): void;
9
9
  }
10
+ declare module "utils/files" {
11
+ export function fileExists(path: string): boolean;
12
+ export function removeFileAsync(path: string): Promise<void> | undefined;
13
+ }
10
14
  declare module "utils/json-file-cache" {
11
15
  import { JSONObject } from '@expo/json-file';
12
16
  export function cacheUserDirectory(): string;
@@ -98,12 +102,7 @@ declare module "auth/Credentials" {
98
102
  export function getCachedUsernameAsync(): Promise<string | null>;
99
103
  export function getCachedPasswordAsync({ username, }: Pick<UserCredentials, 'username'>): Promise<string | null>;
100
104
  }
101
- declare module "utils/files" {
102
- export function isDirectory(path: string): boolean;
103
- export function fileExists(path: string): boolean;
104
- }
105
105
  declare module "connect/Token" {
106
- import jwt from 'jsonwebtoken';
107
106
  /**
108
107
  * Used to Sign the .p8 private key that can only be downloaded once from Apple.
109
108
  *
@@ -121,7 +120,7 @@ declare module "connect/Token" {
121
120
  * xxxxxxxx
122
121
  * -----END PRIVATE KEY-----
123
122
  */
124
- key: jwt.Secret;
123
+ key: string;
125
124
  /**
126
125
  * Issuer ID from ASC: Users and Access > Keys | https://appstoreconnect.apple.com/access/api
127
126
  */
@@ -137,13 +136,13 @@ declare module "connect/Token" {
137
136
  }
138
137
  export class Token {
139
138
  options: TokenProps;
140
- static sign({ key, issuerId, keyId, duration }: TokenProps): string;
139
+ static sign({ key, issuerId, keyId, duration }: TokenProps): Promise<string>;
141
140
  private token;
142
141
  expiration: number;
143
142
  constructor(options: TokenProps);
144
- getToken(): string;
143
+ getToken(): Promise<string>;
145
144
  getDurationMilliseconds(): number;
146
- refresh(): string;
145
+ refresh(): Promise<string>;
147
146
  /**
148
147
  * Returns true if the token has expired and needs to be refreshed.
149
148
  */
@@ -2703,7 +2702,6 @@ declare module "connect/AssetAPI" {
2703
2702
  declare module "utils/crypto" {
2704
2703
  import * as crypto from 'crypto';
2705
2704
  export function getChecksum(value: crypto.BinaryLike): string;
2706
- export function getChecksumForFilePath(value: string): string;
2707
2705
  }
2708
2706
  declare module "connect/models/AppStoreReviewAttachment" {
2709
2707
  import { RequestContext } from "network/Request";
@@ -4334,6 +4332,7 @@ declare module "connect/models/App" {
4334
4332
  appStoreVersions?: AppStoreVersion[];
4335
4333
  preReleaseVersions?: PreReleaseVersion[];
4336
4334
  availableTerritories?: Territory[];
4335
+ builds?: Build[];
4337
4336
  betaAppReviewDetail?: BetaAppReviewDetail;
4338
4337
  }
4339
4338
  export type AppQueryFilter = ConnectQueryFilter<Pick<AppProps, 'sku' | 'name' | 'bundleId'> & {
@@ -4524,7 +4523,7 @@ declare module "connect/models/User" {
4524
4523
  email: string | null;
4525
4524
  preferredCurrencyTerritory: Territory | null;
4526
4525
  agreedToTerms: boolean | null;
4527
- roles: UserRole | null;
4526
+ roles: UserRole[] | null;
4528
4527
  allAppsVisible: boolean;
4529
4528
  provisioningAllowed: boolean;
4530
4529
  emailVettingRequired: boolean;
@@ -4542,7 +4541,7 @@ declare module "connect/models/User" {
4542
4541
  static getAsync: (context: import("AppStoreConnect").RequestContext, props?: {
4543
4542
  query?: import("connect/ConnectAPI").ConnectQueryParams<Partial<{
4544
4543
  username: string | (string | null)[] | null;
4545
- roles: UserRole | (UserRole | null)[] | null;
4544
+ roles: UserRole[] | (UserRole[] | null)[] | null;
4546
4545
  visibleApps: (App[] & string) | (App[] & string)[];
4547
4546
  } & {
4548
4547
  id?: string;
@@ -4729,6 +4728,74 @@ declare module "connect/models/ResolutionCenterMessageAttachment" {
4729
4728
  } | undefined) => Promise<ResolutionCenterMessageAttachment[]>;
4730
4729
  }
4731
4730
  }
4731
+ declare module "connect/models/UserInvitation" {
4732
+ import { RequestContext } from "network/Request";
4733
+ import { ConnectQueryFilter } from "connect/ConnectAPI";
4734
+ import type { App } from "connect/models/App";
4735
+ import { ConnectModel } from "connect/models/ConnectModel";
4736
+ import { UserRole } from "connect/models/User";
4737
+ export interface UserInvitationProps {
4738
+ firstName: string;
4739
+ lastName: string;
4740
+ email: string;
4741
+ allAppsVisible: boolean | null;
4742
+ provisioningAllowed: boolean;
4743
+ roles: UserRole[] | null;
4744
+ /**
4745
+ * Date when the invite is no longer valid and must be resent.
4746
+ * Formatted like "2025-01-09T10:16:42-08:00"
4747
+ */
4748
+ expirationDate: string;
4749
+ visibleApps?: App[];
4750
+ }
4751
+ export type UserInvitationQueryFilter = ConnectQueryFilter<UserInvitationProps & {
4752
+ /**
4753
+ * `App` id
4754
+ */
4755
+ visibleApps: string;
4756
+ }, 'email' | 'firstName' | 'lastName' | 'expirationDate' | 'roles' | 'allAppsVisible' | 'provisioningAllowed'>;
4757
+ export class UserInvitation extends ConnectModel<UserInvitationProps> {
4758
+ static type: string;
4759
+ static getAsync: (context: RequestContext, props?: {
4760
+ query?: import("connect/ConnectAPI").ConnectQueryParams<Partial<{
4761
+ expirationDate: string | string[];
4762
+ email: string | string[];
4763
+ firstName: string | string[];
4764
+ lastName: string | string[];
4765
+ roles: UserRole[] | (UserRole[] | null)[] | null;
4766
+ allAppsVisible: boolean | (boolean | null)[] | null;
4767
+ provisioningAllowed: boolean | boolean[];
4768
+ } & {
4769
+ id?: string;
4770
+ }>> | undefined;
4771
+ } | undefined) => Promise<UserInvitation[]>;
4772
+ /**
4773
+ *
4774
+ * @param id `UserInvitation` id (ex: UNHB5PT4MA)
4775
+ */
4776
+ static infoAsync: (context: RequestContext, props: {
4777
+ id: string;
4778
+ query?: import("connect/ConnectAPI").ConnectQueryParams;
4779
+ }) => Promise<UserInvitation>;
4780
+ static createAsync(context: RequestContext, { email, firstName, lastName, roles, provisioningAllowed, allAppsVisible, visibleApps, }: {
4781
+ email: UserInvitationProps['email'];
4782
+ firstName: UserInvitationProps['firstName'];
4783
+ lastName: UserInvitationProps['lastName'];
4784
+ roles: UserInvitationProps['roles'];
4785
+ provisioningAllowed?: UserInvitationProps['provisioningAllowed'];
4786
+ allAppsVisible?: boolean;
4787
+ /**
4788
+ * `App` id
4789
+ */
4790
+ visibleApps?: string[];
4791
+ }): Promise<UserInvitation>;
4792
+ static deleteAsync: (context: RequestContext, props: {
4793
+ id: string;
4794
+ }) => Promise<void>;
4795
+ isExpired(): boolean;
4796
+ resendAsync(): Promise<UserInvitation>;
4797
+ }
4798
+ }
4732
4799
  declare module "connect/models/BetaFeedback" {
4733
4800
  import { ConnectQueryFilter } from "connect/ConnectAPI";
4734
4801
  import { ConnectModel } from "connect/models/ConnectModel";
@@ -4923,6 +4990,7 @@ declare module "connect/index" {
4923
4990
  export * from "connect/models/Profile";
4924
4991
  export * from "connect/models/InAppPurchase";
4925
4992
  export * from "connect/models/User";
4993
+ export * from "connect/models/UserInvitation";
4926
4994
  export * from "connect/models/CloudContainer";
4927
4995
  export * from "connect/models/ReviewSubmission";
4928
4996
  export * from "connect/models/ReviewSubmissionItem";