@sellout/models 0.0.428 → 0.0.429
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/interfaces/IDispute.d.ts +35 -0
- package/.dist/interfaces/IDispute.js +24 -0
- package/.dist/interfaces/IDispute.js.map +1 -0
- package/.dist/schemas/Dispute.d.ts +85 -0
- package/.dist/schemas/Dispute.js +91 -0
- package/.dist/schemas/Dispute.js.map +1 -0
- package/.dist/sellout-proto.js +1882 -0
- package/package.json +3 -3
- package/src/interfaces/IDispute.ts +45 -0
- package/src/proto/email.proto +20 -0
- package/src/proto/order.proto +30 -0
- package/src/proto/organization.proto +13 -1
- package/src/schemas/Dispute.ts +86 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare enum DisputeStatusEnum {
|
|
2
|
+
WarningNeedsResponse = "warning_needs_response",
|
|
3
|
+
WarningUnderReview = "warning_under_review",
|
|
4
|
+
WarningClosed = "warning_closed",
|
|
5
|
+
NeedsResponse = "needs_response",
|
|
6
|
+
UnderReview = "under_review",
|
|
7
|
+
Won = "won",
|
|
8
|
+
Lost = "lost",
|
|
9
|
+
Prevented = "prevented"
|
|
10
|
+
}
|
|
11
|
+
export declare const CLOSED_DISPUTE_STATUSES: string[];
|
|
12
|
+
export declare function isInquiryStatus(status: string): boolean;
|
|
13
|
+
export interface IDisputeEmailedAt {
|
|
14
|
+
created?: number;
|
|
15
|
+
closed?: number;
|
|
16
|
+
}
|
|
17
|
+
export default interface IDispute {
|
|
18
|
+
_id?: string;
|
|
19
|
+
stripeDisputeId: string;
|
|
20
|
+
stripeAccountId?: string;
|
|
21
|
+
stripeChargeId?: string;
|
|
22
|
+
paymentIntentId?: string;
|
|
23
|
+
orgId?: string;
|
|
24
|
+
orderId?: string;
|
|
25
|
+
amount?: number;
|
|
26
|
+
currency?: string;
|
|
27
|
+
reason?: string;
|
|
28
|
+
status?: string;
|
|
29
|
+
isInquiry?: boolean;
|
|
30
|
+
dueBy?: number;
|
|
31
|
+
emailedAt?: IDisputeEmailedAt;
|
|
32
|
+
processedEventIds?: string[];
|
|
33
|
+
createdAt?: number;
|
|
34
|
+
updatedAt?: number;
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInquiryStatus = exports.CLOSED_DISPUTE_STATUSES = exports.DisputeStatusEnum = void 0;
|
|
4
|
+
var DisputeStatusEnum;
|
|
5
|
+
(function (DisputeStatusEnum) {
|
|
6
|
+
DisputeStatusEnum["WarningNeedsResponse"] = "warning_needs_response";
|
|
7
|
+
DisputeStatusEnum["WarningUnderReview"] = "warning_under_review";
|
|
8
|
+
DisputeStatusEnum["WarningClosed"] = "warning_closed";
|
|
9
|
+
DisputeStatusEnum["NeedsResponse"] = "needs_response";
|
|
10
|
+
DisputeStatusEnum["UnderReview"] = "under_review";
|
|
11
|
+
DisputeStatusEnum["Won"] = "won";
|
|
12
|
+
DisputeStatusEnum["Lost"] = "lost";
|
|
13
|
+
DisputeStatusEnum["Prevented"] = "prevented";
|
|
14
|
+
})(DisputeStatusEnum = exports.DisputeStatusEnum || (exports.DisputeStatusEnum = {}));
|
|
15
|
+
exports.CLOSED_DISPUTE_STATUSES = [
|
|
16
|
+
DisputeStatusEnum.Won,
|
|
17
|
+
DisputeStatusEnum.Lost,
|
|
18
|
+
DisputeStatusEnum.WarningClosed,
|
|
19
|
+
];
|
|
20
|
+
function isInquiryStatus(status) {
|
|
21
|
+
return typeof status === 'string' && status.startsWith('warning_');
|
|
22
|
+
}
|
|
23
|
+
exports.isInquiryStatus = isInquiryStatus;
|
|
24
|
+
//# sourceMappingURL=IDispute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDispute.js","sourceRoot":"","sources":["../../src/interfaces/IDispute.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,qDAAgC,CAAA;IAChC,qDAAgC,CAAA;IAChC,iDAA4B,CAAA;IAC5B,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,4CAAuB,CAAA;AACzB,CAAC,EATW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAS5B;AAEY,QAAA,uBAAuB,GAAa;IAC/C,iBAAiB,CAAC,GAAG;IACrB,iBAAiB,CAAC,IAAI;IACtB,iBAAiB,CAAC,aAAa;CAChC,CAAC;AAEF,SAAgB,eAAe,CAAC,MAAc;IAC5C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACrE,CAAC;AAFD,0CAEC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
_id: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: () => string;
|
|
5
|
+
};
|
|
6
|
+
stripeDisputeId: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
stripeAccountId: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
required: boolean;
|
|
13
|
+
};
|
|
14
|
+
stripeChargeId: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: boolean;
|
|
17
|
+
index: boolean;
|
|
18
|
+
};
|
|
19
|
+
paymentIntentId: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
required: boolean;
|
|
22
|
+
};
|
|
23
|
+
orgId: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: boolean;
|
|
26
|
+
index: boolean;
|
|
27
|
+
};
|
|
28
|
+
orderId: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: boolean;
|
|
31
|
+
index: boolean;
|
|
32
|
+
};
|
|
33
|
+
amount: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
required: boolean;
|
|
36
|
+
};
|
|
37
|
+
currency: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
required: boolean;
|
|
40
|
+
};
|
|
41
|
+
reason: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
required: boolean;
|
|
44
|
+
};
|
|
45
|
+
status: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: boolean;
|
|
48
|
+
};
|
|
49
|
+
isInquiry: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
required: boolean;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
dueBy: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
required: boolean;
|
|
57
|
+
default: null;
|
|
58
|
+
};
|
|
59
|
+
emailedAt: {
|
|
60
|
+
created: {
|
|
61
|
+
type: NumberConstructor;
|
|
62
|
+
required: boolean;
|
|
63
|
+
default: null;
|
|
64
|
+
};
|
|
65
|
+
closed: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
required: boolean;
|
|
68
|
+
default: null;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
processedEventIds: {
|
|
72
|
+
type: StringConstructor[];
|
|
73
|
+
required: boolean;
|
|
74
|
+
default: never[];
|
|
75
|
+
};
|
|
76
|
+
createdAt: {
|
|
77
|
+
type: NumberConstructor;
|
|
78
|
+
required: boolean;
|
|
79
|
+
};
|
|
80
|
+
updatedAt: {
|
|
81
|
+
type: NumberConstructor;
|
|
82
|
+
required: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const shortid_1 = __importDefault(require("shortid"));
|
|
7
|
+
exports.default = {
|
|
8
|
+
_id: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: shortid_1.default.generate,
|
|
11
|
+
},
|
|
12
|
+
stripeDisputeId: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
stripeAccountId: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: false,
|
|
19
|
+
},
|
|
20
|
+
stripeChargeId: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: false,
|
|
23
|
+
index: true,
|
|
24
|
+
},
|
|
25
|
+
paymentIntentId: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
orgId: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false,
|
|
32
|
+
index: true,
|
|
33
|
+
},
|
|
34
|
+
orderId: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
index: true,
|
|
38
|
+
},
|
|
39
|
+
amount: {
|
|
40
|
+
type: Number,
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
currency: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false,
|
|
46
|
+
},
|
|
47
|
+
reason: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: false,
|
|
50
|
+
},
|
|
51
|
+
status: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: false,
|
|
54
|
+
},
|
|
55
|
+
isInquiry: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
required: false,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
dueBy: {
|
|
61
|
+
type: Number,
|
|
62
|
+
required: false,
|
|
63
|
+
default: null,
|
|
64
|
+
},
|
|
65
|
+
emailedAt: {
|
|
66
|
+
created: {
|
|
67
|
+
type: Number,
|
|
68
|
+
required: false,
|
|
69
|
+
default: null,
|
|
70
|
+
},
|
|
71
|
+
closed: {
|
|
72
|
+
type: Number,
|
|
73
|
+
required: false,
|
|
74
|
+
default: null,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
processedEventIds: {
|
|
78
|
+
type: [String],
|
|
79
|
+
required: false,
|
|
80
|
+
default: [],
|
|
81
|
+
},
|
|
82
|
+
createdAt: {
|
|
83
|
+
type: Number,
|
|
84
|
+
required: false,
|
|
85
|
+
},
|
|
86
|
+
updatedAt: {
|
|
87
|
+
type: Number,
|
|
88
|
+
required: false,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=Dispute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dispute.js","sourceRoot":"","sources":["../../src/schemas/Dispute.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B,kBAAe;IACb,GAAG,EAAE;QACH,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,iBAAO,CAAC,QAAQ;KAC1B;IACD,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,IAAI;KACZ;IACD,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,IAAI;KACZ;IACD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,IAAI;KACZ;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACf;IACD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACT,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,EAAE;KACZ;IACD,SAAS,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC"}
|