Skip to content

Commit

Permalink
v13.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
j3k0 committed Sep 22, 2023
1 parent 3be6180 commit ebeea9d
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 75 deletions.
12 changes: 12 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## 13.8

### 13.8.2

#### store.applicationUsername can return `undefined`

If no user is logged in, you `applicationUsername` function can return
undefined.

#### Add "productId" and "platform" to Error objects

All errors now include the "platform" and "productId" field (when applicable),
to get more context.

### 13.8.1

#### Fix AppStore eligibility determination of intro period
Expand Down
2 changes: 1 addition & 1 deletion api/classes/CdvPurchase.Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Entry class of the plugin.

### applicationUsername

`Optional` **applicationUsername**: `string` \| () => `string`
`Optional` **applicationUsername**: `string` \| () => `undefined` \| `string`

Return the identifier of the user for your application

Expand Down
18 changes: 18 additions & 0 deletions api/interfaces/CdvPurchase.IError.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ An error triggered by the In-App Purchase plugin
- [code](CdvPurchase.IError.md#code)
- [isError](CdvPurchase.IError.md#iserror)
- [message](CdvPurchase.IError.md#message)
- [platform](CdvPurchase.IError.md#platform)
- [productId](CdvPurchase.IError.md#productid)

## Properties

Expand All @@ -37,3 +39,19 @@ ___
**message**: `string`

Human readable message, in plain english

___

### platform

**platform**: ``null`` \| [`Platform`](../enums/CdvPurchase.Platform.md)

Optional platform the error occured on

___

### productId

**productId**: ``null`` \| `string`

Optional ID of the product the error occurred on
21 changes: 21 additions & 0 deletions api/modules/CdvPurchase.Braintree.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@

- [customerId](CdvPurchase.Braintree.md#customerid)

### Functions

- [braintreeError](CdvPurchase.Braintree.md#braintreeerror)

## Type Aliases

### ClientTokenProvider
Expand Down Expand Up @@ -107,3 +111,20 @@ ___
**customerId**: `string` \| `undefined`

The Braintree customer identifier. Set it to allow reusing of payment methods.

## Functions

### braintreeError

**braintreeError**(`code`, `message`): [`IError`](../interfaces/CdvPurchase.IError.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `code` | [`ErrorCode`](../enums/CdvPurchase.ErrorCode.md) |
| `message` | `string` |

#### Returns

[`IError`](../interfaces/CdvPurchase.IError.md)
2 changes: 1 addition & 1 deletion api/modules/CdvPurchase.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ ___

### PLUGIN\_VERSION

`Const` **PLUGIN\_VERSION**: ``"13.8.1"``
`Const` **PLUGIN\_VERSION**: ``"13.8.2"``

Current release number of the plugin.

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-purchase",
"version": "13.8.1",
"version": "13.8.2",
"description": "Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)",
"cordova": {
"id": "cordova-plugin-purchase",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-purchase"
xmlns:android="http://schemas.android.com/apk/res/android"
version="13.8.1">
version="13.8.2">

<name>Purchase</name>
<description>Cordova Purchase plugin for iOS (AppStore), Android (PlayStore) and Windows</description>
Expand Down
2 changes: 1 addition & 1 deletion src/ts/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace CdvPurchase {
/**
* Current release number of the plugin.
*/
export const PLUGIN_VERSION = '13.8.1';
export const PLUGIN_VERSION = '13.8.2';

/**
* Entry class of the plugin.
Expand Down
13 changes: 9 additions & 4 deletions www/store.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ declare namespace CdvPurchase {
*
* @internal
*/
function storeError(code: ErrorCode, message: string): IError;
function storeError(code: ErrorCode, message: string, platform: Platform | null, productId: string | null): IError;
}
declare namespace CdvPurchase {
interface IapticConfig {
Expand Down Expand Up @@ -662,7 +662,7 @@ declare namespace CdvPurchase {
/**
* Current release number of the plugin.
*/
const PLUGIN_VERSION = "13.8.1";
const PLUGIN_VERSION = "13.8.2";
/**
* Entry class of the plugin.
*/
Expand Down Expand Up @@ -702,7 +702,7 @@ declare namespace CdvPurchase {
*/
verbosity: LogLevel;
/** Return the identifier of the user for your application */
applicationUsername?: string | (() => string);
applicationUsername?: string | (() => string | undefined);
/**
* Get the application username as a string by either calling or returning {@link Store.applicationUsername}
*/
Expand Down Expand Up @@ -1019,6 +1019,10 @@ declare namespace CdvPurchase {
code: ErrorCode;
/** Human readable message, in plain english */
message: string;
/** Optional platform the error occured on */
platform: Platform | null;
/** Optional ID of the product the error occurred on */
productId: string | null;
}
/** Types of In-App Products */
enum ProductType {
Expand Down Expand Up @@ -1370,7 +1374,7 @@ declare namespace CdvPurchase {
*
* @internal
*/
static failed(code: ErrorCode, message: string): PaymentRequestPromise;
static failed(code: ErrorCode, message: string, platform: Platform | null, productId: string | null): PaymentRequestPromise;
/**
* Return a failed promise.
*
Expand Down Expand Up @@ -3161,6 +3165,7 @@ declare namespace CdvPurchase {
checkSupport(functionality: PlatformFunctionality): boolean;
restorePurchases(): Promise<void>;
}
function braintreeError(code: ErrorCode, message: string): IError;
}
}
declare namespace CdvPurchase {
Expand Down
Loading

0 comments on commit ebeea9d

Please sign in to comment.