@shaxpir/duiduidui-models 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/models/Billing.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface BillingBody extends ContentBody {
|
|
|
10
10
|
}
|
|
11
11
|
export declare class Billing extends Content {
|
|
12
12
|
static makeBillingId(userId: ContentId): ContentId;
|
|
13
|
-
static create(userId: ContentId): Billing;
|
|
13
|
+
static create(userId: ContentId, payload: BillingPayload): Billing;
|
|
14
14
|
constructor(doc: Doc, shouldAcquire: boolean, shareSync: ShareSync);
|
|
15
15
|
get payload(): BillingPayload;
|
|
16
16
|
}
|
package/dist/models/Billing.js
CHANGED
|
@@ -9,7 +9,7 @@ class Billing extends Content_1.Content {
|
|
|
9
9
|
static makeBillingId(userId) {
|
|
10
10
|
return shaxpir_common_1.CachingHasher.makeMd5Base62Hash(userId + "-" + ContentKind_1.ContentKind.BILLING);
|
|
11
11
|
}
|
|
12
|
-
static create(userId) {
|
|
12
|
+
static create(userId, payload) {
|
|
13
13
|
const now = shaxpir_common_1.MultiClock.now();
|
|
14
14
|
const billingId = Billing.makeBillingId(userId);
|
|
15
15
|
return repo_1.ShareSyncFactory.get().createContent({
|
|
@@ -21,9 +21,7 @@ class Billing extends Content_1.Content {
|
|
|
21
21
|
created_at: now,
|
|
22
22
|
updated_at: now
|
|
23
23
|
},
|
|
24
|
-
payload
|
|
25
|
-
stripe_customer_id: null // Initially null, set when the user subscribes
|
|
26
|
-
}
|
|
24
|
+
payload
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
27
|
constructor(doc, shouldAcquire, shareSync) {
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
__exportStar(require("./ArrayView"), exports);
|
|
19
19
|
__exportStar(require("./BayesianScore"), exports);
|
|
20
|
+
__exportStar(require("./Billing"), exports);
|
|
20
21
|
__exportStar(require("./ChangeModel"), exports);
|
|
21
22
|
__exportStar(require("./Content"), exports);
|
|
22
23
|
__exportStar(require("./ContentKind"), exports);
|