Socket
Socket
Sign inDemoInstall

capacitor-purchases

Package Overview
Dependencies
2
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.4 to 1.1.5

2

dist/docs.json

@@ -368,3 +368,3 @@ {

],
"type": "SKProductDiscount"
"type": "SKProductDiscount | null"
},

@@ -371,0 +371,0 @@ {

@@ -363,3 +363,3 @@ import type { PluginListenerHandle } from "@capacitor/core";

*/
readonly introductoryPrice: SKProductDiscount;
readonly introductoryPrice: SKProductDiscount | null;
/**

@@ -366,0 +366,0 @@ * The Product discounts list.

import { WebPlugin } from '@capacitor/core';
import type { CapacitorPurchasesPlugin, LogInResult, PurchaserInfo, Offerings } from './definitions';
import type { CapacitorPurchasesPlugin, LogInResult, PurchaserInfo, Offerings, Offering, Package } from './definitions';
export declare const mockPack: Package;
export declare const mockCurrent: Offering;
export declare const mockPurchaserInfo: PurchaserInfo;
export declare const mockAll: {
[key: string]: Offering;
};
export declare const mockOffering: Offerings;
export declare class CapacitorPurchasesWeb extends WebPlugin implements CapacitorPurchasesPlugin {

@@ -4,0 +11,0 @@ setup(data: {

import { WebPlugin } from '@capacitor/core';
// import type { CapacitorPurchasesPlugin, LogInResult, PurchaserInfo, Offerings, Package, UpgradeInfo } from './definitions';
import { PACKAGE_TYPE } from './definitions';
export const mockPack = {
identifier: 'com.example.test',
packageType: PACKAGE_TYPE.ANNUAL,
product: {
identifier: 'com.example.test',
description: 'Test',
title: 'Test',
price: 0.99,
priceString: '$0.99',
currencyCode: 'USD',
currencySymbol: '$',
isFamilyShareable: false,
subscriptionGroupIdentifier: 'com.example.test',
subscriptionPeriod: {
numberOfUnits: 1,
unit: 1,
},
introductoryPrice: null,
discounts: [],
},
offeringIdentifier: 'com.example.test.offering1'
};
export const mockCurrent = {
identifier: 'com.example.test.test',
serverDescription: "Test",
availablePackages: [mockPack],
lifetime: mockPack,
annual: mockPack,
sixMonth: mockPack,
threeMonth: mockPack,
twoMonth: mockPack,
monthly: mockPack,
weekly: mockPack,
};
export const mockPurchaserInfo = {
entitlements: {
all: {},
active: {},
},
activeSubscriptions: [''],
allPurchasedProductIdentifiers: [''],
nonSubscriptionTransactions: [],
latestExpirationDate: null,
firstSeen: '2020-01-01T00:00:00.000Z',
originalAppUserId: '',
requestDate: '2020-01-01T00:00:00.000Z',
originalApplicationVersion: '',
originalPurchaseDate: null,
managementURL: null
};
export const mockAll = {
"current": mockCurrent
};
export const mockOffering = {
all: mockAll,
current: mockCurrent
};
export class CapacitorPurchasesWeb extends WebPlugin {
// add all missing declaration
setup(data) {
console.log('setup', data);
throw new Error("Method not implemented.");
console.error('setup only mocked in web', data);
return Promise.resolve();
}
async getOfferings() {
console.log('getOfferings');
throw new Error("Method not implemented.");
console.error('getOfferings only mocked in web');
return { offerings: mockOffering };
}
async purchasePackage(data) {
console.log('purchasePackage', data);
throw new Error("Method not implemented.");
console.error('purchasePackage only mocked in web', data);
return { purchaserInfo: mockPurchaserInfo };
}
async restoreTransactions() {
console.log('purchasePackage');
throw new Error("Method not implemented.");
console.error('purchasePackage only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async setAttributes(data) {
console.log('setAttributes', data);
throw new Error("Method not implemented.");
console.error('setAttributes only mocked in web', data);
return Promise.resolve();
}
async logIn(data) {
console.log('logIn', data);
throw new Error("Method not implemented.");
console.error('logIn only mocked in web', data);
return {
purchaserInfo: mockPurchaserInfo,
created: true,
};
}
async logOut() {
console.log('logOut');
throw new Error("Method not implemented.");
console.error('logOut only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async getPurchaserInfo() {
console.log('getPurchaserInfo');
throw new Error("Method not implemented.");
console.error('getPurchaserInfo only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async setDebugLogsEnabled(data) {
console.log('setDebugLogsEnabled', data);
throw new Error("Method not implemented.");
console.error('setDebugLogsEnabled only mocked in web', data);
}
}
//# sourceMappingURL=web.js.map

@@ -139,40 +139,97 @@ 'use strict';

// import type { CapacitorPurchasesPlugin, LogInResult, PurchaserInfo, Offerings, Package, UpgradeInfo } from './definitions';
const mockPack = {
identifier: 'com.example.test',
packageType: exports.PACKAGE_TYPE.ANNUAL,
product: {
identifier: 'com.example.test',
description: 'Test',
title: 'Test',
price: 0.99,
priceString: '$0.99',
currencyCode: 'USD',
currencySymbol: '$',
isFamilyShareable: false,
subscriptionGroupIdentifier: 'com.example.test',
subscriptionPeriod: {
numberOfUnits: 1,
unit: 1,
},
introductoryPrice: null,
discounts: [],
},
offeringIdentifier: 'com.example.test.offering1'
};
const mockCurrent = {
identifier: 'com.example.test.test',
serverDescription: "Test",
availablePackages: [mockPack],
lifetime: mockPack,
annual: mockPack,
sixMonth: mockPack,
threeMonth: mockPack,
twoMonth: mockPack,
monthly: mockPack,
weekly: mockPack,
};
const mockPurchaserInfo = {
entitlements: {
all: {},
active: {},
},
activeSubscriptions: [''],
allPurchasedProductIdentifiers: [''],
nonSubscriptionTransactions: [],
latestExpirationDate: null,
firstSeen: '2020-01-01T00:00:00.000Z',
originalAppUserId: '',
requestDate: '2020-01-01T00:00:00.000Z',
originalApplicationVersion: '',
originalPurchaseDate: null,
managementURL: null
};
const mockAll = {
"current": mockCurrent
};
const mockOffering = {
all: mockAll,
current: mockCurrent
};
class CapacitorPurchasesWeb extends core.WebPlugin {
// add all missing declaration
setup(data) {
console.log('setup', data);
throw new Error("Method not implemented.");
console.error('setup only mocked in web', data);
return Promise.resolve();
}
async getOfferings() {
console.log('getOfferings');
throw new Error("Method not implemented.");
console.error('getOfferings only mocked in web');
return { offerings: mockOffering };
}
async purchasePackage(data) {
console.log('purchasePackage', data);
throw new Error("Method not implemented.");
console.error('purchasePackage only mocked in web', data);
return { purchaserInfo: mockPurchaserInfo };
}
async restoreTransactions() {
console.log('purchasePackage');
throw new Error("Method not implemented.");
console.error('purchasePackage only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async setAttributes(data) {
console.log('setAttributes', data);
throw new Error("Method not implemented.");
console.error('setAttributes only mocked in web', data);
return Promise.resolve();
}
async logIn(data) {
console.log('logIn', data);
throw new Error("Method not implemented.");
console.error('logIn only mocked in web', data);
return {
purchaserInfo: mockPurchaserInfo,
created: true,
};
}
async logOut() {
console.log('logOut');
throw new Error("Method not implemented.");
console.error('logOut only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async getPurchaserInfo() {
console.log('getPurchaserInfo');
throw new Error("Method not implemented.");
console.error('getPurchaserInfo only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async setDebugLogsEnabled(data) {
console.log('setDebugLogsEnabled', data);
throw new Error("Method not implemented.");
console.error('setDebugLogsEnabled only mocked in web', data);
}

@@ -183,2 +240,7 @@ }

__proto__: null,
mockPack: mockPack,
mockCurrent: mockCurrent,
mockPurchaserInfo: mockPurchaserInfo,
mockAll: mockAll,
mockOffering: mockOffering,
CapacitorPurchasesWeb: CapacitorPurchasesWeb

@@ -185,0 +247,0 @@ });

@@ -136,40 +136,97 @@ var capacitorCapacitorPurchases = (function (exports, core) {

// import type { CapacitorPurchasesPlugin, LogInResult, PurchaserInfo, Offerings, Package, UpgradeInfo } from './definitions';
const mockPack = {
identifier: 'com.example.test',
packageType: exports.PACKAGE_TYPE.ANNUAL,
product: {
identifier: 'com.example.test',
description: 'Test',
title: 'Test',
price: 0.99,
priceString: '$0.99',
currencyCode: 'USD',
currencySymbol: '$',
isFamilyShareable: false,
subscriptionGroupIdentifier: 'com.example.test',
subscriptionPeriod: {
numberOfUnits: 1,
unit: 1,
},
introductoryPrice: null,
discounts: [],
},
offeringIdentifier: 'com.example.test.offering1'
};
const mockCurrent = {
identifier: 'com.example.test.test',
serverDescription: "Test",
availablePackages: [mockPack],
lifetime: mockPack,
annual: mockPack,
sixMonth: mockPack,
threeMonth: mockPack,
twoMonth: mockPack,
monthly: mockPack,
weekly: mockPack,
};
const mockPurchaserInfo = {
entitlements: {
all: {},
active: {},
},
activeSubscriptions: [''],
allPurchasedProductIdentifiers: [''],
nonSubscriptionTransactions: [],
latestExpirationDate: null,
firstSeen: '2020-01-01T00:00:00.000Z',
originalAppUserId: '',
requestDate: '2020-01-01T00:00:00.000Z',
originalApplicationVersion: '',
originalPurchaseDate: null,
managementURL: null
};
const mockAll = {
"current": mockCurrent
};
const mockOffering = {
all: mockAll,
current: mockCurrent
};
class CapacitorPurchasesWeb extends core.WebPlugin {
// add all missing declaration
setup(data) {
console.log('setup', data);
throw new Error("Method not implemented.");
console.error('setup only mocked in web', data);
return Promise.resolve();
}
async getOfferings() {
console.log('getOfferings');
throw new Error("Method not implemented.");
console.error('getOfferings only mocked in web');
return { offerings: mockOffering };
}
async purchasePackage(data) {
console.log('purchasePackage', data);
throw new Error("Method not implemented.");
console.error('purchasePackage only mocked in web', data);
return { purchaserInfo: mockPurchaserInfo };
}
async restoreTransactions() {
console.log('purchasePackage');
throw new Error("Method not implemented.");
console.error('purchasePackage only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async setAttributes(data) {
console.log('setAttributes', data);
throw new Error("Method not implemented.");
console.error('setAttributes only mocked in web', data);
return Promise.resolve();
}
async logIn(data) {
console.log('logIn', data);
throw new Error("Method not implemented.");
console.error('logIn only mocked in web', data);
return {
purchaserInfo: mockPurchaserInfo,
created: true,
};
}
async logOut() {
console.log('logOut');
throw new Error("Method not implemented.");
console.error('logOut only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async getPurchaserInfo() {
console.log('getPurchaserInfo');
throw new Error("Method not implemented.");
console.error('getPurchaserInfo only mocked in web');
return { purchaserInfo: mockPurchaserInfo };
}
async setDebugLogsEnabled(data) {
console.log('setDebugLogsEnabled', data);
throw new Error("Method not implemented.");
console.error('setDebugLogsEnabled only mocked in web', data);
}

@@ -180,2 +237,7 @@ }

__proto__: null,
mockPack: mockPack,
mockCurrent: mockCurrent,
mockPurchaserInfo: mockPurchaserInfo,
mockAll: mockAll,
mockOffering: mockOffering,
CapacitorPurchasesWeb: CapacitorPurchasesWeb

@@ -182,0 +244,0 @@ });

{
"name": "capacitor-purchases",
"version": "1.1.4",
"version": "1.1.5",
"description": "In-app Subscriptions Made Easy with RevenueCat sdk",

@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js",

@@ -222,16 +222,16 @@ # capacitor-purchases

| Prop | Type | Description |
| --------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **`identifier`** | <code>string</code> | <a href="#product">Product</a> Id. |
| **`description`** | <code>string</code> | Description of the product. |
| **`title`** | <code>string</code> | Title of the product. |
| **`price`** | <code>number</code> | Price of the product in the local currency. |
| **`priceString`** | <code>string</code> | Formatted price of the item, including its currency sign, such as €3.99. |
| **`currencyCode`** | <code>string</code> | Currency code for price and original price. |
| **`currencySymbol`** | <code>string</code> | Currency symbol for price and original price. |
| **`isFamilyShareable`** | <code>boolean</code> | Boolean indicating if the product is sharable with family |
| **`subscriptionGroupIdentifier`** | <code>string</code> | Group identifier for the product. |
| **`subscriptionPeriod`** | <code><a href="#subscriptionperiod">SubscriptionPeriod</a></code> | The <a href="#product">Product</a> subcription group identifier. |
| **`introductoryPrice`** | <code><a href="#skproductdiscount">SKProductDiscount</a></code> | The <a href="#product">Product</a> introductory Price. |
| **`discounts`** | <code>SKProductDiscount[]</code> | The <a href="#product">Product</a> discounts list. |
| Prop | Type | Description |
| --------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **`identifier`** | <code>string</code> | <a href="#product">Product</a> Id. |
| **`description`** | <code>string</code> | Description of the product. |
| **`title`** | <code>string</code> | Title of the product. |
| **`price`** | <code>number</code> | Price of the product in the local currency. |
| **`priceString`** | <code>string</code> | Formatted price of the item, including its currency sign, such as €3.99. |
| **`currencyCode`** | <code>string</code> | Currency code for price and original price. |
| **`currencySymbol`** | <code>string</code> | Currency symbol for price and original price. |
| **`isFamilyShareable`** | <code>boolean</code> | Boolean indicating if the product is sharable with family |
| **`subscriptionGroupIdentifier`** | <code>string</code> | Group identifier for the product. |
| **`subscriptionPeriod`** | <code><a href="#subscriptionperiod">SubscriptionPeriod</a></code> | The <a href="#product">Product</a> subcription group identifier. |
| **`introductoryPrice`** | <code><a href="#skproductdiscount">SKProductDiscount</a> \| null</code> | The <a href="#product">Product</a> introductory Price. |
| **`discounts`** | <code>SKProductDiscount[]</code> | The <a href="#product">Product</a> discounts list. |

@@ -238,0 +238,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc