Skip to content

Commit 678be12

Browse files
committed
chore: update package name
1 parent c3b6a2b commit 678be12

7 files changed

+16
-16
lines changed

README_HOOK_BODY_PARSER.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const express = require('express')
1111
const app = express()
1212
const port = process.env.PORT || 3456
1313

14-
const paddleIntegration = require('@discue/paddle-integration-mongodb')
14+
const paddleIntegration = require('@discue/paddle-firebase-mongodb')
1515
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
1616
const subscriptions = new paddleIntegration.SubscriptionHooks({ storage })
1717

README_HOOK_MIDDLEWARE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const express = require('express')
1717
const app = express()
1818
const port = process.env.PORT || 3456
1919

20-
const paddleIntegration = require('@discue/paddle-firebase-integration')
20+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
2121
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
2222
const subscriptions = new paddleIntegration.SubscriptionHooks({ storage })
2323

README_SUBSCRIPTION_API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To create a new instance, four parameters need to be passed to the constructor:
3333
```js
3434
'use strict'
3535

36-
const paddleIntegration = require('@discue/paddle-firebase-integration')
36+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
3737
const paddleApi = new paddleIntegration.Api({
3838
useSandbox: true,
3939
authCode: process.env.AUTH_CODE,

README_SUBSCRIPTION_HYDRATION.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Uses the `subscription_id` to contact Paddle API and checks whether the given lo
1717
```js
1818
'use strict'
1919

20-
const paddleIntegration = require('@discue/paddle-firebase-integration')
20+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
2121

2222
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
2323
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
@@ -97,7 +97,7 @@ Uses the `subscription_id` to contact Paddle API and checks whether the given lo
9797
```js
9898
'use strict'
9999

100-
const paddleIntegration = require('@discue/paddle-firebase-integration')
100+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
101101

102102
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
103103
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })

README_SUBSCRIPTION_INFO.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Returns all available information about a subscription. Will include the `start`
1717
```js
1818
'use strict'
1919

20-
const paddleIntegration = require('@discue/paddle-firebase-integration')
20+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
2121
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
2222
// pass the path to the collection here
2323
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
@@ -49,7 +49,7 @@ Returns list of payments for for all subscriptions associated with the given use
4949
```js
5050
'use strict'
5151

52-
const paddleIntegration = require('@discue/paddle-firebase-integration')
52+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
5353
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
5454
// pass the path to the collection here
5555
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
@@ -79,7 +79,7 @@ Returns list of payments for for all subscriptions associated with the given use
7979
```js
8080
'use strict'
8181

82-
const paddleIntegration = require('@discue/paddle-firebase-integration')
82+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
8383
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
8484
// pass the path to the collection here
8585
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
@@ -109,7 +109,7 @@ Will return the status for all subscriptions associated with the given user/api_
109109
```js
110110
'use strict'
111111

112-
const paddleIntegration = require('@discue/paddle-firebase-integration')
112+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
113113
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
114114
// pass the path to the collection here
115115
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
@@ -140,7 +140,7 @@ Cancels a specific subscription plan. The subscription plan id must be passed.
140140
```js
141141
'use strict'
142142

143-
const paddleIntegration = require('@discue/paddle-firebase-integration')
143+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
144144
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
145145
// pass the path to the collection here
146146
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })
@@ -165,7 +165,7 @@ Updates a subscription plan. The previous one will be cancelled and the new one
165165
```js
166166
'use strict'
167167

168-
const paddleIntegration = require('@discue/paddle-firebase-integration')
168+
const paddleIntegration = require('@discue/paddle-integration-mongodb')
169169
const api = new paddleIntegration.Api({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
170170
// pass the path to the collection here
171171
const storage = paddleIntegration.subscriptionStorage({ url: 'mongodb://localhost:27017' })

lib/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
/**
4-
* @typedef {Object} PaddleIntegrationFirestore
4+
* @typedef {Object} PaddleIntegrationMongodb
55
* @property {import('./subscription-hook-storage.js')} SubscriptionHooks
66
* @property {import('./subscription-hydration.js')} SubscriptionHydration
77
* @property {import('./subscription-info.js')} SubscriptionInfo
@@ -13,7 +13,7 @@
1313
*/
1414

1515
/**
16-
* @type PaddleIntegrationFirestore
16+
* @type PaddleIntegrationMongodb
1717
*/
1818
const exp = {
1919
SubscriptionHooks: require('./subscription-hook-storage'),
@@ -34,7 +34,7 @@ function loadApi() {
3434
loadApi()
3535

3636
/**
37-
* @type PaddleIntegrationFirestore
37+
* @type PaddleIntegrationMongodb
3838
*/
3939
module.exports = new Proxy({}, {
4040
get: (_, key) => {

lib/subscription-hook-storage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ class Subscriptions {
104104
* passed to the constructor
105105
*
106106
* @example <caption>Subscriptions stored in a collection called api_clients</caption>
107-
* const { Subscriptions } = require('@discue/paddle-firebase-integration')
107+
* const { Subscriptions } = require('@discue/paddle-integration-mongodb')
108108
* const subscriptions = new Subscriptions('api_clients')
109109
* // assuming api_client with id 4815162342 exists we can simple play an array with one element
110110
* const { passthrough } = await subscriptions.addSubscriptionPlaceholder(['4815162342'])
111111
112112
* @example <caption>Subscriptions stored in a subcollection called external</caption>
113-
* const { Subscriptions } = require('@discue/paddle-firebase-integration')
113+
* const { Subscriptions } = require('@discue/paddle-integration-mongodb')
114114
*
115115
* const subscriptions = new Subscriptions('api_clients/external')
116116
* // as subscriptions are stored in a sub collection we need to pass the id of the parent and the child document

0 commit comments

Comments
 (0)