3.3.4 • Published 2 months ago

capacitor-plugin-glassfy v3.3.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

npm

Warning These plugin is for Capacitor 5. For Capacitor 4, use the 2.x version.

CapacitorJS Glassfy Plugin

Glassfy is a subscription revenue optimisation infrastructure for mobile applications.

Getting Started

Check the documentation at docs.glassfy.io to learn details on implementing and using Glassfy SDK.


Plugin Install

npm install capacitor-plugin-glassfy
npx cap sync

Build plugin and example

be sure to have ionic cli installed following instructions here

npm install
npm run build
cd example
npm install
ionic capacitor sync ios
ionic capacitor open ios

API

sdkVersion()

sdkVersion() => Promise<GlassfyVersion>

Returns: Promise<GlassfyVersion>


initialize(...)

initialize(options: { apiKey: string; watcherMode: boolean; }) => Promise<void>

For more details, follow instruction at https://docs.glassfy.io/get-started/configuration

ParamType
options{ apiKey: string; watcherMode: boolean; }

setLogLevel(...)

setLogLevel(options: { logLevel: GLASSFY_LOGLEVEL; }) => Promise<void>
ParamType
options{ logLevel: GLASSFY_LOGLEVEL; }

offerings()

offerings() => Promise<GlassfyOfferings>

For more details, check the documentation https://docs.glassfy.io/dashboard/configure-offerings

Returns: Promise<GlassfyOfferings>


purchaseHistory()

purchaseHistory() => Promise<GlassfyPurchasesHistory>

For more details, check the documentation https://docs.glassfy.io/dashboard/configure-offerings

Returns: Promise<GlassfyPurchasesHistory>


permissions()

permissions() => Promise<GlassfyPermissions>

For more details, check the documentation https://docs.glassfy.io/dashboard/configure-permissions.html

Returns: Promise<GlassfyPermissions>


skuWithId(...)

skuWithId(options: { identifier: string; }) => Promise<GlassfySku>

For more details, check the documentation https://docs.glassfy.io/dashboard/configure-products

ParamType
options{ identifier: string; }

Returns: Promise<GlassfySku>


skuWithIdAndStore(...)

skuWithIdAndStore(options: { identifier: string; store: GLASSFY_STORE; }) => Promise<GlassfySkuBase>
ParamType
options{ identifier: string; store: GLASSFY_STORE; }

Returns: Promise<GlassfySkuBase>


connectCustomSubscriber(...)

connectCustomSubscriber(options: { subscriberId: string; }) => Promise<void>
ParamType
options{ subscriberId: string; }

connectPaddleLicenseKey(...)

connectPaddleLicenseKey(options: { licenseKey: string; force: boolean; }) => Promise<void>
ParamType
options{ licenseKey: string; force: boolean; }

connectGlassfyUniversalCode(...)

connectGlassfyUniversalCode(options: { universalCode: string; force: boolean; }) => Promise<void>
ParamType
options{ universalCode: string; force: boolean; }

setEmailUserProperty(...)

setEmailUserProperty(options: { email: string; }) => Promise<void>
ParamType
options{ email: string; }

setDeviceToken(...)

setDeviceToken(options: { token: string; }) => Promise<void>
ParamType
options{ token: string; }

setExtraUserProperty(...)

setExtraUserProperty(options: { extra: GlassfyExtraProperty; }) => Promise<void>
ParamType
options{ extra: GlassfyExtraProperty; }

getUserProperty()

getUserProperty() => Promise<GlassfyUserProperties>

Returns: Promise<GlassfyUserProperties>


purchaseSku(...)

purchaseSku(options: { sku: GlassfySku; skuToUpgrade?: GlassfySku; replacementMode?: GLASSFY_REPLACEMENT_MODE; }) => Promise<GlassfyTransaction>
ParamType
options{ sku: GlassfySku; skuToUpgrade?: GlassfySku; replacementMode?: GLASSFY_REPLACEMENT_MODE; }

Returns: Promise<GlassfyTransaction>


restorePurchases()

restorePurchases() => Promise<GlassfyPermissions>

Returns: Promise<GlassfyPermissions>


storeInfo()

storeInfo() => Promise<GlassfyStoresInfo>

Returns: Promise<GlassfyStoresInfo>


setAttribution(...)

setAttribution(options: { type: GLASSFY_ATTRIBUTION; value: string; }) => Promise<void>
ParamType
options{ type: GLASSFY_ATTRIBUTION; value: string; }

setAttributions(...)

setAttributions(options: { items: GlassfyAttributionItem[]; }) => Promise<void>
ParamType
options{ items: GlassfyAttributionItem[]; }

_paywall(...)

_paywall(options: { remoteConfig: string; awaitLoading: boolean; }) => Promise<void>
ParamType
options{ remoteConfig: string; awaitLoading: boolean; }

_closePaywall()

_closePaywall() => Promise<void>

_openUrl(...)

_openUrl(options: { url: string; }) => Promise<void>
ParamType
options{ url: string; }

Interfaces

GlassfyVersion

PropType
versionstring

GlassfyOfferings

PropType
allGlassfyOffering[]

GlassfyOffering

PropType
offeringIdstring
skusGlassfySku[]

GlassfySku

PropType
introductoryEligibilityGLASSFY_ELEGIBILITY
promotionalEligibilityGLASSFY_ELEGIBILITY
extravars{ key: string: string; }
productGlassfyProduct
basePlanIdstring
offerIdstring
discountGlassfyProductDiscount

GlassfyProduct

PropType
titlestring
identifierstring
descriptionstring
pricenumber
currencyCodestring
periodstring
introductoryPriceGlassfyProductDiscount
discountsGlassfyProductDiscount[]
basePlanIdstring

GlassfyProductDiscount

PropType
identifierstring
pricenumber
currencyCodestring
periodstring
numberOfPeriodsnumber
typestring

GlassfyPurchasesHistory

PropType
allGlassfyPurchaseHistory[]

GlassfyPurchaseHistory

PropType
productIdstring
skuIdstring
typeGLASSFY_EVENT_TYPE
storeGLASSFY_STORE
purchaseDatestring
expireDatestring
transactionIdstring
subscriberIdstring
currencyCodestring
countryCodestring
isInIntroOfferPeriodboolean
promotionalOfferIdstring
offerCodeRefNamestring
licenseCodestring
webOrderLineItemIdstring

GlassfyPermissions

PropType
installationIdstring
subscriberIdstring
originalApplicationVersionstring
originalApplicationDatestring
allGlassfyPermission[]

GlassfyPermission

PropType
permissionIdstring
entitlementGLASSFY_ENTITLEMENT
isValidboolean
expireDatestring
accountableSkusGlassfyAccountableSku[]

GlassfyAccountableSku

PropType
isInIntroOfferPeriodboolean
isInTrialPeriodboolean
basePlanIdstring
offerIdstring

GlassfySkuBase

PropType
skuIdstring
productIdstring
storeGLASSFY_STORE

GlassfyUserProperties

PropType
emailstring
tokenboolean
extraGlassfyExtraProperty

GlassfyTransaction

PropType
productIdstring
receiptValidatedboolean
permissionsGlassfyPermissions

GlassfyStoresInfo

PropType
all(GlassfyStoreInfo | GlassfyPaddleStoreInfo)[]

GlassfyStoreInfo

PropType
storeExclude<GLASSFY_STORE, GLASSFY_STORE.Paddle>
extravars{ key: string: string; }

GlassfyPaddleStoreInfo

PropType
storeGLASSFY_STORE.Paddle
extravars{ key: string: string; }
useridstring
planIdstring
subscriptionIdstring
updateURLstring
cancelURLstring

GlassfyAttributionItem

PropType
typeGLASSFY_ATTRIBUTION
valuestring

Type Aliases

GlassfyExtraProperty

{ key: string: string }

Exclude

Exclude from T those types that are assignable to U

T extends U ? never : T

Enums

GLASSFY_LOGLEVEL

MembersValue
OFF0
ERROR1
DEBUG2
INFO3
ALL3

GLASSFY_ELEGIBILITY

MembersValue
ELEGIBLE1
NON_ELEGIBLE-1
UNKNOWN0

GLASSFY_EVENT_TYPE

MembersValue
InitialBuy5001
Restarted5002
Renewed5003
Expired5004
DidChangeRenewalStatus5005
IsInBillingRetryPeriod5006
ProductChange5007
InAppPurchase5008
Refund5009
Paused5010
Resumed5011
ConnectLicense5012
DisconnectLicense5013

GLASSFY_STORE

MembersValue
AppStore1
PlayStore2
Paddle3
Stripe4
Glassfy5

GLASSFY_ENTITLEMENT

MembersValue
NEVERBUY-9
OTHERREFUND-8
ISSUEREFUND-7
UPGRADED-6
EXPIREDVOLUNTARY-5
PRODUCTNOTAVAILABLE-4
FAILTOACCEPTINCREASE-3
EXPIREDFROMBILLING-2
INRETRY-1
MISSINGINFO0
EXPIREDINGRACE1
OFFPLATFORM2
NONRENEWING3
AUTORENEWOFF4
AUTORENEWON5

GLASSFY_REPLACEMENT_MODE

MembersValue
UNKNOWN_REPLACEMENT_MODE0
WITH_TIME_PRORATION1
CHARGE_PRORATED_PRICE2
WITHOUT_PRORATION3
CHARGE_FULL_PRICE5
DEFERRED6

GLASSFY_ATTRIBUTION

MembersValue
AdjustID1
AppsFlyerID2
IP3
IDFA4
IDFV5
GAID6
ASID7
AID8
3.3.4

2 months ago

3.3.3

3 months ago

3.3.2

5 months ago

3.3.1

5 months ago

3.2.2

7 months ago

3.3.0

6 months ago

3.2.1

9 months ago

3.2.0

11 months ago

3.1.1

11 months ago

3.1.0

11 months ago

3.0.0

12 months ago

3.0.0-beta.0

12 months ago

2.0.7

1 year ago

2.0.8

1 year ago

2.0.5

1 year ago

2.0.6

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

1 year ago

2.0.1

2 years ago

2.0.0

2 years ago

1.3.0-beta0

2 years ago

1.3.0

2 years ago

1.1.83

2 years ago

1.1.81

2 years ago

1.1.80

2 years ago

1.1.82

2 years ago

1.1.70

2 years ago

1.1.7

2 years ago