@veruna/api-contracts 6.13.0 → 6.16.0
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/build/controllers/fulfillment-admin.controllers.d.ts +1 -0
- package/build/controllers/fulfillment-admin.controllers.js +5 -0
- package/build/controllers/fulfillment-admin.controllers.js.map +1 -0
- package/build/controllers/index.d.ts +3 -0
- package/build/controllers/index.js +7 -1
- package/build/controllers/index.js.map +1 -1
- package/build/controllers/payment-admin.controllers.d.ts +1 -0
- package/build/controllers/payment-admin.controllers.js +5 -0
- package/build/controllers/payment-admin.controllers.js.map +1 -0
- package/build/controllers/payment-methods-admin.controllers.d.ts +1 -0
- package/build/controllers/payment-methods-admin.controllers.js +5 -0
- package/build/controllers/payment-methods-admin.controllers.js.map +1 -0
- package/build/rest-api.d.ts +14 -0
- package/build/rest-api.js +14 -0
- package/build/rest-api.js.map +1 -1
- package/build/routes/fulfillment-admin.routes.d.ts +3 -0
- package/build/routes/fulfillment-admin.routes.js +7 -0
- package/build/routes/fulfillment-admin.routes.js.map +1 -0
- package/build/routes/index.d.ts +3 -0
- package/build/routes/index.js +7 -1
- package/build/routes/index.js.map +1 -1
- package/build/routes/payment-admin.routes.d.ts +5 -0
- package/build/routes/payment-admin.routes.js +9 -0
- package/build/routes/payment-admin.routes.js.map +1 -0
- package/build/routes/payment-methods-admin.routes.d.ts +4 -0
- package/build/routes/payment-methods-admin.routes.js +8 -0
- package/build/routes/payment-methods-admin.routes.js.map +1 -0
- package/build/routes/subscription-admin.routes.d.ts +2 -0
- package/build/routes/subscription-admin.routes.js +2 -0
- package/build/routes/subscription-admin.routes.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/payment/admin/commands/admin-refund-order.command.d.ts +12 -0
- package/build/v1/payment/admin/commands/admin-refund-order.command.js +15 -0
- package/build/v1/payment/admin/commands/admin-refund-order.command.js.map +1 -0
- package/build/v1/payment/admin/commands/admin-revoke-saved-method.command.d.ts +12 -0
- package/build/v1/payment/admin/commands/admin-revoke-saved-method.command.js +15 -0
- package/build/v1/payment/admin/commands/admin-revoke-saved-method.command.js.map +1 -0
- package/build/v1/payment/admin/commands/index.d.ts +2 -0
- package/build/v1/payment/admin/commands/index.js +19 -0
- package/build/v1/payment/admin/commands/index.js.map +1 -0
- package/build/v1/payment/admin/index.d.ts +3 -0
- package/build/v1/payment/admin/index.js +20 -0
- package/build/v1/payment/admin/index.js.map +1 -0
- package/build/v1/payment/admin/queries/admin-get-order.query.d.ts +37 -0
- package/build/v1/payment/admin/queries/admin-get-order.query.js +15 -0
- package/build/v1/payment/admin/queries/admin-get-order.query.js.map +1 -0
- package/build/v1/payment/admin/queries/admin-list-orders.query.d.ts +43 -0
- package/build/v1/payment/admin/queries/admin-list-orders.query.js +14 -0
- package/build/v1/payment/admin/queries/admin-list-orders.query.js.map +1 -0
- package/build/v1/payment/admin/queries/admin-list-saved-methods.query.d.ts +21 -0
- package/build/v1/payment/admin/queries/admin-list-saved-methods.query.js +15 -0
- package/build/v1/payment/admin/queries/admin-list-saved-methods.query.js.map +1 -0
- package/build/v1/payment/admin/queries/index.d.ts +3 -0
- package/build/v1/payment/admin/queries/index.js +20 -0
- package/build/v1/payment/admin/queries/index.js.map +1 -0
- package/build/v1/payment/admin/schemas/admin-order.schema.d.ts +103 -0
- package/build/v1/payment/admin/schemas/admin-order.schema.js +52 -0
- package/build/v1/payment/admin/schemas/admin-order.schema.js.map +1 -0
- package/build/v1/payment/admin/schemas/admin-saved-method.schema.d.ts +18 -0
- package/build/v1/payment/admin/schemas/admin-saved-method.schema.js +12 -0
- package/build/v1/payment/admin/schemas/admin-saved-method.schema.js.map +1 -0
- package/build/v1/payment/admin/schemas/index.d.ts +2 -0
- package/build/v1/payment/admin/schemas/index.js +19 -0
- package/build/v1/payment/admin/schemas/index.js.map +1 -0
- package/build/v1/payment/index.d.ts +3 -2
- package/build/v1/payment/index.js +4 -1
- package/build/v1/payment/index.js.map +1 -1
- package/build/v1/payment/payment.errors.d.ts +2 -0
- package/build/v1/payment/payment.errors.js +10 -0
- package/build/v1/payment/payment.errors.js.map +1 -1
- package/build/v1/subscription/admin/commands/admin-cancel-autorenew.command.d.ts +13 -0
- package/build/v1/subscription/admin/commands/admin-cancel-autorenew.command.js +15 -0
- package/build/v1/subscription/admin/commands/admin-cancel-autorenew.command.js.map +1 -0
- package/build/v1/subscription/admin/commands/admin-expire-subscription.command.d.ts +13 -0
- package/build/v1/subscription/admin/commands/admin-expire-subscription.command.js +15 -0
- package/build/v1/subscription/admin/commands/admin-expire-subscription.command.js.map +1 -0
- package/build/v1/subscription/admin/commands/admin-retry-fulfillment.command.d.ts +12 -0
- package/build/v1/subscription/admin/commands/admin-retry-fulfillment.command.js +15 -0
- package/build/v1/subscription/admin/commands/admin-retry-fulfillment.command.js.map +1 -0
- package/build/v1/subscription/admin/commands/index.d.ts +3 -0
- package/build/v1/subscription/admin/commands/index.js +3 -0
- package/build/v1/subscription/admin/commands/index.js.map +1 -1
- package/build/v1/subscription/admin/schemas/admin-retry-fulfillment.schema.d.ts +5 -0
- package/build/v1/subscription/admin/schemas/admin-retry-fulfillment.schema.js +8 -0
- package/build/v1/subscription/admin/schemas/admin-retry-fulfillment.schema.js.map +1 -0
- package/build/v1/subscription/admin/schemas/admin-subscription-actions.schema.d.ts +12 -0
- package/build/v1/subscription/admin/schemas/admin-subscription-actions.schema.js +15 -0
- package/build/v1/subscription/admin/schemas/admin-subscription-actions.schema.js.map +1 -0
- package/build/v1/subscription/admin/schemas/index.d.ts +2 -0
- package/build/v1/subscription/admin/schemas/index.js +2 -0
- package/build/v1/subscription/admin/schemas/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace AdminRefundOrderCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
initiated: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const URL: (orderId: string) => string;
|
|
9
|
+
const METHOD = HttpMethod.POST;
|
|
10
|
+
type RequestType = z.infer<typeof Request>;
|
|
11
|
+
type ResponseType = z.infer<typeof Response>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminRefundOrderCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
7
|
+
const http_method_enum_1 = require("../../../../shared/http-method.enum");
|
|
8
|
+
var AdminRefundOrderCommand;
|
|
9
|
+
(function (AdminRefundOrderCommand) {
|
|
10
|
+
AdminRefundOrderCommand.Request = zod_1.z.object({});
|
|
11
|
+
AdminRefundOrderCommand.Response = schemas_1.AdminRefundOrderResponseSchema;
|
|
12
|
+
AdminRefundOrderCommand.URL = (orderId) => rest_api_1.REST_API.V1.PAYMENT.ADMIN.INITIATE_REFUND(orderId);
|
|
13
|
+
AdminRefundOrderCommand.METHOD = http_method_enum_1.HttpMethod.POST;
|
|
14
|
+
})(AdminRefundOrderCommand || (exports.AdminRefundOrderCommand = AdminRefundOrderCommand = {}));
|
|
15
|
+
//# sourceMappingURL=admin-refund-order.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-refund-order.command.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/commands/admin-refund-order.command.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA4D;AAC5D,mDAAgD;AAChD,0EAAiE;AAEjE,IAAiB,uBAAuB,CASvC;AATD,WAAiB,uBAAuB;IACvB,+BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,gCAAQ,GAAG,wCAA8B,CAAC;IAE1C,2BAAG,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC9E,8BAAM,GAAG,6BAAU,CAAC,IAAI,CAAC;AAI1C,CAAC,EATgB,uBAAuB,uCAAvB,uBAAuB,QASvC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace AdminRevokeSavedMethodCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
revoked: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const URL: (userId: string, methodId: string) => string;
|
|
9
|
+
const METHOD = HttpMethod.DELETE;
|
|
10
|
+
type RequestType = z.infer<typeof Request>;
|
|
11
|
+
type ResponseType = z.infer<typeof Response>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminRevokeSavedMethodCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
7
|
+
const http_method_enum_1 = require("../../../../shared/http-method.enum");
|
|
8
|
+
var AdminRevokeSavedMethodCommand;
|
|
9
|
+
(function (AdminRevokeSavedMethodCommand) {
|
|
10
|
+
AdminRevokeSavedMethodCommand.Request = zod_1.z.object({});
|
|
11
|
+
AdminRevokeSavedMethodCommand.Response = schemas_1.AdminRevokeSavedMethodResponseSchema;
|
|
12
|
+
AdminRevokeSavedMethodCommand.URL = (userId, methodId) => rest_api_1.REST_API.V1.PAYMENT.ADMIN.REVOKE_SAVED_METHOD(userId, methodId);
|
|
13
|
+
AdminRevokeSavedMethodCommand.METHOD = http_method_enum_1.HttpMethod.DELETE;
|
|
14
|
+
})(AdminRevokeSavedMethodCommand || (exports.AdminRevokeSavedMethodCommand = AdminRevokeSavedMethodCommand = {}));
|
|
15
|
+
//# sourceMappingURL=admin-revoke-saved-method.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-revoke-saved-method.command.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/commands/admin-revoke-saved-method.command.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAkE;AAClE,mDAAgD;AAChD,0EAAiE;AAEjE,IAAiB,6BAA6B,CAU7C;AAVD,WAAiB,6BAA6B;IAC7B,qCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,sCAAQ,GAAG,8CAAoC,CAAC;IAEhD,iCAAG,GAAG,CAAC,MAAc,EAAE,QAAgB,EAAE,EAAE,CACpD,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,oCAAM,GAAG,6BAAU,CAAC,MAAM,CAAC;AAI5C,CAAC,EAVgB,6BAA6B,6CAA7B,6BAA6B,QAU7C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./admin-refund-order.command"), exports);
|
|
18
|
+
__exportStar(require("./admin-revoke-saved-method.command"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,sEAAoD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./queries"), exports);
|
|
19
|
+
__exportStar(require("./commands"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/payment/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,6CAA2B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace AdminGetOrderQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
order: z.ZodObject<{
|
|
7
|
+
orderId: z.ZodString;
|
|
8
|
+
userId: z.ZodString;
|
|
9
|
+
kind: z.ZodEnum<typeof import("../..").OrderKind>;
|
|
10
|
+
status: z.ZodEnum<typeof import("../..").OrderStatus>;
|
|
11
|
+
amount: z.ZodString;
|
|
12
|
+
currency: z.ZodString;
|
|
13
|
+
description: z.ZodNullable<z.ZodString>;
|
|
14
|
+
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
15
|
+
planId: z.ZodNullable<z.ZodString>;
|
|
16
|
+
periodMonths: z.ZodNullable<z.ZodNumber>;
|
|
17
|
+
grantedBalance: z.ZodString;
|
|
18
|
+
expiresAt: z.ZodString;
|
|
19
|
+
fulfilledAt: z.ZodNullable<z.ZodString>;
|
|
20
|
+
createdAt: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
payments: z.ZodArray<z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
orderId: z.ZodString;
|
|
25
|
+
provider: z.ZodEnum<typeof import("../..").PaymentProvider>;
|
|
26
|
+
providerTransactionId: z.ZodNullable<z.ZodString>;
|
|
27
|
+
status: z.ZodEnum<typeof import("../..").PaymentStatus>;
|
|
28
|
+
amount: z.ZodString;
|
|
29
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
30
|
+
createdAt: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
const URL: (orderId: string) => string;
|
|
34
|
+
const METHOD = HttpMethod.GET;
|
|
35
|
+
type RequestType = z.infer<typeof Request>;
|
|
36
|
+
type ResponseType = z.infer<typeof Response>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminGetOrderQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
7
|
+
const http_method_enum_1 = require("../../../../shared/http-method.enum");
|
|
8
|
+
var AdminGetOrderQuery;
|
|
9
|
+
(function (AdminGetOrderQuery) {
|
|
10
|
+
AdminGetOrderQuery.Request = zod_1.z.object({});
|
|
11
|
+
AdminGetOrderQuery.Response = schemas_1.AdminOrderDetailResponseSchema;
|
|
12
|
+
AdminGetOrderQuery.URL = (orderId) => rest_api_1.REST_API.V1.PAYMENT.ADMIN.GET_BY_ID(orderId);
|
|
13
|
+
AdminGetOrderQuery.METHOD = http_method_enum_1.HttpMethod.GET;
|
|
14
|
+
})(AdminGetOrderQuery || (exports.AdminGetOrderQuery = AdminGetOrderQuery = {}));
|
|
15
|
+
//# sourceMappingURL=admin-get-order.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-order.query.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/queries/admin-get-order.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA4D;AAC5D,mDAAgD;AAChD,0EAAiE;AAEjE,IAAiB,kBAAkB,CASlC;AATD,WAAiB,kBAAkB;IAClB,0BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,2BAAQ,GAAG,wCAA8B,CAAC;IAE1C,sBAAG,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACxE,yBAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,kBAAkB,kCAAlB,kBAAkB,QASlC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace AdminListOrdersQuery {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
status: z.ZodOptional<z.ZodEnum<typeof import("../..").OrderStatus>>;
|
|
9
|
+
kind: z.ZodOptional<z.ZodEnum<typeof import("../..").OrderKind>>;
|
|
10
|
+
from: z.ZodOptional<z.ZodString>;
|
|
11
|
+
to: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
const Response: z.ZodObject<{
|
|
14
|
+
data: z.ZodArray<z.ZodObject<{
|
|
15
|
+
orderId: z.ZodString;
|
|
16
|
+
userId: z.ZodString;
|
|
17
|
+
kind: z.ZodEnum<typeof import("../..").OrderKind>;
|
|
18
|
+
status: z.ZodEnum<typeof import("../..").OrderStatus>;
|
|
19
|
+
amount: z.ZodString;
|
|
20
|
+
currency: z.ZodString;
|
|
21
|
+
description: z.ZodNullable<z.ZodString>;
|
|
22
|
+
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
23
|
+
planId: z.ZodNullable<z.ZodString>;
|
|
24
|
+
periodMonths: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
grantedBalance: z.ZodString;
|
|
26
|
+
expiresAt: z.ZodString;
|
|
27
|
+
fulfilledAt: z.ZodNullable<z.ZodString>;
|
|
28
|
+
createdAt: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
meta: z.ZodObject<{
|
|
31
|
+
page: z.ZodNumber;
|
|
32
|
+
limit: z.ZodNumber;
|
|
33
|
+
total: z.ZodNumber;
|
|
34
|
+
totalPages: z.ZodNumber;
|
|
35
|
+
hasNext: z.ZodBoolean;
|
|
36
|
+
hasPrev: z.ZodBoolean;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
const URL: "/api/v1/admin/orders";
|
|
40
|
+
const METHOD = HttpMethod.GET;
|
|
41
|
+
type RequestType = z.infer<typeof Request>;
|
|
42
|
+
type ResponseType = z.infer<typeof Response>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminListOrdersQuery = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
6
|
+
const http_method_enum_1 = require("../../../../shared/http-method.enum");
|
|
7
|
+
var AdminListOrdersQuery;
|
|
8
|
+
(function (AdminListOrdersQuery) {
|
|
9
|
+
AdminListOrdersQuery.Request = schemas_1.AdminListOrdersRequestSchema;
|
|
10
|
+
AdminListOrdersQuery.Response = schemas_1.AdminListOrdersResponseSchema;
|
|
11
|
+
AdminListOrdersQuery.URL = rest_api_1.REST_API.V1.PAYMENT.ADMIN.LIST;
|
|
12
|
+
AdminListOrdersQuery.METHOD = http_method_enum_1.HttpMethod.GET;
|
|
13
|
+
})(AdminListOrdersQuery || (exports.AdminListOrdersQuery = AdminListOrdersQuery = {}));
|
|
14
|
+
//# sourceMappingURL=admin-list-orders.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-list-orders.query.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/queries/admin-list-orders.query.ts"],"names":[],"mappings":";;;AACA,wCAAyF;AACzF,mDAAgD;AAChD,0EAAiE;AAEjE,IAAiB,oBAAoB,CASpC;AATD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,sCAA4B,CAAC;IACvC,6BAAQ,GAAG,uCAA6B,CAAC;IAEzC,wBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;IACrC,2BAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,oBAAoB,oCAApB,oBAAoB,QASpC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace AdminListSavedMethodsQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
cardMask: z.ZodString;
|
|
9
|
+
cardType: z.ZodNullable<z.ZodString>;
|
|
10
|
+
expMonth: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
expYear: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
status: z.ZodEnum<typeof import("../..").SavedMethodStatus>;
|
|
13
|
+
isDefault: z.ZodBoolean;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
const URL: (userId: string) => string;
|
|
18
|
+
const METHOD = HttpMethod.GET;
|
|
19
|
+
type RequestType = z.infer<typeof Request>;
|
|
20
|
+
type ResponseType = z.infer<typeof Response>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminListSavedMethodsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
7
|
+
const http_method_enum_1 = require("../../../../shared/http-method.enum");
|
|
8
|
+
var AdminListSavedMethodsQuery;
|
|
9
|
+
(function (AdminListSavedMethodsQuery) {
|
|
10
|
+
AdminListSavedMethodsQuery.Request = zod_1.z.object({});
|
|
11
|
+
AdminListSavedMethodsQuery.Response = schemas_1.AdminListSavedMethodsResponseSchema;
|
|
12
|
+
AdminListSavedMethodsQuery.URL = (userId) => rest_api_1.REST_API.V1.PAYMENT.ADMIN.SAVED_METHODS(userId);
|
|
13
|
+
AdminListSavedMethodsQuery.METHOD = http_method_enum_1.HttpMethod.GET;
|
|
14
|
+
})(AdminListSavedMethodsQuery || (exports.AdminListSavedMethodsQuery = AdminListSavedMethodsQuery = {}));
|
|
15
|
+
//# sourceMappingURL=admin-list-saved-methods.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-list-saved-methods.query.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/queries/admin-list-saved-methods.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAiE;AACjE,mDAAgD;AAChD,0EAAiE;AAEjE,IAAiB,0BAA0B,CAS1C;AATD,WAAiB,0BAA0B;IAC1B,kCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,mCAAQ,GAAG,6CAAmC,CAAC;IAE/C,8BAAG,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1E,iCAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,0BAA0B,0CAA1B,0BAA0B,QAS1C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./admin-list-orders.query"), exports);
|
|
18
|
+
__exportStar(require("./admin-get-order.query"), exports);
|
|
19
|
+
__exportStar(require("./admin-list-saved-methods.query"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/queries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,0DAAwC;AACxC,mEAAiD"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OrderStatus } from '../../schemas/order-status.enum';
|
|
3
|
+
import { OrderKind } from '../../schemas/order-kind.enum';
|
|
4
|
+
import { PaymentStatus } from '../../schemas/payment-status.enum';
|
|
5
|
+
import { PaymentProvider } from '../../schemas/payment-provider.enum';
|
|
6
|
+
export declare const AdminOrderItemSchema: z.ZodObject<{
|
|
7
|
+
orderId: z.ZodString;
|
|
8
|
+
userId: z.ZodString;
|
|
9
|
+
kind: z.ZodEnum<typeof OrderKind>;
|
|
10
|
+
status: z.ZodEnum<typeof OrderStatus>;
|
|
11
|
+
amount: z.ZodString;
|
|
12
|
+
currency: z.ZodString;
|
|
13
|
+
description: z.ZodNullable<z.ZodString>;
|
|
14
|
+
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
15
|
+
planId: z.ZodNullable<z.ZodString>;
|
|
16
|
+
periodMonths: z.ZodNullable<z.ZodNumber>;
|
|
17
|
+
grantedBalance: z.ZodString;
|
|
18
|
+
expiresAt: z.ZodString;
|
|
19
|
+
fulfilledAt: z.ZodNullable<z.ZodString>;
|
|
20
|
+
createdAt: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type AdminOrderItem = z.infer<typeof AdminOrderItemSchema>;
|
|
23
|
+
export declare const AdminPaymentAttemptSchema: z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
orderId: z.ZodString;
|
|
26
|
+
provider: z.ZodEnum<typeof PaymentProvider>;
|
|
27
|
+
providerTransactionId: z.ZodNullable<z.ZodString>;
|
|
28
|
+
status: z.ZodEnum<typeof PaymentStatus>;
|
|
29
|
+
amount: z.ZodString;
|
|
30
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
31
|
+
createdAt: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type AdminPaymentAttempt = z.infer<typeof AdminPaymentAttemptSchema>;
|
|
34
|
+
export declare const AdminListOrdersRequestSchema: z.ZodObject<{
|
|
35
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
36
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
37
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
38
|
+
status: z.ZodOptional<z.ZodEnum<typeof OrderStatus>>;
|
|
39
|
+
kind: z.ZodOptional<z.ZodEnum<typeof OrderKind>>;
|
|
40
|
+
from: z.ZodOptional<z.ZodString>;
|
|
41
|
+
to: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type AdminListOrdersRequest = z.infer<typeof AdminListOrdersRequestSchema>;
|
|
44
|
+
export declare const AdminListOrdersResponseSchema: z.ZodObject<{
|
|
45
|
+
data: z.ZodArray<z.ZodObject<{
|
|
46
|
+
orderId: z.ZodString;
|
|
47
|
+
userId: z.ZodString;
|
|
48
|
+
kind: z.ZodEnum<typeof OrderKind>;
|
|
49
|
+
status: z.ZodEnum<typeof OrderStatus>;
|
|
50
|
+
amount: z.ZodString;
|
|
51
|
+
currency: z.ZodString;
|
|
52
|
+
description: z.ZodNullable<z.ZodString>;
|
|
53
|
+
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
planId: z.ZodNullable<z.ZodString>;
|
|
55
|
+
periodMonths: z.ZodNullable<z.ZodNumber>;
|
|
56
|
+
grantedBalance: z.ZodString;
|
|
57
|
+
expiresAt: z.ZodString;
|
|
58
|
+
fulfilledAt: z.ZodNullable<z.ZodString>;
|
|
59
|
+
createdAt: z.ZodString;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
meta: z.ZodObject<{
|
|
62
|
+
page: z.ZodNumber;
|
|
63
|
+
limit: z.ZodNumber;
|
|
64
|
+
total: z.ZodNumber;
|
|
65
|
+
totalPages: z.ZodNumber;
|
|
66
|
+
hasNext: z.ZodBoolean;
|
|
67
|
+
hasPrev: z.ZodBoolean;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type AdminListOrdersResponse = z.infer<typeof AdminListOrdersResponseSchema>;
|
|
71
|
+
export declare const AdminOrderDetailResponseSchema: z.ZodObject<{
|
|
72
|
+
order: z.ZodObject<{
|
|
73
|
+
orderId: z.ZodString;
|
|
74
|
+
userId: z.ZodString;
|
|
75
|
+
kind: z.ZodEnum<typeof OrderKind>;
|
|
76
|
+
status: z.ZodEnum<typeof OrderStatus>;
|
|
77
|
+
amount: z.ZodString;
|
|
78
|
+
currency: z.ZodString;
|
|
79
|
+
description: z.ZodNullable<z.ZodString>;
|
|
80
|
+
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
81
|
+
planId: z.ZodNullable<z.ZodString>;
|
|
82
|
+
periodMonths: z.ZodNullable<z.ZodNumber>;
|
|
83
|
+
grantedBalance: z.ZodString;
|
|
84
|
+
expiresAt: z.ZodString;
|
|
85
|
+
fulfilledAt: z.ZodNullable<z.ZodString>;
|
|
86
|
+
createdAt: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
payments: z.ZodArray<z.ZodObject<{
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
orderId: z.ZodString;
|
|
91
|
+
provider: z.ZodEnum<typeof PaymentProvider>;
|
|
92
|
+
providerTransactionId: z.ZodNullable<z.ZodString>;
|
|
93
|
+
status: z.ZodEnum<typeof PaymentStatus>;
|
|
94
|
+
amount: z.ZodString;
|
|
95
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
96
|
+
createdAt: z.ZodString;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export type AdminOrderDetailResponse = z.infer<typeof AdminOrderDetailResponseSchema>;
|
|
100
|
+
export declare const AdminRefundOrderResponseSchema: z.ZodObject<{
|
|
101
|
+
initiated: z.ZodBoolean;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type AdminRefundOrderResponse = z.infer<typeof AdminRefundOrderResponseSchema>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminRefundOrderResponseSchema = exports.AdminOrderDetailResponseSchema = exports.AdminListOrdersResponseSchema = exports.AdminListOrdersRequestSchema = exports.AdminPaymentAttemptSchema = exports.AdminOrderItemSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../../shared");
|
|
6
|
+
const pagination_schema_1 = require("../../../../shared/pagination.schema");
|
|
7
|
+
const order_status_enum_1 = require("../../schemas/order-status.enum");
|
|
8
|
+
const order_kind_enum_1 = require("../../schemas/order-kind.enum");
|
|
9
|
+
const payment_status_enum_1 = require("../../schemas/payment-status.enum");
|
|
10
|
+
const payment_provider_enum_1 = require("../../schemas/payment-provider.enum");
|
|
11
|
+
exports.AdminOrderItemSchema = zod_1.z.object({
|
|
12
|
+
orderId: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
13
|
+
userId: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
14
|
+
kind: zod_1.z.nativeEnum(order_kind_enum_1.OrderKind),
|
|
15
|
+
status: zod_1.z.nativeEnum(order_status_enum_1.OrderStatus),
|
|
16
|
+
amount: zod_1.z.string(),
|
|
17
|
+
currency: zod_1.z.string(),
|
|
18
|
+
description: zod_1.z.string().nullable(),
|
|
19
|
+
subscriptionId: zod_1.z.string().nullable(),
|
|
20
|
+
planId: zod_1.z.string().nullable(),
|
|
21
|
+
periodMonths: zod_1.z.number().int().positive().nullable(),
|
|
22
|
+
grantedBalance: zod_1.z.string(),
|
|
23
|
+
expiresAt: zod_1.z.string().datetime({ offset: true }),
|
|
24
|
+
fulfilledAt: zod_1.z.string().datetime({ offset: true }).nullable(),
|
|
25
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
26
|
+
});
|
|
27
|
+
exports.AdminPaymentAttemptSchema = zod_1.z.object({
|
|
28
|
+
id: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
29
|
+
orderId: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
30
|
+
provider: zod_1.z.nativeEnum(payment_provider_enum_1.PaymentProvider),
|
|
31
|
+
providerTransactionId: zod_1.z.string().nullable(),
|
|
32
|
+
status: zod_1.z.nativeEnum(payment_status_enum_1.PaymentStatus),
|
|
33
|
+
amount: zod_1.z.string(),
|
|
34
|
+
reason: zod_1.z.string().nullable(),
|
|
35
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
36
|
+
});
|
|
37
|
+
exports.AdminListOrdersRequestSchema = pagination_schema_1.PaginationQuerySchema.extend({
|
|
38
|
+
userId: zod_1.z.string().regex(shared_1.UUID_REGEX, { message: 'AdminListOrdersRequest.userId.invalid' }).optional(),
|
|
39
|
+
status: zod_1.z.nativeEnum(order_status_enum_1.OrderStatus).optional(),
|
|
40
|
+
kind: zod_1.z.nativeEnum(order_kind_enum_1.OrderKind).optional(),
|
|
41
|
+
from: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
42
|
+
to: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
43
|
+
});
|
|
44
|
+
exports.AdminListOrdersResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.AdminOrderItemSchema);
|
|
45
|
+
exports.AdminOrderDetailResponseSchema = zod_1.z.object({
|
|
46
|
+
order: exports.AdminOrderItemSchema,
|
|
47
|
+
payments: zod_1.z.array(exports.AdminPaymentAttemptSchema),
|
|
48
|
+
});
|
|
49
|
+
exports.AdminRefundOrderResponseSchema = zod_1.z.object({
|
|
50
|
+
initiated: zod_1.z.boolean(),
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=admin-order.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-order.schema.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/schemas/admin-order.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AdminListSavedMethodsResponseSchema: z.ZodObject<{
|
|
3
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
cardMask: z.ZodString;
|
|
6
|
+
cardType: z.ZodNullable<z.ZodString>;
|
|
7
|
+
expMonth: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
expYear: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
status: z.ZodEnum<typeof import("../..").SavedMethodStatus>;
|
|
10
|
+
isDefault: z.ZodBoolean;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type AdminListSavedMethodsResponse = z.infer<typeof AdminListSavedMethodsResponseSchema>;
|
|
15
|
+
export declare const AdminRevokeSavedMethodResponseSchema: z.ZodObject<{
|
|
16
|
+
revoked: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type AdminRevokeSavedMethodResponse = z.infer<typeof AdminRevokeSavedMethodResponseSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminRevokeSavedMethodResponseSchema = exports.AdminListSavedMethodsResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const get_saved_methods_query_1 = require("../../queries/get-saved-methods.query");
|
|
6
|
+
exports.AdminListSavedMethodsResponseSchema = zod_1.z.object({
|
|
7
|
+
methods: zod_1.z.array(get_saved_methods_query_1.SavedPaymentMethodViewSchema),
|
|
8
|
+
});
|
|
9
|
+
exports.AdminRevokeSavedMethodResponseSchema = zod_1.z.object({
|
|
10
|
+
revoked: zod_1.z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=admin-saved-method.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-saved-method.schema.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/schemas/admin-saved-method.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mFAAqF;AAGxE,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,sDAA4B,CAAC;CACjD,CAAC,CAAC;AAIU,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IACzD,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./admin-order.schema"), exports);
|
|
18
|
+
__exportStar(require("./admin-saved-method.schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../v1/payment/admin/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,8DAA4C"}
|
|
@@ -2,5 +2,6 @@ export * from './schemas';
|
|
|
2
2
|
export * from './payment.errors';
|
|
3
3
|
export * from './commands';
|
|
4
4
|
export * from './queries';
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
5
|
+
export * from './admin';
|
|
6
|
+
export { PAYMENT_CONTROLLER, PAYMENT_WEBHOOKS_CONTROLLER, PAYMENT_ADMIN_CONTROLLER } from '../../controllers';
|
|
7
|
+
export { PAYMENT_ROUTES, PAYMENT_WEBHOOKS_ROUTES, PAYMENT_ADMIN_ROUTES } from '../../routes';
|
|
@@ -14,15 +14,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.PAYMENT_WEBHOOKS_ROUTES = exports.PAYMENT_ROUTES = exports.PAYMENT_WEBHOOKS_CONTROLLER = exports.PAYMENT_CONTROLLER = void 0;
|
|
17
|
+
exports.PAYMENT_ADMIN_ROUTES = exports.PAYMENT_WEBHOOKS_ROUTES = exports.PAYMENT_ROUTES = exports.PAYMENT_ADMIN_CONTROLLER = exports.PAYMENT_WEBHOOKS_CONTROLLER = exports.PAYMENT_CONTROLLER = void 0;
|
|
18
18
|
__exportStar(require("./schemas"), exports);
|
|
19
19
|
__exportStar(require("./payment.errors"), exports);
|
|
20
20
|
__exportStar(require("./commands"), exports);
|
|
21
21
|
__exportStar(require("./queries"), exports);
|
|
22
|
+
__exportStar(require("./admin"), exports);
|
|
22
23
|
var controllers_1 = require("../../controllers");
|
|
23
24
|
Object.defineProperty(exports, "PAYMENT_CONTROLLER", { enumerable: true, get: function () { return controllers_1.PAYMENT_CONTROLLER; } });
|
|
24
25
|
Object.defineProperty(exports, "PAYMENT_WEBHOOKS_CONTROLLER", { enumerable: true, get: function () { return controllers_1.PAYMENT_WEBHOOKS_CONTROLLER; } });
|
|
26
|
+
Object.defineProperty(exports, "PAYMENT_ADMIN_CONTROLLER", { enumerable: true, get: function () { return controllers_1.PAYMENT_ADMIN_CONTROLLER; } });
|
|
25
27
|
var routes_1 = require("../../routes");
|
|
26
28
|
Object.defineProperty(exports, "PAYMENT_ROUTES", { enumerable: true, get: function () { return routes_1.PAYMENT_ROUTES; } });
|
|
27
29
|
Object.defineProperty(exports, "PAYMENT_WEBHOOKS_ROUTES", { enumerable: true, get: function () { return routes_1.PAYMENT_WEBHOOKS_ROUTES; } });
|
|
30
|
+
Object.defineProperty(exports, "PAYMENT_ADMIN_ROUTES", { enumerable: true, get: function () { return routes_1.PAYMENT_ADMIN_ROUTES; } });
|
|
28
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../v1/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../v1/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AAExB,iDAA8G;AAArG,iHAAA,kBAAkB,OAAA;AAAE,0HAAA,2BAA2B,OAAA;AAAE,uHAAA,wBAAwB,OAAA;AAClF,uCAA6F;AAApF,wGAAA,cAAc,OAAA;AAAE,iHAAA,uBAAuB,OAAA;AAAE,8GAAA,oBAAoB,OAAA"}
|
|
@@ -8,6 +8,8 @@ export declare enum PaymentErrorCode {
|
|
|
8
8
|
CHARGE_DECLINED = "CHARGE_DECLINED",
|
|
9
9
|
ORDER_EXPIRED = "ORDER_EXPIRED",
|
|
10
10
|
ORDER_NOT_CANCELLABLE = "ORDER_NOT_CANCELLABLE",
|
|
11
|
+
ORDER_NOT_REFUNDABLE = "ORDER_NOT_REFUNDABLE",
|
|
12
|
+
REFUND_FAILED = "REFUND_FAILED",
|
|
11
13
|
PAYMENT_PROVIDER_UNSUPPORTED = "PAYMENT_PROVIDER_UNSUPPORTED",
|
|
12
14
|
ORDER_ACCEPTANCE_FAILED = "ORDER_ACCEPTANCE_FAILED",
|
|
13
15
|
SUBSCRIPTION_NOT_FOUND_FOR_REVOCATION = "SUBSCRIPTION_NOT_FOUND_FOR_REVOCATION",
|
|
@@ -11,6 +11,8 @@ var PaymentErrorCode;
|
|
|
11
11
|
PaymentErrorCode["CHARGE_DECLINED"] = "CHARGE_DECLINED";
|
|
12
12
|
PaymentErrorCode["ORDER_EXPIRED"] = "ORDER_EXPIRED";
|
|
13
13
|
PaymentErrorCode["ORDER_NOT_CANCELLABLE"] = "ORDER_NOT_CANCELLABLE";
|
|
14
|
+
PaymentErrorCode["ORDER_NOT_REFUNDABLE"] = "ORDER_NOT_REFUNDABLE";
|
|
15
|
+
PaymentErrorCode["REFUND_FAILED"] = "REFUND_FAILED";
|
|
14
16
|
PaymentErrorCode["PAYMENT_PROVIDER_UNSUPPORTED"] = "PAYMENT_PROVIDER_UNSUPPORTED";
|
|
15
17
|
PaymentErrorCode["ORDER_ACCEPTANCE_FAILED"] = "ORDER_ACCEPTANCE_FAILED";
|
|
16
18
|
PaymentErrorCode["SUBSCRIPTION_NOT_FOUND_FOR_REVOCATION"] = "SUBSCRIPTION_NOT_FOUND_FOR_REVOCATION";
|
|
@@ -50,6 +52,14 @@ exports.PAYMENT_ERRORS = {
|
|
|
50
52
|
code: PaymentErrorCode.ORDER_NOT_CANCELLABLE,
|
|
51
53
|
statusCode: 409,
|
|
52
54
|
},
|
|
55
|
+
[PaymentErrorCode.ORDER_NOT_REFUNDABLE]: {
|
|
56
|
+
code: PaymentErrorCode.ORDER_NOT_REFUNDABLE,
|
|
57
|
+
statusCode: 409,
|
|
58
|
+
},
|
|
59
|
+
[PaymentErrorCode.REFUND_FAILED]: {
|
|
60
|
+
code: PaymentErrorCode.REFUND_FAILED,
|
|
61
|
+
statusCode: 502,
|
|
62
|
+
},
|
|
53
63
|
[PaymentErrorCode.PAYMENT_PROVIDER_UNSUPPORTED]: {
|
|
54
64
|
code: PaymentErrorCode.PAYMENT_PROVIDER_UNSUPPORTED,
|
|
55
65
|
statusCode: 500,
|