Data dictionary

GRVAppCategory

Name

Type

Description

Required

name

NSString *

The name of the first-level category that a mini program belongs to.

M

identifier

NSString *

The unique ID that is assigned by Mini Program Platform to identify the first-level mini program category.

M

categoryCode2

NSString *

The unique ID that is assigned by Mini Program Platform to identify the secondary mini program category.

O

category2

NSString *

The name of the secondary category that a mini program belongs to.

O

categoryCode3

NSString *

The unique ID that is assigned by Mini Program Platform to identify the tertiary mini program category.

O

category3

NSString *

The name of the tertiary category that a mini program belongs to.

O

GRVAppInfo

Name

Type

Description

Required

identifier

NSString *

The unique ID that is assigned by Mini Program Platform to identify a mini program.

M

name

NSString *

The mini program name.

M

slogan

NSString *

The mini program tagline.

M

iconURL

NSString *

The URL of the mini program logo.

M

introduction

NSString *

The mini program description.

M

releaseVersion

NSString *

The release version of a mini program, which follows the major.minor.patch.timestamp pattern. For example, "1.0.1.1653969582308".

M

categories

NSArray<GRVAppCategory *> *

The categories that a mini program belongs to.

O

firstPublishTime

NSTimeInterval

The date and time of the first release of the mini program, which is in the timestamp format.

O

GRVFetchAppInfosResult

Name

Type

Description

Required

totalCount

NSInteger

The quantity of the mini programs that match the specified query conditions.

M

appInfos

NSArray<GRVAppInfo *> *

The list of the mini programs. An empty array is returned when the value of totalCount is 0.

Maximum size: 50 elements

M

GRVApplicationCategoryInfoModel

Name

Type

Description

Required

category

NSString *

The name of the first-level category that a mini program belongs to.

M

categoryId

NSString *

The unique ID that is assigned by Mini Program Platform to identify the first-level mini program category.

M

categoryCode2

NSString *

The unique ID that is assigned by Mini Program Platform to identify the secondary mini program category.

O

category2

NSString *

The name of the secondary category that a mini program belongs to.

O

categoryCode3

NSString *

The unique ID that is assigned by Mini Program Platform to identify the tertiary mini program category.

O

category3

NSString *

The name of the tertiary category that a mini program belongs to.

O

GRVApplicationInfoModel

Name

Type

Description

Required

appId

NSString *

The unique ID that is assigned by Mini Program Platform to identify a mini program.

M

appName

NSString *

The mini program name.

M

developerVersion

NSString *

The release version of a mini program, which follows the major.minor.patch pattern. For example, "1.0.1".

M

deployVersion

NSString *

The release version of a mini program, which follows the major.minor.patch.timestamp pattern. For example, "1.0.1.1653969582308".

M

appSlogan

NSString *

The mini program tagline.

M

appDesc

NSString *

The mini program description.

M

iconUrl

NSString *

The URL of the mini program logo.

M

status

NSString *

The mini program release status in your super app. Valid values are:

  • GRAY: The mini program is in a grayscale release.
  • ONLINE: The mini program is fully released and runs online.

M

packageSize

NSString *

The mini program package size.

M

createTime

NSTimeInterval

The date and time when a mini program is created, which is in the timestamp format.

M

firstPublishTime

NSTimeInterval

The date and time of the first release of the mini program, which is in the timestamp format.

O

category

NSString *

The name of the first-level category that a mini program belongs to.

O

categoryId

NSString *

The unique ID that is assigned by Mini Program Platform to identify the first-level mini program category.

O

categoryInfos

NSArray<GRVApplicationCategoryInfoModel *> *

The categories that a mini program belongs to.

O

extendInfo

NSDictionary *

An extended attribute that is used to provide additional information if necessary.

O

GRVFetchAppsParameter

Name

Type

Default

Description

Required

queryStartIndex

NSUInteger

0

The starting index to query the mini program list. The index list is determined by the specified sortDescriptor, ascending, and category parameters.

M

querySize

NSUInteger

0

The quantity of the mini programs to be queried.

M

sortDescriptor

NSString *

GRVAppCreateTimeSortDescriptorKey

The way mini programs are sorted. Valid values are:

  • GRVAppIdSortDescriptorKey: Sorted by the mini program IDs.
  • GRVPublishTimeSortDescriptorKey: Sorted by the mini program release time.
  • GRVAppNameSortDescriptorKey: Sorted by the mini program names.
  • GRVAppDescSortDescriptorKey: Sorted by the mini program descriptions.
  • GRVAppCreateTimeSortDescriptorKey: Sorted by the mini program creation time.

O

ascending

BOOL

YES

Whether to sort mini programs in ascending order. The order follows the utf8mb4_general_ci sorting rule. Valid values are:

  • YES: Sort in ascending order.
  • NO: Sort in descending order.

O

category

NSString *

N/A

The category that mini programs belong to. Specify this parameter with the unique category ID that is assigned by Mini Program Platform. You can get the ID from the Mini Program Platform console.

O

GRVFetchAppsResponse

Name

Type

Description

Required

success

BOOL

Whether the query result is successful. Valid values are:

  • YES: The query is successful.
  • NO: The query fails.

M

errorCode

NSString *

The error code about the request. This parameter is returned if the query fails. See the Error codes section of the fetchApps API for details.

O

errorMessage

NSString *

The error message about the request. This parameter is returned if the query fails. See the Error codes section of the fetchApps API for details.

O

totalCount

NSInteger

The quantity of the mini programs that match the specified query conditions.

O

appInfoList

NSArray<GRVApplicationInfoModel*> *

The list of the mini programs. An empty array is returned when the value of totalCount is 0.

Maximum size: 50 elements

O

GRVURLContentDecodeResponse

Name

Type

Description

Required

success

BOOL

Whether the decode succeeds. Valid values are:

  • YES: The decode succeeds.
  • NO: The decode fails.

M

errorCode

NSString *

The error code about the API call.

O

errorMessage

NSString *

The error message about the API call.

O

decodedURL

NSString *

the decoded content of the URL.

O

IAPWalletMemberInfoScope

Field

Data type

Description

Required

appId

String

The unique ID that is assigned by Mini Program Platform to identify a mini program.

No

scopes

Set<String>

The scopes of MemberInfo. The default value is "auth_user".

No

extendedInfo

Dictionary<String, String>

An extended attribute that is used to provide additional information if necessary.

No

IAPWalletMemberInfoFetchResult

Field

Data type

Description

Required

memberInfo

IAPWalletMemberInfo

The actual object that contains the user information

No

IAPWalletMemberInfo

Field

Data type

Description

Required

userId

String

The user ID.

Yes

avatar

String

The URL of the avatar image.

No

extendInfo

Dictionary<String, Any>

An extended attribute that is used to provide additional information. This parameter is specified in key-value pairs with the following valid key:

nickName: Optional, String. The user's nickname.

No

IAPWalletOAuthResult

Field

Data type

Description

Required

authCode

String

The authorization code that is generated by the super app.

Yes

authState

String

The Authorization result state

No

authErrorScopes

Dictionary<String, String>

The authorization scopes that are failed to be granted. The parameter value is in the key-value format. The key is the scope and the value is the error code. For example, "auth_user":"errorCode".

No

authSuccessScopes

Array<String>

The authorization scopes that are successfully granted.

No

authRedirectUrl

String

Auth redirect url dispatched from the auth server

No

error

NSError

Authorization error occurred.

No

It's used when authorization fails.

IAPWalletAuthPageConfirmResult

Field

Data type

Description

Required

referenceAgreementId

String

the server needs to return a reference agreement id to track the agreement has been confirmed.

No. When the auth agreement page needs to confirmed by the server.

IAPWalletOAuthScopeQueryResult

Field

Data type

Description

Required

authorizedScopes

Array<String>

A list of the authorized scopes.

Yes

IAPWalletPaymentRequest

Field

Data type

Description

Required

amount

IAPWalletPaymentAmount

The payment amount, including value and currency. 

No

paymentString

String

The certificate of the payment, which depends on the type of the payment (see thetype field). Valide values are:

  • orderId: The ID of order.
  • paymentId: The ID of paymentId
  • cashierUrl: The url of cashier page
  • orderStr: A string of complete payment parameters, which is recommended to be obtained from the server.

Yes

type

String

The type of payment. Valide values are:

  • orderId: The ID of order.
  • paymentId: The ID of paymentId
  • cashierUrl: The url of cashier page
  • orderStr: A string of complete payment parameters, which is recommended to be obtained from the server.

Yes

extendedInfo

Dictionary<String,String>

An extended attribute that is used to provide additional information if necessary.

extendedInfo keys:

  • paymentId: optional, appears when paymentType is cashierUrl. paymentId can be in the extendedInfo.

No

IAPWalletPaymentResult

Field

Data type

Description

Required

resultCode

String

The payment result code:

  • CODE_PENDING: "8000" PAY_PENDING
  • CODE_FAILURE: "4000" PAY_FAILURE
  • CODE_SUCCESS: "9000" PAY_SUCCESS
  • CODE_USER_CANCEL: "6001" USER_CANCEL

Yes

resultMessage

String

The payment result message

Yes

IAPWalletScannerOption

Field

Data type

Description

Required

type

String

The type of code. Valid values are:

  • qrCode: the mini program calls the my.scan() JSAPI with QR type. This is the default value.
  • barCode: the mini program calls the my.scan() JSAPI with barcode type.

Yes

hideAlbum

Boolean

Whether the scanner supports scanning images from albums.

Valid values are:

  • true: Support.
  • false: Does not support. This is the default value.

Yes

extendedInfo

Dictionary<String,String>

An extended attribute that is used to provide additional information.

No

IAPWalletScannerResult

Field

Data type

Description

Required

code

String

The code value that is extracted by the scanner.

Return null if scan error happens.

No

NSError

Field

Data type

Description

Required

errorCode

int

Error code, refer to the Error codes section of each SPI documentation.

Yes

errorDesc

String

Error description

No

Startup parameters

Name

Type

Description

query

NSString *

This parameter is used to retrieve information about the current startup and pass it with key-value pairs to the mini program.

showTitleBar

BOOL

Whether to show the title bar. If this parameter is not specified, the title bar is shown by default. Valid values are:

  • YES: Show the title bar.
  • NO: Hide the title bar.

showLoading

BOOL

Whether to show the loading view on the page. If this parameter is not specified, the view is shown by default. Valid values are:

  • YES: Show the loading view.
  • NO: Hide the loading view.

showTitleLoading

BOOL

Whether to show the loading view on the title bar. If this parameter is not specified, the view is hidden by default. Valid values are:

  • YES: Show the loading view.
  • NO: Hide the loading view.

titleColor

NSInteger

The page title text color. Specify this parameter with the color codes in hexadecimal notation that follow the RGBA color model.

titleBarColor

NSInteger

The title bar color. Specify this parameter with the color codes in hexadecimal notation that follow the RGBA color model.

backButtonColor

NSInteger

The color of the back button on the title bar. Specify this parameter with the color codes in hexadecimal notation that follow the RGBA color model.

screenOrientation

NSString *

The initial screen orientation of a mini program when it is first launched. If this parameter is not specified, the mini program is opened in the portrait position by default. Valid values are:

  • landscape: Open a mini program in the landscape orientation.
  • portrait: Open a mini program in the portrait orientation.
  • auto: Open a mini program in the same orientation as the device.

titleAlignment

NSString *

The horizontal positioning of the page title. If this parameter is not specified, the page title is aligned to the left by default. Valid value is:

  • auto: Align the page title to the center.

nbupdate

NSString *

This parameter is used to configure the mini program update mode (Default update mode, Async update mode, and Sync update mode). For details see Mini program update mechanism.
Valid values are:

  • asyncforce: indicate the Async update mode
  • syncforce: indicate the Sync update mode
  • null / async: indicate the Default update mode