opticedge-types 1.0.2 → 1.0.4
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/enums/rc.d.ts +15 -0
- package/dist/enums/rc.js +20 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/types/rc.d.ts +24 -0
- package/dist/types/rc.js +2 -0
- package/package.json +1 -1
- package/src/enums/rc.ts +16 -0
- package/src/index.ts +2 -0
- package/src/types/rc.ts +29 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum BillingIssueStatus {
|
|
2
|
+
OPEN = "open",
|
|
3
|
+
EXPIRED = "expired"
|
|
4
|
+
}
|
|
5
|
+
export declare enum BillingIssueActionType {
|
|
6
|
+
FLAGGED = "flagged",
|
|
7
|
+
SLACK_NOTIFIED = "slack_notified",// ops Slack alert sent
|
|
8
|
+
NOTIFY_INITIAL = "notify_initial",// initial immediate notify (push+email)
|
|
9
|
+
NOTIFY_WEEK = "notify_week",// 7-day reminder
|
|
10
|
+
NOTIFY_DAY = "notify_day",// 1-day reminder
|
|
11
|
+
NOTIFY_FINAL = "notify_final",// final post-expiration message
|
|
12
|
+
GRACE_EXPIRED = "grace_expired",// grace period finalized
|
|
13
|
+
REVOKE_SKIPPED = "revoke_skipped",// server revoke intentionally skipped (or revoke.performed if later implemented)
|
|
14
|
+
SLACK_FINAL = "slack_final"
|
|
15
|
+
}
|
package/dist/enums/rc.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingIssueActionType = exports.BillingIssueStatus = void 0;
|
|
4
|
+
var BillingIssueStatus;
|
|
5
|
+
(function (BillingIssueStatus) {
|
|
6
|
+
BillingIssueStatus["OPEN"] = "open";
|
|
7
|
+
BillingIssueStatus["EXPIRED"] = "expired";
|
|
8
|
+
})(BillingIssueStatus || (exports.BillingIssueStatus = BillingIssueStatus = {}));
|
|
9
|
+
var BillingIssueActionType;
|
|
10
|
+
(function (BillingIssueActionType) {
|
|
11
|
+
BillingIssueActionType["FLAGGED"] = "flagged";
|
|
12
|
+
BillingIssueActionType["SLACK_NOTIFIED"] = "slack_notified";
|
|
13
|
+
BillingIssueActionType["NOTIFY_INITIAL"] = "notify_initial";
|
|
14
|
+
BillingIssueActionType["NOTIFY_WEEK"] = "notify_week";
|
|
15
|
+
BillingIssueActionType["NOTIFY_DAY"] = "notify_day";
|
|
16
|
+
BillingIssueActionType["NOTIFY_FINAL"] = "notify_final";
|
|
17
|
+
BillingIssueActionType["GRACE_EXPIRED"] = "grace_expired";
|
|
18
|
+
BillingIssueActionType["REVOKE_SKIPPED"] = "revoke_skipped";
|
|
19
|
+
BillingIssueActionType["SLACK_FINAL"] = "slack_final";
|
|
20
|
+
})(BillingIssueActionType || (exports.BillingIssueActionType = BillingIssueActionType = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './constants/payment';
|
|
2
2
|
export * from './enums/card';
|
|
3
|
+
export * from './enums/rc';
|
|
3
4
|
export * from './enums/user';
|
|
4
5
|
export * from './types/card';
|
|
5
6
|
export * from './types/notify';
|
|
6
7
|
export * from './types/payment';
|
|
7
8
|
export * from './types/pokemontcg';
|
|
8
9
|
export * from './types/pricecharting';
|
|
10
|
+
export * from './types/rc';
|
|
9
11
|
export * from './types/user';
|
package/dist/index.js
CHANGED
|
@@ -16,10 +16,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants/payment"), exports);
|
|
18
18
|
__exportStar(require("./enums/card"), exports);
|
|
19
|
+
__exportStar(require("./enums/rc"), exports);
|
|
19
20
|
__exportStar(require("./enums/user"), exports);
|
|
20
21
|
__exportStar(require("./types/card"), exports);
|
|
21
22
|
__exportStar(require("./types/notify"), exports);
|
|
22
23
|
__exportStar(require("./types/payment"), exports);
|
|
23
24
|
__exportStar(require("./types/pokemontcg"), exports);
|
|
24
25
|
__exportStar(require("./types/pricecharting"), exports);
|
|
26
|
+
__exportStar(require("./types/rc"), exports);
|
|
25
27
|
__exportStar(require("./types/user"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BillingIssueActionType, BillingIssueStatus } from '../enums/rc';
|
|
2
|
+
export type RCWebhookEventRawPayload = any;
|
|
3
|
+
export type BillingIssueAction = {
|
|
4
|
+
type: BillingIssueActionType;
|
|
5
|
+
at: Date;
|
|
6
|
+
meta?: any;
|
|
7
|
+
};
|
|
8
|
+
export interface BillingIssue {
|
|
9
|
+
webhook_event_id: string;
|
|
10
|
+
app_user_id: string;
|
|
11
|
+
product_id: string;
|
|
12
|
+
transaction_id: string;
|
|
13
|
+
first_seen_at: Date;
|
|
14
|
+
grace_period_expires_at: Date | null;
|
|
15
|
+
status: BillingIssueStatus;
|
|
16
|
+
actions_taken: BillingIssueAction[];
|
|
17
|
+
notified_slack: boolean;
|
|
18
|
+
raw: RCWebhookEventRawPayload;
|
|
19
|
+
grace_initial_sent: Date | null;
|
|
20
|
+
grace_week_sent: Date | null;
|
|
21
|
+
grace_day_sent: Date | null;
|
|
22
|
+
created_at: Date;
|
|
23
|
+
updated_at: Date;
|
|
24
|
+
}
|
package/dist/types/rc.js
ADDED
package/package.json
CHANGED
package/src/enums/rc.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export enum BillingIssueStatus {
|
|
2
|
+
OPEN = 'open',
|
|
3
|
+
EXPIRED = 'expired'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum BillingIssueActionType {
|
|
7
|
+
FLAGGED = 'flagged',
|
|
8
|
+
SLACK_NOTIFIED = 'slack_notified', // ops Slack alert sent
|
|
9
|
+
NOTIFY_INITIAL = 'notify_initial', // initial immediate notify (push+email)
|
|
10
|
+
NOTIFY_WEEK = 'notify_week', // 7-day reminder
|
|
11
|
+
NOTIFY_DAY = 'notify_day', // 1-day reminder
|
|
12
|
+
NOTIFY_FINAL = 'notify_final', // final post-expiration message
|
|
13
|
+
GRACE_EXPIRED = 'grace_expired', // grace period finalized
|
|
14
|
+
REVOKE_SKIPPED = 'revoke_skipped', // server revoke intentionally skipped (or revoke.performed if later implemented)
|
|
15
|
+
SLACK_FINAL = 'slack_final'
|
|
16
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './constants/payment'
|
|
2
2
|
export * from './enums/card'
|
|
3
|
+
export * from './enums/rc'
|
|
3
4
|
export * from './enums/user'
|
|
4
5
|
export * from './types/card'
|
|
5
6
|
export * from './types/notify'
|
|
6
7
|
export * from './types/payment'
|
|
7
8
|
export * from './types/pokemontcg'
|
|
8
9
|
export * from './types/pricecharting'
|
|
10
|
+
export * from './types/rc'
|
|
9
11
|
export * from './types/user'
|
package/src/types/rc.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BillingIssueActionType, BillingIssueStatus } from '../enums/rc'
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
export type RCWebhookEventRawPayload = any
|
|
5
|
+
|
|
6
|
+
export type BillingIssueAction = {
|
|
7
|
+
type: BillingIssueActionType
|
|
8
|
+
at: Date
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
meta?: any
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface BillingIssue {
|
|
14
|
+
webhook_event_id: string
|
|
15
|
+
app_user_id: string
|
|
16
|
+
product_id: string
|
|
17
|
+
transaction_id: string
|
|
18
|
+
first_seen_at: Date
|
|
19
|
+
grace_period_expires_at: Date | null
|
|
20
|
+
status: BillingIssueStatus
|
|
21
|
+
actions_taken: BillingIssueAction[]
|
|
22
|
+
notified_slack: boolean
|
|
23
|
+
raw: RCWebhookEventRawPayload
|
|
24
|
+
grace_initial_sent: Date | null
|
|
25
|
+
grace_week_sent: Date | null
|
|
26
|
+
grace_day_sent: Date | null
|
|
27
|
+
created_at: Date
|
|
28
|
+
updated_at: Date
|
|
29
|
+
}
|