@expo/apple-utils 2.1.19 → 2.1.20
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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/apple-utils",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.20",
|
|
4
4
|
"main": "build",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"prepare": "
|
|
7
|
+
"prepare": "bun run clean && bun run --filter '@expo/app-store' prepare && bun run typegen && bun run build:prod && bun run append-types",
|
|
8
8
|
"lint": "eslint . --ext .ts",
|
|
9
|
-
"watch": "
|
|
9
|
+
"watch": "bun run build -w",
|
|
10
10
|
"test": "jest",
|
|
11
11
|
"build": "ncc build ./src/index.ts -o build/",
|
|
12
12
|
"build:prod": "ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register",
|
|
@@ -1466,6 +1466,8 @@ declare module "connect/AssetAPI" {
|
|
|
1466
1466
|
export enum AppMediaAssetStateState {
|
|
1467
1467
|
AWAITING_UPLOAD = "AWAITING_UPLOAD",
|
|
1468
1468
|
UPLOAD_COMPLETE = "UPLOAD_COMPLETE",
|
|
1469
|
+
/** Used by videoDeliveryState while Apple transcodes the video. */
|
|
1470
|
+
PROCESSING = "PROCESSING",
|
|
1469
1471
|
COMPLETE = "COMPLETE",
|
|
1470
1472
|
FAILED = "FAILED"
|
|
1471
1473
|
}
|
|
@@ -2991,8 +2993,11 @@ declare module "connect/models/AppPreview" {
|
|
|
2991
2993
|
sourceFileChecksum: string;
|
|
2992
2994
|
/**
|
|
2993
2995
|
* Time code for the preview frame (poster image).
|
|
2994
|
-
*
|
|
2995
|
-
*
|
|
2996
|
+
* Must be exactly 4-segment "HH:MM:SS:FF" format where FF is frames.
|
|
2997
|
+
* 3-segment ("MM:SS:FF") and 5+ segment formats are rejected with "Invalid format!".
|
|
2998
|
+
* Values beyond the video duration are silently accepted (clamped to last frame).
|
|
2999
|
+
* Empty string and null are rejected with "previewFrameTimeCode attribute is missing!".
|
|
3000
|
+
* @example "00:00:05:01"
|
|
2996
3001
|
*/
|
|
2997
3002
|
previewFrameTimeCode: string | null;
|
|
2998
3003
|
mimeType: string;
|
|
@@ -3001,6 +3006,15 @@ declare module "connect/models/AppPreview" {
|
|
|
3001
3006
|
* Only available after processing is complete.
|
|
3002
3007
|
*/
|
|
3003
3008
|
videoUrl: string | null;
|
|
3009
|
+
/**
|
|
3010
|
+
* Preview frame/poster image with processing state.
|
|
3011
|
+
* Contains the image asset and its processing state (e.g., COMPLETE, PROCESSING).
|
|
3012
|
+
* This is the detailed version returned by the API after setting a preview frame time code.
|
|
3013
|
+
*/
|
|
3014
|
+
previewFrameImage: {
|
|
3015
|
+
image: ImageAsset;
|
|
3016
|
+
state: AppMediaAssetState;
|
|
3017
|
+
} | null;
|
|
3004
3018
|
/**
|
|
3005
3019
|
* Preview frame/poster image asset.
|
|
3006
3020
|
* Contains templateUrl with {w}, {h}, {f} placeholders.
|
|
@@ -3008,6 +3022,12 @@ declare module "connect/models/AppPreview" {
|
|
|
3008
3022
|
previewImage: ImageAsset | null;
|
|
3009
3023
|
uploadOperations: UploadOperation[];
|
|
3010
3024
|
assetDeliveryState: AppMediaAssetState;
|
|
3025
|
+
/**
|
|
3026
|
+
* Video-specific delivery state. Tracks video transcoding/processing progress
|
|
3027
|
+
* separately from the asset upload state.
|
|
3028
|
+
* Only present for video previews (not screenshots).
|
|
3029
|
+
*/
|
|
3030
|
+
videoDeliveryState: AppMediaAssetState | null;
|
|
3011
3031
|
}
|
|
3012
3032
|
/**
|
|
3013
3033
|
* App Preview (video) for App Store listings.
|
|
@@ -3032,7 +3052,7 @@ declare module "connect/models/AppPreview" {
|
|
|
3032
3052
|
* @param id AppPreviewSet ID
|
|
3033
3053
|
* @param filePath Path to the video file (MP4, MOV)
|
|
3034
3054
|
* @param waitForProcessing Wait for Apple to process the video (default: true)
|
|
3035
|
-
* @param previewFrameTimeCode Optional time code for preview frame (e.g., "00:05:00" for 5 seconds)
|
|
3055
|
+
* @param previewFrameTimeCode Optional time code for preview frame in "HH:MM:SS:FF" format (e.g., "00:00:05:00" for 5 seconds)
|
|
3036
3056
|
*/
|
|
3037
3057
|
static uploadAsync(context: RequestContext, { id, filePath, waitForProcessing, previewFrameTimeCode, }: {
|
|
3038
3058
|
id: string;
|
|
@@ -3047,6 +3067,11 @@ declare module "connect/models/AppPreview" {
|
|
|
3047
3067
|
updateAsync(options: Partial<AppPreviewProps> & {
|
|
3048
3068
|
uploaded?: boolean;
|
|
3049
3069
|
}): Promise<AppPreview>;
|
|
3070
|
+
/**
|
|
3071
|
+
* Set the poster frame (preview image) for this app preview.
|
|
3072
|
+
* @param previewFrameTimeCode Time code in "HH:MM:SS:FF" format (e.g., "00:00:05:01" for ~5 seconds)
|
|
3073
|
+
*/
|
|
3074
|
+
setPreviewFrameAsync(previewFrameTimeCode: string): Promise<AppPreview>;
|
|
3050
3075
|
isAwaitingUpload(): boolean;
|
|
3051
3076
|
isProcessing(): boolean;
|
|
3052
3077
|
isComplete(): boolean;
|
|
@@ -3816,6 +3841,10 @@ declare module "connect/models/ResolutionCenterMessage" {
|
|
|
3816
3841
|
fromActor: unknown;
|
|
3817
3842
|
}
|
|
3818
3843
|
export type ResolutionCenterMessageQueryFilter = ConnectQueryFilter<ResolutionCenterMessageProps, 'rejections'>;
|
|
3844
|
+
/**
|
|
3845
|
+
* Resolution center messages require session auth (Iris API).
|
|
3846
|
+
* These endpoints are NOT available with API key (JWT) authentication.
|
|
3847
|
+
*/
|
|
3819
3848
|
export class ResolutionCenterMessage extends ConnectModel<ResolutionCenterMessageProps> {
|
|
3820
3849
|
static type: string;
|
|
3821
3850
|
static getAsync: (context: import("AppStoreConnect").RequestContext, props?: {
|
|
@@ -3827,20 +3856,82 @@ declare module "connect/models/ResolutionCenterMessage" {
|
|
|
3827
3856
|
} | undefined) => Promise<ResolutionCenterMessage[]>;
|
|
3828
3857
|
}
|
|
3829
3858
|
}
|
|
3859
|
+
declare module "connect/models/ResolutionCenterDraftMessage" {
|
|
3860
|
+
import { RequestContext } from "network/Request";
|
|
3861
|
+
import { ConnectModel } from "connect/models/ConnectModel";
|
|
3862
|
+
import { ResolutionCenterMessage } from "connect/models/ResolutionCenterMessage";
|
|
3863
|
+
interface ResolutionCenterDraftMessageProps {
|
|
3864
|
+
messageBody: string;
|
|
3865
|
+
/** @example '2026-04-13T20:26:31.914Z' */
|
|
3866
|
+
createdDate: string;
|
|
3867
|
+
/** @example '2026-04-13T20:26:31.883Z' */
|
|
3868
|
+
lastUpdatedDate: string;
|
|
3869
|
+
}
|
|
3870
|
+
/**
|
|
3871
|
+
* Draft messages in the resolution center. Used as an intermediate step
|
|
3872
|
+
* before sending a reply to App Review.
|
|
3873
|
+
*
|
|
3874
|
+
* Requires session auth (Iris API). NOT available with API key (JWT) authentication.
|
|
3875
|
+
*
|
|
3876
|
+
* Flow: createAsync (draft) → sendAsync (publish draft as message)
|
|
3877
|
+
*/
|
|
3878
|
+
export class ResolutionCenterDraftMessage extends ConnectModel<ResolutionCenterDraftMessageProps> {
|
|
3879
|
+
static type: string;
|
|
3880
|
+
/**
|
|
3881
|
+
* Create a draft message on a resolution center thread.
|
|
3882
|
+
*
|
|
3883
|
+
* POST /iris/v1/resolutionCenterDraftMessages
|
|
3884
|
+
*/
|
|
3885
|
+
static createAsync(context: RequestContext, { threadId, messageBody, }: {
|
|
3886
|
+
threadId: string;
|
|
3887
|
+
messageBody: string;
|
|
3888
|
+
}): Promise<ResolutionCenterDraftMessage>;
|
|
3889
|
+
static deleteAsync: (context: RequestContext, props: {
|
|
3890
|
+
id: string;
|
|
3891
|
+
}) => Promise<void>;
|
|
3892
|
+
/**
|
|
3893
|
+
* Update the draft message body.
|
|
3894
|
+
*
|
|
3895
|
+
* PATCH /iris/v1/resolutionCenterDraftMessages/{id}
|
|
3896
|
+
*/
|
|
3897
|
+
updateAsync({ messageBody, }: {
|
|
3898
|
+
messageBody: string;
|
|
3899
|
+
}): Promise<ResolutionCenterDraftMessage>;
|
|
3900
|
+
/**
|
|
3901
|
+
* Delete this draft message.
|
|
3902
|
+
*
|
|
3903
|
+
* DELETE /iris/v1/resolutionCenterDraftMessages/{id}
|
|
3904
|
+
*/
|
|
3905
|
+
deleteAsync(): Promise<void>;
|
|
3906
|
+
/**
|
|
3907
|
+
* Send this draft message, publishing it as a resolution center message.
|
|
3908
|
+
*
|
|
3909
|
+
* POST /iris/v1/resolutionCenterMessages
|
|
3910
|
+
*/
|
|
3911
|
+
sendAsync(): Promise<ResolutionCenterMessage>;
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3830
3914
|
declare module "connect/models/ReviewRejection" {
|
|
3831
3915
|
import { ConnectQueryFilter } from "connect/ConnectAPI";
|
|
3832
3916
|
import { ConnectModel } from "connect/models/ConnectModel";
|
|
3833
|
-
interface
|
|
3834
|
-
/** '2.
|
|
3917
|
+
export interface ReviewRejectionReason {
|
|
3918
|
+
/** @example '2.5' */
|
|
3835
3919
|
reasonSection: string;
|
|
3836
|
-
/** 'Performance:
|
|
3920
|
+
/** @example 'Performance: Software Requirements' */
|
|
3837
3921
|
reasonDescription: string;
|
|
3838
|
-
/** '2.
|
|
3922
|
+
/** @example '2.5.4' */
|
|
3839
3923
|
reasonCode: string;
|
|
3840
3924
|
}
|
|
3925
|
+
interface ReviewRejectionProps {
|
|
3926
|
+
reasons: ReviewRejectionReason[];
|
|
3927
|
+
}
|
|
3841
3928
|
export type ReviewRejectionQueryFilter = ConnectQueryFilter<ReviewRejectionProps & {
|
|
3842
3929
|
'resolutionCenterMessage.resolutionCenterThread': string;
|
|
3843
3930
|
}, 'resolutionCenterMessage.resolutionCenterThread'>;
|
|
3931
|
+
/**
|
|
3932
|
+
* Review rejections require session auth (Iris API).
|
|
3933
|
+
* These endpoints are NOT available with API key (JWT) authentication.
|
|
3934
|
+
*/
|
|
3844
3935
|
export class ReviewRejection extends ConnectModel<ReviewRejectionProps> {
|
|
3845
3936
|
static type: string;
|
|
3846
3937
|
static getAsync: (context: import("AppStoreConnect").RequestContext, props?: {
|
|
@@ -3857,6 +3948,7 @@ declare module "connect/models/ResolutionCenterThread" {
|
|
|
3857
3948
|
import type { AppStoreVersion } from "connect/models/AppStoreVersion";
|
|
3858
3949
|
import type { Build } from "connect/models/Build";
|
|
3859
3950
|
import { ConnectModel } from "connect/models/ConnectModel";
|
|
3951
|
+
import { ResolutionCenterDraftMessage } from "connect/models/ResolutionCenterDraftMessage";
|
|
3860
3952
|
import { ResolutionCenterMessage } from "connect/models/ResolutionCenterMessage";
|
|
3861
3953
|
import { ReviewRejection } from "connect/models/ReviewRejection";
|
|
3862
3954
|
export interface ResolutionCenterThreadProps {
|
|
@@ -3877,6 +3969,10 @@ declare module "connect/models/ResolutionCenterThread" {
|
|
|
3877
3969
|
build: string;
|
|
3878
3970
|
reviewSubmission: string;
|
|
3879
3971
|
}, 'build' | 'appStoreVersion' | 'threadType' | 'reviewSubmission'>;
|
|
3972
|
+
/**
|
|
3973
|
+
* Resolution center threads require session auth (Iris API).
|
|
3974
|
+
* These endpoints are NOT available with API key (JWT) authentication.
|
|
3975
|
+
*/
|
|
3880
3976
|
export class ResolutionCenterThread extends ConnectModel<ResolutionCenterThreadProps> {
|
|
3881
3977
|
static type: string;
|
|
3882
3978
|
static DEFAULT_INCLUDES: string[];
|
|
@@ -3893,7 +3989,28 @@ declare module "connect/models/ResolutionCenterThread" {
|
|
|
3893
3989
|
getResolutionCenterMessagesAsync({ query, }?: {
|
|
3894
3990
|
query?: ConnectQueryParams;
|
|
3895
3991
|
}): Promise<ResolutionCenterMessage[]>;
|
|
3992
|
+
/**
|
|
3993
|
+
* Get the current draft message for this thread, if any.
|
|
3994
|
+
*
|
|
3995
|
+
* GET /iris/v1/resolutionCenterThreads/{id}/resolutionCenterDraftMessage
|
|
3996
|
+
* Note: singular endpoint (not plural), returns a single object not an array.
|
|
3997
|
+
*/
|
|
3998
|
+
getDraftMessageAsync(): Promise<ResolutionCenterDraftMessage | null>;
|
|
3896
3999
|
fetchRejectionReasonsAsync(): Promise<ReviewRejection[]>;
|
|
4000
|
+
/**
|
|
4001
|
+
* Create a draft message on this thread.
|
|
4002
|
+
* Use `draft.sendAsync()` to publish it.
|
|
4003
|
+
*/
|
|
4004
|
+
createDraftMessageAsync({ messageBody, }: {
|
|
4005
|
+
messageBody: string;
|
|
4006
|
+
}): Promise<ResolutionCenterDraftMessage>;
|
|
4007
|
+
/**
|
|
4008
|
+
* Send a reply to this resolution center thread.
|
|
4009
|
+
* Creates a draft and immediately publishes it.
|
|
4010
|
+
*/
|
|
4011
|
+
sendReplyAsync({ messageBody }: {
|
|
4012
|
+
messageBody: string;
|
|
4013
|
+
}): Promise<ResolutionCenterMessage>;
|
|
3897
4014
|
}
|
|
3898
4015
|
}
|
|
3899
4016
|
declare module "connect/models/Build" {
|
|
@@ -4513,12 +4630,119 @@ declare module "connect/models/AppPriceTier" {
|
|
|
4513
4630
|
static type: string;
|
|
4514
4631
|
}
|
|
4515
4632
|
}
|
|
4633
|
+
declare module "connect/models/Territory" {
|
|
4634
|
+
import { ConnectModel } from "connect/models/ConnectModel";
|
|
4635
|
+
export interface TerritoryProps {
|
|
4636
|
+
/**
|
|
4637
|
+
* @example 'USD'
|
|
4638
|
+
*/
|
|
4639
|
+
currency: string;
|
|
4640
|
+
}
|
|
4641
|
+
export class Territory extends ConnectModel<TerritoryProps> {
|
|
4642
|
+
static type: string;
|
|
4643
|
+
static getAsync: (context: import("AppStoreConnect").RequestContext, props?: {
|
|
4644
|
+
query?: import("connect/ConnectAPI").ConnectQueryParams<Record<string, any>> | undefined;
|
|
4645
|
+
} | undefined) => Promise<Territory[]>;
|
|
4646
|
+
}
|
|
4647
|
+
}
|
|
4648
|
+
declare module "connect/models/AppPricePoint" {
|
|
4649
|
+
import { RequestContext } from "network/Request";
|
|
4650
|
+
import { ConnectQueryFilter, ConnectQueryParams } from "connect/ConnectAPI";
|
|
4651
|
+
import { AppPriceTier } from "connect/models/AppPriceTier";
|
|
4652
|
+
import { ConnectModel } from "connect/models/ConnectModel";
|
|
4653
|
+
import { Territory } from "connect/models/Territory";
|
|
4654
|
+
export interface AppPricePointProps {
|
|
4655
|
+
customerPrice: string;
|
|
4656
|
+
proceeds: string;
|
|
4657
|
+
/** @deprecated Only populated via the legacy iris endpoint. */
|
|
4658
|
+
priceTier?: AppPriceTier;
|
|
4659
|
+
territory?: Territory;
|
|
4660
|
+
}
|
|
4661
|
+
export type AppPricePointQueryFilter = ConnectQueryFilter<{
|
|
4662
|
+
territory: string;
|
|
4663
|
+
priceTier: string;
|
|
4664
|
+
app: string;
|
|
4665
|
+
}, 'territory' | 'priceTier' | 'app'>;
|
|
4666
|
+
export class AppPricePoint extends ConnectModel<AppPricePointProps> {
|
|
4667
|
+
static type: string;
|
|
4668
|
+
/**
|
|
4669
|
+
* Legacy list endpoint (iris). Kept for backwards compatibility; new callers
|
|
4670
|
+
* should use the app-scoped {@link AppPricePoint.getForAppAsync} helper which
|
|
4671
|
+
* uses the public App Store Connect API.
|
|
4672
|
+
*/
|
|
4673
|
+
static getAsync: (context: RequestContext, props?: {
|
|
4674
|
+
query?: ConnectQueryParams<Partial<{
|
|
4675
|
+
app: string | string[];
|
|
4676
|
+
territory: string | string[];
|
|
4677
|
+
priceTier: string | string[];
|
|
4678
|
+
} & {
|
|
4679
|
+
id?: string;
|
|
4680
|
+
}>> | undefined;
|
|
4681
|
+
} | undefined) => Promise<AppPricePoint[]>;
|
|
4682
|
+
/**
|
|
4683
|
+
* Look up a single price point by id (ex: `UNHB5PT4MA`).
|
|
4684
|
+
*
|
|
4685
|
+
* Uses the legacy iris endpoint for compatibility with existing callers.
|
|
4686
|
+
* The modern equivalent is `GET /v3/appPricePoints/{id}`.
|
|
4687
|
+
*/
|
|
4688
|
+
static infoAsync: (context: RequestContext, props: {
|
|
4689
|
+
id: string;
|
|
4690
|
+
query?: ConnectQueryParams;
|
|
4691
|
+
}) => Promise<AppPricePoint>;
|
|
4692
|
+
/**
|
|
4693
|
+
* Fetch the valid price points for a given app, optionally filtered by
|
|
4694
|
+
* territory. This is the replacement for the deprecated global
|
|
4695
|
+
* `appPriceTiers` lookup and is used when constructing an
|
|
4696
|
+
* {@link AppPriceSchedule}. Price point ids are app-specific.
|
|
4697
|
+
*
|
|
4698
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/get-v1-apps-_id_-apppricepoints
|
|
4699
|
+
*/
|
|
4700
|
+
static getForAppAsync(context: RequestContext, { id, query, }: {
|
|
4701
|
+
/** App id (e.g. `1234567890`). */
|
|
4702
|
+
id: string;
|
|
4703
|
+
query?: ConnectQueryParams<AppPricePointQueryFilter>;
|
|
4704
|
+
}): Promise<AppPricePoint[]>;
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4516
4707
|
declare module "connect/models/AppPrice" {
|
|
4708
|
+
import { AppPricePoint } from "connect/models/AppPricePoint";
|
|
4517
4709
|
import { AppPriceTier } from "connect/models/AppPriceTier";
|
|
4518
4710
|
import { ConnectModel } from "connect/models/ConnectModel";
|
|
4711
|
+
import { Territory } from "connect/models/Territory";
|
|
4519
4712
|
export interface AppPriceProps {
|
|
4520
|
-
|
|
4521
|
-
|
|
4713
|
+
/**
|
|
4714
|
+
* ISO-8601 start date for this price (e.g. `2024-01-31`).
|
|
4715
|
+
*
|
|
4716
|
+
* When used as a "manual" price inside an {@link AppPriceSchedule} create
|
|
4717
|
+
* request, passing `null` (or omitting the attribute) means "effective
|
|
4718
|
+
* immediately".
|
|
4719
|
+
*/
|
|
4720
|
+
startDate: string | null;
|
|
4721
|
+
/**
|
|
4722
|
+
* ISO-8601 end date. Optional — typically not set by callers and returned by
|
|
4723
|
+
* Apple only for historical automatic prices.
|
|
4724
|
+
*/
|
|
4725
|
+
endDate?: string | null;
|
|
4726
|
+
/**
|
|
4727
|
+
* Whether this price was set manually as part of an
|
|
4728
|
+
* {@link AppPriceSchedule}, or automatically computed by Apple from the
|
|
4729
|
+
* schedule's `baseTerritory` price. Only populated on reads.
|
|
4730
|
+
*/
|
|
4731
|
+
manual?: boolean;
|
|
4732
|
+
/**
|
|
4733
|
+
* The price point this price refers to. Populated on reads, and required
|
|
4734
|
+
* when constructing an `AppPrice` to pass to
|
|
4735
|
+
* {@link AppPriceSchedule.createAsync}.
|
|
4736
|
+
*/
|
|
4737
|
+
appPricePoint?: AppPricePoint;
|
|
4738
|
+
/** Territory this price applies to (read-only). */
|
|
4739
|
+
territory?: Territory;
|
|
4740
|
+
/**
|
|
4741
|
+
* Legacy price tier (e.g. `1`, `2`, ...). Only populated by the deprecated
|
|
4742
|
+
* iris endpoint. New callers should use {@link AppPriceProps.appPricePoint}.
|
|
4743
|
+
* @deprecated Apple removed the global tier system in late 2023.
|
|
4744
|
+
*/
|
|
4745
|
+
priceTier?: AppPriceTier;
|
|
4522
4746
|
}
|
|
4523
4747
|
export class AppPrice extends ConnectModel<AppPriceProps> {
|
|
4524
4748
|
static type: string;
|
|
@@ -4531,6 +4755,123 @@ declare module "connect/models/AppPrice" {
|
|
|
4531
4755
|
}) => Promise<AppPrice>;
|
|
4532
4756
|
}
|
|
4533
4757
|
}
|
|
4758
|
+
declare module "connect/models/AppPriceSchedule" {
|
|
4759
|
+
/**
|
|
4760
|
+
* App price schedule — the "base territory" pricing model Apple introduced in
|
|
4761
|
+
* late 2023, replacing the legacy `appPriceTier`-driven
|
|
4762
|
+
* `App.updateAsync({ appPriceTier, territories })` flow.
|
|
4763
|
+
*
|
|
4764
|
+
* A schedule describes the full set of manual prices for an app. Creating a
|
|
4765
|
+
* new schedule REPLACES any prior schedule entirely, so callers must include
|
|
4766
|
+
* every manual price they want to keep.
|
|
4767
|
+
*
|
|
4768
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/appPriceSchedules
|
|
4769
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/post-v1-apppriceschedules
|
|
4770
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/get-v1-apps-_id_-apppriceschedule
|
|
4771
|
+
*/
|
|
4772
|
+
import { RequestContext } from "network/Request";
|
|
4773
|
+
import { ConnectQueryParams } from "connect/ConnectAPI";
|
|
4774
|
+
import { AppPrice } from "connect/models/AppPrice";
|
|
4775
|
+
import { ConnectModel } from "connect/models/ConnectModel";
|
|
4776
|
+
import { Territory } from "connect/models/Territory";
|
|
4777
|
+
export interface AppPriceScheduleProps {
|
|
4778
|
+
/** Territory used as the reference for automatically-computed prices. */
|
|
4779
|
+
baseTerritory?: Territory;
|
|
4780
|
+
/**
|
|
4781
|
+
* Manual prices explicitly set by the developer. Each entry ties an
|
|
4782
|
+
* {@link AppPricePoint} to an (optional) `startDate`.
|
|
4783
|
+
*/
|
|
4784
|
+
manualPrices?: AppPrice[];
|
|
4785
|
+
/**
|
|
4786
|
+
* Prices automatically computed by Apple for territories not covered by
|
|
4787
|
+
* `manualPrices`, using the `baseTerritory` price point as a reference.
|
|
4788
|
+
* Read-only.
|
|
4789
|
+
*/
|
|
4790
|
+
automaticPrices?: AppPrice[];
|
|
4791
|
+
}
|
|
4792
|
+
/**
|
|
4793
|
+
* Shape of a manual price when creating an {@link AppPriceSchedule}. Each
|
|
4794
|
+
* entry becomes an inline `appPrices` resource in the POST body, referencing
|
|
4795
|
+
* an existing `appPricePoint` id (look these up via
|
|
4796
|
+
* {@link AppPricePoint.getForAppAsync}).
|
|
4797
|
+
*/
|
|
4798
|
+
export interface AppPriceScheduleManualPriceInput {
|
|
4799
|
+
/** Id of the target `appPricePoint`. */
|
|
4800
|
+
appPricePointId: string;
|
|
4801
|
+
/**
|
|
4802
|
+
* ISO-8601 date (YYYY-MM-DD) for when this price should take effect.
|
|
4803
|
+
* Pass `null` (or omit) for "effective immediately".
|
|
4804
|
+
*/
|
|
4805
|
+
startDate?: string | null;
|
|
4806
|
+
/**
|
|
4807
|
+
* Optional end date. Typically unused on creates — callers express "end"
|
|
4808
|
+
* by scheduling a follow-up price with a later `startDate`.
|
|
4809
|
+
*/
|
|
4810
|
+
endDate?: string | null;
|
|
4811
|
+
}
|
|
4812
|
+
export class AppPriceSchedule extends ConnectModel<AppPriceScheduleProps> {
|
|
4813
|
+
static type: string;
|
|
4814
|
+
static DEFAULT_INCLUDES: string[];
|
|
4815
|
+
/**
|
|
4816
|
+
* Fetch a single schedule by id.
|
|
4817
|
+
*
|
|
4818
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/get-v1-apppriceschedules-_id_
|
|
4819
|
+
*/
|
|
4820
|
+
static infoAsync: (context: RequestContext, props: {
|
|
4821
|
+
id: string;
|
|
4822
|
+
query?: ConnectQueryParams;
|
|
4823
|
+
}) => Promise<AppPriceSchedule>;
|
|
4824
|
+
/**
|
|
4825
|
+
* Fetch the current schedule for an app.
|
|
4826
|
+
*
|
|
4827
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/get-v1-apps-_id_-apppriceschedule
|
|
4828
|
+
*/
|
|
4829
|
+
static getForAppAsync(context: RequestContext, { id, query, }: {
|
|
4830
|
+
/** App id. */
|
|
4831
|
+
id: string;
|
|
4832
|
+
query?: ConnectQueryParams;
|
|
4833
|
+
}): Promise<AppPriceSchedule | null>;
|
|
4834
|
+
/**
|
|
4835
|
+
* Create a new price schedule for an app. This REPLACES any prior
|
|
4836
|
+
* schedule — callers must include every manual price they want to keep.
|
|
4837
|
+
*
|
|
4838
|
+
* Manual prices are passed as inline `appPrices` resources referencing
|
|
4839
|
+
* existing `appPricePoint` ids. Look up valid price point ids for the target
|
|
4840
|
+
* app (and optionally a specific territory) via
|
|
4841
|
+
* {@link AppPricePoint.getForAppAsync}.
|
|
4842
|
+
*
|
|
4843
|
+
* @example
|
|
4844
|
+
* ```ts
|
|
4845
|
+
* const pricePoints = await AppPricePoint.getForAppAsync(context, {
|
|
4846
|
+
* id: app.id,
|
|
4847
|
+
* query: { filter: { territory: 'USA' } },
|
|
4848
|
+
* });
|
|
4849
|
+
* await AppPriceSchedule.createAsync(context, {
|
|
4850
|
+
* appId: app.id,
|
|
4851
|
+
* baseTerritoryId: 'USA',
|
|
4852
|
+
* manualPrices: [{ appPricePointId: pricePoints[0].id }],
|
|
4853
|
+
* });
|
|
4854
|
+
* ```
|
|
4855
|
+
*
|
|
4856
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/post-v1-apppriceschedules
|
|
4857
|
+
*/
|
|
4858
|
+
static createAsync(context: RequestContext, { appId, baseTerritoryId, manualPrices, }: {
|
|
4859
|
+
/** Id of the app the schedule is being set on. */
|
|
4860
|
+
appId: string;
|
|
4861
|
+
/**
|
|
4862
|
+
* Id of the territory (e.g. `USA`) whose manual price Apple should use
|
|
4863
|
+
* as the reference for automatic prices in other territories.
|
|
4864
|
+
*/
|
|
4865
|
+
baseTerritoryId: string;
|
|
4866
|
+
/**
|
|
4867
|
+
* Manual prices to apply. An empty array makes the app free in the
|
|
4868
|
+
* base territory (Apple requires at least one entry matching the base
|
|
4869
|
+
* territory's price point in practice).
|
|
4870
|
+
*/
|
|
4871
|
+
manualPrices: AppPriceScheduleManualPriceInput[];
|
|
4872
|
+
}): Promise<AppPriceSchedule>;
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4534
4875
|
declare module "connect/models/BetaAppLocalization" {
|
|
4535
4876
|
import { RequestContext } from "network/Request";
|
|
4536
4877
|
import { ConnectQueryFilter } from "connect/ConnectAPI";
|
|
@@ -4961,21 +5302,6 @@ declare module "connect/models/ReviewSubmission" {
|
|
|
4961
5302
|
getResolutionCenterThreadsAsync(): Promise<ResolutionCenterThread[]>;
|
|
4962
5303
|
}
|
|
4963
5304
|
}
|
|
4964
|
-
declare module "connect/models/Territory" {
|
|
4965
|
-
import { ConnectModel } from "connect/models/ConnectModel";
|
|
4966
|
-
export interface TerritoryProps {
|
|
4967
|
-
/**
|
|
4968
|
-
* @example 'USD'
|
|
4969
|
-
*/
|
|
4970
|
-
currency: string;
|
|
4971
|
-
}
|
|
4972
|
-
export class Territory extends ConnectModel<TerritoryProps> {
|
|
4973
|
-
static type: string;
|
|
4974
|
-
static getAsync: (context: import("AppStoreConnect").RequestContext, props?: {
|
|
4975
|
-
query?: import("connect/ConnectAPI").ConnectQueryParams<Record<string, any>> | undefined;
|
|
4976
|
-
} | undefined) => Promise<Territory[]>;
|
|
4977
|
-
}
|
|
4978
|
-
}
|
|
4979
5305
|
declare module "connect/models/App" {
|
|
4980
5306
|
import { RequestContext } from "network/Request";
|
|
4981
5307
|
import { ConnectQueryFilter, ConnectQueryParams } from "connect/ConnectAPI";
|
|
@@ -4987,6 +5313,8 @@ declare module "connect/models/App" {
|
|
|
4987
5313
|
import { AppDataUsagesPublishState } from "connect/models/AppDataUsagesPublishState";
|
|
4988
5314
|
import { AppInfo, AppStoreState } from "connect/models/AppInfo";
|
|
4989
5315
|
import { AppPrice } from "connect/models/AppPrice";
|
|
5316
|
+
import { AppPricePoint, AppPricePointQueryFilter } from "connect/models/AppPricePoint";
|
|
5317
|
+
import { AppPriceSchedule, AppPriceScheduleManualPriceInput } from "connect/models/AppPriceSchedule";
|
|
4990
5318
|
import { AppStoreVersion, AppStoreVersionProps } from "connect/models/AppStoreVersion";
|
|
4991
5319
|
import { BetaAppLocalization, BetaAppLocalizationProps } from "connect/models/BetaAppLocalization";
|
|
4992
5320
|
import { BetaAppReviewDetail, BetaAppReviewDetailProps } from "connect/models/BetaAppReviewDetail";
|
|
@@ -5148,6 +5476,36 @@ declare module "connect/models/App" {
|
|
|
5148
5476
|
getAvailableTerritoriesAsync({ query, }?: {
|
|
5149
5477
|
query?: ConnectQueryParams;
|
|
5150
5478
|
}): Promise<Territory[]>;
|
|
5479
|
+
/**
|
|
5480
|
+
* Get the current base-territory price schedule for this app, or `null` if
|
|
5481
|
+
* none has been set. This is the read half of the modern pricing API
|
|
5482
|
+
* (replaces the legacy `prices` relationship populated by
|
|
5483
|
+
* `App.updateAsync({ appPriceTier, territories })`).
|
|
5484
|
+
*
|
|
5485
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/get-v1-apps-_id_-apppriceschedule
|
|
5486
|
+
*/
|
|
5487
|
+
getPriceScheduleAsync({ query, }?: {
|
|
5488
|
+
query?: ConnectQueryParams;
|
|
5489
|
+
}): Promise<AppPriceSchedule | null>;
|
|
5490
|
+
/**
|
|
5491
|
+
* Create (replace) the price schedule for this app. See
|
|
5492
|
+
* {@link AppPriceSchedule.createAsync} for important details — this
|
|
5493
|
+
* REPLACES any prior schedule entirely.
|
|
5494
|
+
*/
|
|
5495
|
+
createPriceScheduleAsync({ baseTerritoryId, manualPrices, }: {
|
|
5496
|
+
baseTerritoryId: string;
|
|
5497
|
+
manualPrices: AppPriceScheduleManualPriceInput[];
|
|
5498
|
+
}): Promise<AppPriceSchedule>;
|
|
5499
|
+
/**
|
|
5500
|
+
* List the valid price points for this app, optionally filtered by
|
|
5501
|
+
* territory. Use this to look up a concrete `appPricePoint` id to pass to
|
|
5502
|
+
* {@link App.createPriceScheduleAsync}.
|
|
5503
|
+
*
|
|
5504
|
+
* @see https://developer.apple.com/documentation/appstoreconnectapi/get-v1-apps-_id_-apppricepoints
|
|
5505
|
+
*/
|
|
5506
|
+
getAppPricePointsAsync({ query, }?: {
|
|
5507
|
+
query?: ConnectQueryParams<AppPricePointQueryFilter>;
|
|
5508
|
+
}): Promise<AppPricePoint[]>;
|
|
5151
5509
|
getInAppPurchasesAsync({ query, }?: {
|
|
5152
5510
|
query?: ConnectQueryParams<InAppPurchaseQueryFilter>;
|
|
5153
5511
|
}): Promise<InAppPurchase[]>;
|
|
@@ -5160,6 +5518,10 @@ declare module "connect/models/App" {
|
|
|
5160
5518
|
platform?: Platform;
|
|
5161
5519
|
includes?: string[];
|
|
5162
5520
|
}): Promise<ReviewSubmission | null>;
|
|
5521
|
+
getUnresolvedReviewSubmissionAsync({ platform, includes, }?: {
|
|
5522
|
+
platform?: Platform;
|
|
5523
|
+
includes?: string[];
|
|
5524
|
+
}): Promise<ReviewSubmission | null>;
|
|
5163
5525
|
getReviewSubmissionsAsync({ query, }?: {
|
|
5164
5526
|
query?: ConnectQueryParams;
|
|
5165
5527
|
}): Promise<ReviewSubmission[]>;
|
|
@@ -5349,41 +5711,6 @@ declare module "connect/models/ApiKey" {
|
|
|
5349
5711
|
revokeAsync(): Promise<ApiKey>;
|
|
5350
5712
|
}
|
|
5351
5713
|
}
|
|
5352
|
-
declare module "connect/models/AppPricePoint" {
|
|
5353
|
-
import { ConnectQueryFilter } from "connect/ConnectAPI";
|
|
5354
|
-
import { AppPriceTier } from "connect/models/AppPriceTier";
|
|
5355
|
-
import { ConnectModel } from "connect/models/ConnectModel";
|
|
5356
|
-
import { Territory } from "connect/models/Territory";
|
|
5357
|
-
export interface AppPricePointProps {
|
|
5358
|
-
customerPrice: string;
|
|
5359
|
-
proceeds: string;
|
|
5360
|
-
priceTier?: AppPriceTier;
|
|
5361
|
-
territory?: Territory;
|
|
5362
|
-
}
|
|
5363
|
-
export type AppPricePointQueryFilter = ConnectQueryFilter<{
|
|
5364
|
-
territory: string;
|
|
5365
|
-
priceTier: string;
|
|
5366
|
-
}, 'territory' | 'priceTier'>;
|
|
5367
|
-
export class AppPricePoint extends ConnectModel<AppPricePointProps> {
|
|
5368
|
-
static type: string;
|
|
5369
|
-
static getAsync: (context: import("AppStoreConnect").RequestContext, props?: {
|
|
5370
|
-
query?: import("connect/ConnectAPI").ConnectQueryParams<Partial<{
|
|
5371
|
-
territory: string | string[];
|
|
5372
|
-
priceTier: string | string[];
|
|
5373
|
-
} & {
|
|
5374
|
-
id?: string;
|
|
5375
|
-
}>> | undefined;
|
|
5376
|
-
} | undefined) => Promise<AppPricePoint[]>;
|
|
5377
|
-
/**
|
|
5378
|
-
*
|
|
5379
|
-
* @param id `AppPricePoint` id (ex: UNHB5PT4MA)
|
|
5380
|
-
*/
|
|
5381
|
-
static infoAsync: (context: import("AppStoreConnect").RequestContext, props: {
|
|
5382
|
-
id: string;
|
|
5383
|
-
query?: import("connect/ConnectAPI").ConnectQueryParams;
|
|
5384
|
-
}) => Promise<AppPricePoint>;
|
|
5385
|
-
}
|
|
5386
|
-
}
|
|
5387
5714
|
declare module "connect/models/BetaCrashLog" {
|
|
5388
5715
|
/**
|
|
5389
5716
|
* The crash log text associated with a beta feedback crash submission.
|
|
@@ -5692,6 +6019,7 @@ declare module "connect/index" {
|
|
|
5692
6019
|
export * from "connect/models/AppInfoLocalization";
|
|
5693
6020
|
export * from "connect/models/AppPrice";
|
|
5694
6021
|
export * from "connect/models/AppPricePoint";
|
|
6022
|
+
export * from "connect/models/AppPriceSchedule";
|
|
5695
6023
|
export * from "connect/models/AppPriceTier";
|
|
5696
6024
|
export * from "connect/models/AppPreview";
|
|
5697
6025
|
export * from "connect/models/AppPreviewSet";
|
|
@@ -5725,6 +6053,7 @@ declare module "connect/index" {
|
|
|
5725
6053
|
export * from "connect/models/BundleId";
|
|
5726
6054
|
export * from "connect/models/BundleIdCapability";
|
|
5727
6055
|
export * from "connect/models/ContentProvider";
|
|
6056
|
+
export * from "connect/models/ResolutionCenterDraftMessage";
|
|
5728
6057
|
export * from "connect/models/ResolutionCenterMessage";
|
|
5729
6058
|
export * from "connect/models/ResolutionCenterThread";
|
|
5730
6059
|
export * from "connect/models/ReviewRejection";
|