@mercurjs/commission 1.3.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/.medusa/server/src/admin/index.js +20 -0
- package/.medusa/server/src/admin/index.mjs +21 -0
- package/.medusa/server/src/api/admin/commission/commission-lines/route.d.ts +75 -0
- package/.medusa/server/src/api/admin/commission/commission-lines/route.js +95 -0
- package/.medusa/server/src/api/admin/commission/default/route.d.ts +53 -0
- package/.medusa/server/src/api/admin/commission/default/route.js +103 -0
- package/.medusa/server/src/api/admin/commission/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/commission/middlewares.js +44 -0
- package/.medusa/server/src/api/admin/commission/query-config.d.ts +21 -0
- package/.medusa/server/src/api/admin/commission/query-config.js +35 -0
- package/.medusa/server/src/api/admin/commission/rules/[id]/route.d.ts +104 -0
- package/.medusa/server/src/api/admin/commission/rules/[id]/route.js +149 -0
- package/.medusa/server/src/api/admin/commission/rules/route.d.ts +78 -0
- package/.medusa/server/src/api/admin/commission/rules/route.js +114 -0
- package/.medusa/server/src/api/admin/commission/search/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/commission/search/route.js +25 -0
- package/.medusa/server/src/api/admin/commission/validators.d.ts +456 -0
- package/.medusa/server/src/api/admin/commission/validators.js +108 -0
- package/.medusa/server/src/api/admin/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/middlewares.js +6 -0
- package/.medusa/server/src/api/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/middlewares.js +9 -0
- package/.medusa/server/src/api/vendor/commission/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/commission/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/commission/query-config.d.ts +10 -0
- package/.medusa/server/src/api/vendor/commission/query-config.js +14 -0
- package/.medusa/server/src/api/vendor/commission/route.d.ts +84 -0
- package/.medusa/server/src/api/vendor/commission/route.js +111 -0
- package/.medusa/server/src/api/vendor/commission/validators.d.ts +27 -0
- package/.medusa/server/src/api/vendor/commission/validators.js +13 -0
- package/.medusa/server/src/api/vendor/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/middlewares.js +10 -0
- package/.medusa/server/src/api/vendor/orders/[id]/commission/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/commission/route.js +15 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.js +17 -0
- package/.medusa/server/src/modules/commission/index.d.ts +50 -0
- package/.medusa/server/src/modules/commission/index.js +14 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20250124152358.d.ts +5 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20250124152358.js +25 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20250127073504.d.ts +5 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20250127073504.js +28 -0
- package/.medusa/server/src/modules/commission/models/commission_line.d.ts +7 -0
- package/.medusa/server/src/modules/commission/models/commission_line.js +12 -0
- package/.medusa/server/src/modules/commission/models/commission_rate.d.ts +24 -0
- package/.medusa/server/src/modules/commission/models/commission_rate.js +20 -0
- package/.medusa/server/src/modules/commission/models/commission_rule.d.ts +17 -0
- package/.medusa/server/src/modules/commission/models/commission_rule.js +16 -0
- package/.medusa/server/src/modules/commission/models/index.d.ts +3 -0
- package/.medusa/server/src/modules/commission/models/index.js +20 -0
- package/.medusa/server/src/modules/commission/service.d.ts +61 -0
- package/.medusa/server/src/modules/commission/service.js +45 -0
- package/.medusa/server/src/subscribers/commission-order-set-placed.d.ts +5 -0
- package/.medusa/server/src/subscribers/commission-order-set-placed.js +44 -0
- package/.medusa/server/src/workflows/commission/index.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/index.js +19 -0
- package/.medusa/server/src/workflows/commission/steps/calculate-commission-lines.d.ts +7 -0
- package/.medusa/server/src/workflows/commission/steps/calculate-commission-lines.js +81 -0
- package/.medusa/server/src/workflows/commission/steps/check-for-duplicate.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/check-for-duplicate.js +19 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-lines.d.ts +22 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-lines.js +12 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rule.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rule.js +40 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rule.d.ts +1 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rule.js +14 -0
- package/.medusa/server/src/workflows/commission/steps/find-commission-references.d.ts +10 -0
- package/.medusa/server/src/workflows/commission/steps/find-commission-references.js +40 -0
- package/.medusa/server/src/workflows/commission/steps/find-commission-rules.d.ts +10 -0
- package/.medusa/server/src/workflows/commission/steps/find-commission-rules.js +81 -0
- package/.medusa/server/src/workflows/commission/steps/index.d.ts +10 -0
- package/.medusa/server/src/workflows/commission/steps/index.js +27 -0
- package/.medusa/server/src/workflows/commission/steps/list-commission-lines.d.ts +27 -0
- package/.medusa/server/src/workflows/commission/steps/list-commission-lines.js +72 -0
- package/.medusa/server/src/workflows/commission/steps/list-order-commission-lines.d.ts +10 -0
- package/.medusa/server/src/workflows/commission/steps/list-order-commission-lines.js +31 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rule.d.ts +50 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rule.js +17 -0
- package/.medusa/server/src/workflows/commission/workflows/calculate-commission.d.ts +26 -0
- package/.medusa/server/src/workflows/commission/workflows/calculate-commission.js +11 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rule.d.ts +4 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rule.js +16 -0
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rule.d.ts +3 -0
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rule.js +15 -0
- package/.medusa/server/src/workflows/commission/workflows/index.d.ts +8 -0
- package/.medusa/server/src/workflows/commission/workflows/index.js +25 -0
- package/.medusa/server/src/workflows/commission/workflows/list-commission-lines.d.ts +27 -0
- package/.medusa/server/src/workflows/commission/workflows/list-commission-lines.js +9 -0
- package/.medusa/server/src/workflows/commission/workflows/list-commission-rules.d.ts +12 -0
- package/.medusa/server/src/workflows/commission/workflows/list-commission-rules.js +47 -0
- package/.medusa/server/src/workflows/commission/workflows/list-order-commission-lines.d.ts +9 -0
- package/.medusa/server/src/workflows/commission/workflows/list-order-commission-lines.js +9 -0
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rule.d.ts +51 -0
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rule.js +9 -0
- package/.medusa/server/src/workflows/commission/workflows/upsert-default-commission-rule.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/workflows/upsert-default-commission-rule.js +21 -0
- package/.medusa/server/src/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/index.js +18 -0
- package/README.md +22 -0
- package/package.json +86 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const widgetModule = { widgets: [] };
|
|
3
|
+
const routeModule = {
|
|
4
|
+
routes: []
|
|
5
|
+
};
|
|
6
|
+
const menuItemModule = {
|
|
7
|
+
menuItems: []
|
|
8
|
+
};
|
|
9
|
+
const formModule = { customFields: {} };
|
|
10
|
+
const displayModule = {
|
|
11
|
+
displays: {}
|
|
12
|
+
};
|
|
13
|
+
const plugin = {
|
|
14
|
+
widgetModule,
|
|
15
|
+
routeModule,
|
|
16
|
+
menuItemModule,
|
|
17
|
+
formModule,
|
|
18
|
+
displayModule
|
|
19
|
+
};
|
|
20
|
+
module.exports = plugin;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const widgetModule = { widgets: [] };
|
|
2
|
+
const routeModule = {
|
|
3
|
+
routes: []
|
|
4
|
+
};
|
|
5
|
+
const menuItemModule = {
|
|
6
|
+
menuItems: []
|
|
7
|
+
};
|
|
8
|
+
const formModule = { customFields: {} };
|
|
9
|
+
const displayModule = {
|
|
10
|
+
displays: {}
|
|
11
|
+
};
|
|
12
|
+
const plugin = {
|
|
13
|
+
widgetModule,
|
|
14
|
+
routeModule,
|
|
15
|
+
menuItemModule,
|
|
16
|
+
formModule,
|
|
17
|
+
displayModule
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
plugin as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { MedusaRequest, MedusaResponse } from '@medusajs/framework';
|
|
2
|
+
import { AdminGetCommissionLinesParamsType } from '../validators';
|
|
3
|
+
/**
|
|
4
|
+
* @oas [get] /admin/commission/commission-lines
|
|
5
|
+
* operationId: "AdminListCommissionLines"
|
|
6
|
+
* summary: "List Commission Lines"
|
|
7
|
+
* description: "Retrieves a list of commission lines with optional filtering and expansion."
|
|
8
|
+
* x-authenticated: true
|
|
9
|
+
* parameters:
|
|
10
|
+
* - name: offset
|
|
11
|
+
* in: query
|
|
12
|
+
* schema:
|
|
13
|
+
* type: number
|
|
14
|
+
* required: false
|
|
15
|
+
* description: The number of items to skip before starting to collect the result set.
|
|
16
|
+
* - name: limit
|
|
17
|
+
* in: query
|
|
18
|
+
* schema:
|
|
19
|
+
* type: number
|
|
20
|
+
* required: false
|
|
21
|
+
* description: The number of items to return.
|
|
22
|
+
* - name: fields
|
|
23
|
+
* in: query
|
|
24
|
+
* schema:
|
|
25
|
+
* type: string
|
|
26
|
+
* required: false
|
|
27
|
+
* description: Comma-separated fields to include in the response.
|
|
28
|
+
* - name: start_date
|
|
29
|
+
* in: query
|
|
30
|
+
* schema:
|
|
31
|
+
* type: string
|
|
32
|
+
* format: date-time
|
|
33
|
+
* required: false
|
|
34
|
+
* description: Filter commission lines created after this date.
|
|
35
|
+
* - name: end_date
|
|
36
|
+
* in: query
|
|
37
|
+
* schema:
|
|
38
|
+
* type: string
|
|
39
|
+
* format: date-time
|
|
40
|
+
* required: false
|
|
41
|
+
* description: Filter commission lines created before this date.
|
|
42
|
+
* - name: seller_id
|
|
43
|
+
* in: query
|
|
44
|
+
* schema:
|
|
45
|
+
* type: string
|
|
46
|
+
* required: false
|
|
47
|
+
* description: Filter commission lines by seller ID.
|
|
48
|
+
* responses:
|
|
49
|
+
* "200":
|
|
50
|
+
* description: OK
|
|
51
|
+
* content:
|
|
52
|
+
* application/json:
|
|
53
|
+
* schema:
|
|
54
|
+
* type: object
|
|
55
|
+
* properties:
|
|
56
|
+
* commission_lines:
|
|
57
|
+
* type: array
|
|
58
|
+
* items:
|
|
59
|
+
* $ref: "#/components/schemas/AdminCommissionLine"
|
|
60
|
+
* count:
|
|
61
|
+
* type: integer
|
|
62
|
+
* description: The total number of items available
|
|
63
|
+
* offset:
|
|
64
|
+
* type: integer
|
|
65
|
+
* description: The number of items skipped before these items
|
|
66
|
+
* limit:
|
|
67
|
+
* type: integer
|
|
68
|
+
* description: The number of items per page
|
|
69
|
+
* tags:
|
|
70
|
+
* - Admin Commission
|
|
71
|
+
* security:
|
|
72
|
+
* - api_token: []
|
|
73
|
+
* - cookie_auth: []
|
|
74
|
+
*/
|
|
75
|
+
export declare function GET(req: MedusaRequest<AdminGetCommissionLinesParamsType>, res: MedusaResponse): Promise<void>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET = GET;
|
|
4
|
+
const workflows_1 = require("../../../../workflows/commission/workflows");
|
|
5
|
+
/**
|
|
6
|
+
* @oas [get] /admin/commission/commission-lines
|
|
7
|
+
* operationId: "AdminListCommissionLines"
|
|
8
|
+
* summary: "List Commission Lines"
|
|
9
|
+
* description: "Retrieves a list of commission lines with optional filtering and expansion."
|
|
10
|
+
* x-authenticated: true
|
|
11
|
+
* parameters:
|
|
12
|
+
* - name: offset
|
|
13
|
+
* in: query
|
|
14
|
+
* schema:
|
|
15
|
+
* type: number
|
|
16
|
+
* required: false
|
|
17
|
+
* description: The number of items to skip before starting to collect the result set.
|
|
18
|
+
* - name: limit
|
|
19
|
+
* in: query
|
|
20
|
+
* schema:
|
|
21
|
+
* type: number
|
|
22
|
+
* required: false
|
|
23
|
+
* description: The number of items to return.
|
|
24
|
+
* - name: fields
|
|
25
|
+
* in: query
|
|
26
|
+
* schema:
|
|
27
|
+
* type: string
|
|
28
|
+
* required: false
|
|
29
|
+
* description: Comma-separated fields to include in the response.
|
|
30
|
+
* - name: start_date
|
|
31
|
+
* in: query
|
|
32
|
+
* schema:
|
|
33
|
+
* type: string
|
|
34
|
+
* format: date-time
|
|
35
|
+
* required: false
|
|
36
|
+
* description: Filter commission lines created after this date.
|
|
37
|
+
* - name: end_date
|
|
38
|
+
* in: query
|
|
39
|
+
* schema:
|
|
40
|
+
* type: string
|
|
41
|
+
* format: date-time
|
|
42
|
+
* required: false
|
|
43
|
+
* description: Filter commission lines created before this date.
|
|
44
|
+
* - name: seller_id
|
|
45
|
+
* in: query
|
|
46
|
+
* schema:
|
|
47
|
+
* type: string
|
|
48
|
+
* required: false
|
|
49
|
+
* description: Filter commission lines by seller ID.
|
|
50
|
+
* responses:
|
|
51
|
+
* "200":
|
|
52
|
+
* description: OK
|
|
53
|
+
* content:
|
|
54
|
+
* application/json:
|
|
55
|
+
* schema:
|
|
56
|
+
* type: object
|
|
57
|
+
* properties:
|
|
58
|
+
* commission_lines:
|
|
59
|
+
* type: array
|
|
60
|
+
* items:
|
|
61
|
+
* $ref: "#/components/schemas/AdminCommissionLine"
|
|
62
|
+
* count:
|
|
63
|
+
* type: integer
|
|
64
|
+
* description: The total number of items available
|
|
65
|
+
* offset:
|
|
66
|
+
* type: integer
|
|
67
|
+
* description: The number of items skipped before these items
|
|
68
|
+
* limit:
|
|
69
|
+
* type: integer
|
|
70
|
+
* description: The number of items per page
|
|
71
|
+
* tags:
|
|
72
|
+
* - Admin Commission
|
|
73
|
+
* security:
|
|
74
|
+
* - api_token: []
|
|
75
|
+
* - cookie_auth: []
|
|
76
|
+
*/
|
|
77
|
+
async function GET(req, res) {
|
|
78
|
+
const { result: { lines: commission_lines, count } } = await (0, workflows_1.listCommissionLinesWorkflow)(req.scope).run({
|
|
79
|
+
input: {
|
|
80
|
+
expand: true,
|
|
81
|
+
pagination: {
|
|
82
|
+
skip: req.queryConfig.pagination.skip,
|
|
83
|
+
take: req.queryConfig.pagination.take || 20
|
|
84
|
+
},
|
|
85
|
+
filters: req.filterableFields
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
res.json({
|
|
89
|
+
commission_lines,
|
|
90
|
+
count,
|
|
91
|
+
offset: req.queryConfig.pagination.skip,
|
|
92
|
+
limit: req.queryConfig.pagination.take
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL2NvbW1pc3Npb24vY29tbWlzc2lvbi1saW5lcy9yb3V0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQTZFQSxrQkF1QkM7QUFsR0QsMEVBQXdGO0FBR3hGOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXVFRztBQUNJLEtBQUssVUFBVSxHQUFHLENBQ3ZCLEdBQXFELEVBQ3JELEdBQW1CO0lBRW5CLE1BQU0sRUFDSixNQUFNLEVBQUUsRUFBRSxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsS0FBSyxFQUFFLEVBQzNDLEdBQUcsTUFBTSxJQUFBLHVDQUEyQixFQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDbkQsS0FBSyxFQUFFO1lBQ0wsTUFBTSxFQUFFLElBQUk7WUFDWixVQUFVLEVBQUU7Z0JBQ1YsSUFBSSxFQUFFLEdBQUcsQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDLElBQUk7Z0JBQ3JDLElBQUksRUFBRSxHQUFHLENBQUMsV0FBVyxDQUFDLFVBQVUsQ0FBQyxJQUFJLElBQUksRUFBRTthQUM1QztZQUNELE9BQU8sRUFBRSxHQUFHLENBQUMsZ0JBQWdCO1NBQzlCO0tBQ0YsQ0FBQyxDQUFBO0lBRUYsR0FBRyxDQUFDLElBQUksQ0FBQztRQUNQLGdCQUFnQjtRQUNoQixLQUFLO1FBQ0wsTUFBTSxFQUFFLEdBQUcsQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDLElBQUk7UUFDdkMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDLElBQUk7S0FDdkMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyJ9
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MedusaRequest, MedusaResponse } from '@medusajs/framework';
|
|
2
|
+
import { AdminUpsertDefaultCommissionRuleType } from '../validators';
|
|
3
|
+
/**
|
|
4
|
+
* @oas [post] /admin/commission/default
|
|
5
|
+
* operationId: "AdminUpsertDefaultCommissionRule"
|
|
6
|
+
* summary: "Upsert default CommissionRule"
|
|
7
|
+
* description: "Creates or updates default commission rule."
|
|
8
|
+
* x-authenticated: true
|
|
9
|
+
* requestBody:
|
|
10
|
+
* content:
|
|
11
|
+
* application/json:
|
|
12
|
+
* schema:
|
|
13
|
+
* $ref: "#/components/schemas/AdminUpsertDefaultCommissionRule"
|
|
14
|
+
* responses:
|
|
15
|
+
* "200":
|
|
16
|
+
* description: Created
|
|
17
|
+
* content:
|
|
18
|
+
* application/json:
|
|
19
|
+
* schema:
|
|
20
|
+
* type: object
|
|
21
|
+
* properties:
|
|
22
|
+
* commission_rule:
|
|
23
|
+
* $ref: "#/components/schemas/AdminCommissionRule"
|
|
24
|
+
* tags:
|
|
25
|
+
* - Admin Commission
|
|
26
|
+
* security:
|
|
27
|
+
* - api_token: []
|
|
28
|
+
* - cookie_auth: []
|
|
29
|
+
*/
|
|
30
|
+
export declare function POST(req: MedusaRequest<AdminUpsertDefaultCommissionRuleType>, res: MedusaResponse): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* @oas [get] /admin/commission/default
|
|
33
|
+
* operationId: "AdminGetDefaultCommissionRule"
|
|
34
|
+
* summary: "Get default commission rule"
|
|
35
|
+
* description: "Retrieves a commission rule with 'site' reference type."
|
|
36
|
+
* x-authenticated: true
|
|
37
|
+
* responses:
|
|
38
|
+
* "200":
|
|
39
|
+
* description: OK
|
|
40
|
+
* content:
|
|
41
|
+
* application/json:
|
|
42
|
+
* schema:
|
|
43
|
+
* type: object
|
|
44
|
+
* properties:
|
|
45
|
+
* commission_rule:
|
|
46
|
+
* $ref: "#/components/schemas/AdminCommissionAggregate"
|
|
47
|
+
* tags:
|
|
48
|
+
* - Admin Commission
|
|
49
|
+
* security:
|
|
50
|
+
* - api_token: []
|
|
51
|
+
* - cookie_auth: []
|
|
52
|
+
*/
|
|
53
|
+
export declare function GET(req: MedusaRequest, res: MedusaResponse): Promise<void>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = POST;
|
|
4
|
+
exports.GET = GET;
|
|
5
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
+
const workflows_1 = require("../../../../workflows/commission/workflows");
|
|
7
|
+
const validators_1 = require("../validators");
|
|
8
|
+
/**
|
|
9
|
+
* @oas [post] /admin/commission/default
|
|
10
|
+
* operationId: "AdminUpsertDefaultCommissionRule"
|
|
11
|
+
* summary: "Upsert default CommissionRule"
|
|
12
|
+
* description: "Creates or updates default commission rule."
|
|
13
|
+
* x-authenticated: true
|
|
14
|
+
* requestBody:
|
|
15
|
+
* content:
|
|
16
|
+
* application/json:
|
|
17
|
+
* schema:
|
|
18
|
+
* $ref: "#/components/schemas/AdminUpsertDefaultCommissionRule"
|
|
19
|
+
* responses:
|
|
20
|
+
* "200":
|
|
21
|
+
* description: Created
|
|
22
|
+
* content:
|
|
23
|
+
* application/json:
|
|
24
|
+
* schema:
|
|
25
|
+
* type: object
|
|
26
|
+
* properties:
|
|
27
|
+
* commission_rule:
|
|
28
|
+
* $ref: "#/components/schemas/AdminCommissionRule"
|
|
29
|
+
* tags:
|
|
30
|
+
* - Admin Commission
|
|
31
|
+
* security:
|
|
32
|
+
* - api_token: []
|
|
33
|
+
* - cookie_auth: []
|
|
34
|
+
*/
|
|
35
|
+
async function POST(req, res) {
|
|
36
|
+
(0, validators_1.validateCommissionRate)(req.validatedBody.rate);
|
|
37
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
38
|
+
await workflows_1.upsertDefaultCommissionRuleWorkflow.run({
|
|
39
|
+
container: req.scope,
|
|
40
|
+
input: req.validatedBody
|
|
41
|
+
});
|
|
42
|
+
const { data: [default_rule] } = await query.graph({
|
|
43
|
+
entity: 'commission_rule',
|
|
44
|
+
fields: ['id'],
|
|
45
|
+
filters: {
|
|
46
|
+
reference: 'site'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const { result: { commission_rules: [commission_rule] } } = await workflows_1.listCommissionRulesWorkflow.run({
|
|
50
|
+
container: req.scope,
|
|
51
|
+
input: {
|
|
52
|
+
ids: [default_rule.id]
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
res.json({
|
|
56
|
+
commission_rule
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @oas [get] /admin/commission/default
|
|
61
|
+
* operationId: "AdminGetDefaultCommissionRule"
|
|
62
|
+
* summary: "Get default commission rule"
|
|
63
|
+
* description: "Retrieves a commission rule with 'site' reference type."
|
|
64
|
+
* x-authenticated: true
|
|
65
|
+
* responses:
|
|
66
|
+
* "200":
|
|
67
|
+
* description: OK
|
|
68
|
+
* content:
|
|
69
|
+
* application/json:
|
|
70
|
+
* schema:
|
|
71
|
+
* type: object
|
|
72
|
+
* properties:
|
|
73
|
+
* commission_rule:
|
|
74
|
+
* $ref: "#/components/schemas/AdminCommissionAggregate"
|
|
75
|
+
* tags:
|
|
76
|
+
* - Admin Commission
|
|
77
|
+
* security:
|
|
78
|
+
* - api_token: []
|
|
79
|
+
* - cookie_auth: []
|
|
80
|
+
*/
|
|
81
|
+
async function GET(req, res) {
|
|
82
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
83
|
+
const { data: [default_rule] } = await query.graph({
|
|
84
|
+
entity: 'commission_rule',
|
|
85
|
+
fields: ['id'],
|
|
86
|
+
filters: {
|
|
87
|
+
reference: 'site'
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
if (!default_rule) {
|
|
91
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, 'Rule not found!');
|
|
92
|
+
}
|
|
93
|
+
const { result: { commission_rules: [commission_rule] } } = await workflows_1.listCommissionRulesWorkflow.run({
|
|
94
|
+
container: req.scope,
|
|
95
|
+
input: {
|
|
96
|
+
ids: [default_rule.id]
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
res.json({
|
|
100
|
+
commission_rule
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL2NvbW1pc3Npb24vZGVmYXVsdC9yb3V0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQTBDQSxvQkFvQ0M7QUF3QkQsa0JBa0NDO0FBdklELHFEQUdrQztBQUVsQywwRUFHbUQ7QUFDbkQsOENBR3NCO0FBRXRCOzs7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ineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commissionMiddlewares = void 0;
|
|
4
|
+
const framework_1 = require("@medusajs/framework");
|
|
5
|
+
const query_config_1 = require("./query-config");
|
|
6
|
+
const validators_1 = require("./validators");
|
|
7
|
+
exports.commissionMiddlewares = [
|
|
8
|
+
{
|
|
9
|
+
method: ['GET'],
|
|
10
|
+
matcher: '/admin/commission/rules',
|
|
11
|
+
middlewares: [
|
|
12
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminCommissionRuleParams, query_config_1.adminCommissionRuleQueryConfig.list)
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
method: ['GET'],
|
|
17
|
+
matcher: '/admin/commission/commission-lines',
|
|
18
|
+
middlewares: [
|
|
19
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetCommissionLinesParams, query_config_1.adminCommissionLinesQueryConfig.list)
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
method: ['POST'],
|
|
24
|
+
matcher: '/admin/commission/rules',
|
|
25
|
+
middlewares: [
|
|
26
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminCommissionRuleParams, query_config_1.adminCommissionRuleQueryConfig.retrieve),
|
|
27
|
+
(0, framework_1.validateAndTransformBody)(validators_1.AdminCreateCommissionRule)
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
method: ['POST'],
|
|
32
|
+
matcher: '/admin/commission/rules/:id',
|
|
33
|
+
middlewares: [
|
|
34
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminCommissionRuleParams, query_config_1.adminCommissionRuleQueryConfig.retrieve),
|
|
35
|
+
(0, framework_1.validateAndTransformBody)(validators_1.AdminUpdateCommissionRule)
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
method: ['POST'],
|
|
40
|
+
matcher: '/admin/commission/default',
|
|
41
|
+
middlewares: [(0, framework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1BQU0sQ0FBQztRQUNoQixPQUFPLEVBQUUsNkJBQTZCO1FBQ3RDLFdBQVcsRUFBRTtZQUNYLElBQUEscUNBQXlCLEVBQ3ZCLHNDQUF5QixFQUN6Qiw2Q0FBOEIsQ0FBQyxRQUFRLENBQ3hDO1lBQ0QsSUFBQSxvQ0FBd0IsRUFBQyxzQ0FBeUIsQ0FBQztTQUNwRDtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxNQUFNLENBQUM7UUFDaEIsT0FBTyxFQUFFLDJCQUEyQjtRQUNwQyxXQUFXLEVBQUUsQ0FBQyxJQUFBLG9DQUF3QixFQUFDLDZDQUFnQyxDQUFDLENBQUM7S0FDMUU7Q0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const adminCommissionRuleFields: string[];
|
|
2
|
+
export declare const adminCommissionRuleQueryConfig: {
|
|
3
|
+
list: {
|
|
4
|
+
defaults: string[];
|
|
5
|
+
isList: boolean;
|
|
6
|
+
};
|
|
7
|
+
retrieve: {
|
|
8
|
+
defaults: string[];
|
|
9
|
+
isList: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const adminCommissionLinesQueryConfig: {
|
|
13
|
+
list: {
|
|
14
|
+
defaults: never[];
|
|
15
|
+
isList: boolean;
|
|
16
|
+
};
|
|
17
|
+
retrieve: {
|
|
18
|
+
defaults: never[];
|
|
19
|
+
isList: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adminCommissionLinesQueryConfig = exports.adminCommissionRuleQueryConfig = exports.adminCommissionRuleFields = void 0;
|
|
4
|
+
exports.adminCommissionRuleFields = [
|
|
5
|
+
'id',
|
|
6
|
+
'name',
|
|
7
|
+
'reference',
|
|
8
|
+
'reference_id',
|
|
9
|
+
'is_active',
|
|
10
|
+
'rate_id',
|
|
11
|
+
'created_at',
|
|
12
|
+
'updated_at',
|
|
13
|
+
'*rate'
|
|
14
|
+
];
|
|
15
|
+
exports.adminCommissionRuleQueryConfig = {
|
|
16
|
+
list: {
|
|
17
|
+
defaults: exports.adminCommissionRuleFields,
|
|
18
|
+
isList: true
|
|
19
|
+
},
|
|
20
|
+
retrieve: {
|
|
21
|
+
defaults: exports.adminCommissionRuleFields,
|
|
22
|
+
isList: false
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.adminCommissionLinesQueryConfig = {
|
|
26
|
+
list: {
|
|
27
|
+
defaults: [],
|
|
28
|
+
isList: true
|
|
29
|
+
},
|
|
30
|
+
retrieve: {
|
|
31
|
+
defaults: [],
|
|
32
|
+
isList: false
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwaS9hZG1pbi9jb21taXNzaW9uL3F1ZXJ5LWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHlCQUF5QixHQUFHO0lBQ3ZDLElBQUk7SUFDSixNQUFNO0lBQ04sV0FBVztJQUNYLGNBQWM7SUFDZCxXQUFXO0lBQ1gsU0FBUztJQUNULFlBQVk7SUFDWixZQUFZO0lBQ1osT0FBTztDQUNSLENBQUE7QUFFWSxRQUFBLDhCQUE4QixHQUFHO0lBQzVDLElBQUksRUFBRTtRQUNKLFFBQVEsRUFBRSxpQ0FBeUI7UUFDbkMsTUFBTSxFQUFFLElBQUk7S0FDYjtJQUNELFFBQVEsRUFBRTtRQUNSLFFBQVEsRUFBRSxpQ0FBeUI7UUFDbkMsTUFBTSxFQUFFLEtBQUs7S0FDZDtDQUNGLENBQUE7QUFFWSxRQUFBLCtCQUErQixHQUFHO0lBQzdDLElBQUksRUFBRTtRQUNKLFFBQVEsRUFBRSxFQUFFO1FBQ1osTUFBTSxFQUFFLElBQUk7S0FDYjtJQUNELFFBQVEsRUFBRTtRQUNSLFFBQVEsRUFBRSxFQUFFO1FBQ1osTUFBTSxFQUFFLEtBQUs7S0FDZDtDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { MedusaRequest, MedusaResponse } from '@medusajs/framework';
|
|
2
|
+
import { AdminUpdateCommissionRuleType } from '../../validators';
|
|
3
|
+
/**
|
|
4
|
+
* @oas [post] /admin/commission/rules/{id}
|
|
5
|
+
* operationId: "AdminUpdateCommissionRuleById"
|
|
6
|
+
* summary: "Update CommissionRule"
|
|
7
|
+
* description: "Updates commission rule by id."
|
|
8
|
+
* x-authenticated: true
|
|
9
|
+
* parameters:
|
|
10
|
+
* - in: path
|
|
11
|
+
* name: id
|
|
12
|
+
* required: true
|
|
13
|
+
* description: The ID of the Rule.
|
|
14
|
+
* schema:
|
|
15
|
+
* type: string
|
|
16
|
+
* requestBody:
|
|
17
|
+
* content:
|
|
18
|
+
* application/json:
|
|
19
|
+
* schema:
|
|
20
|
+
* $ref: "#/components/schemas/AdminUpdateCommissionRule"
|
|
21
|
+
* responses:
|
|
22
|
+
* "200":
|
|
23
|
+
* description: Created
|
|
24
|
+
* content:
|
|
25
|
+
* application/json:
|
|
26
|
+
* schema:
|
|
27
|
+
* type: object
|
|
28
|
+
* properties:
|
|
29
|
+
* commission_rule:
|
|
30
|
+
* $ref: "#/components/schemas/AdminCommissionRule"
|
|
31
|
+
* tags:
|
|
32
|
+
* - Admin Commission
|
|
33
|
+
* security:
|
|
34
|
+
* - api_token: []
|
|
35
|
+
* - cookie_auth: []
|
|
36
|
+
*/
|
|
37
|
+
export declare function POST(req: MedusaRequest<AdminUpdateCommissionRuleType>, res: MedusaResponse): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* @oas [delete] /admin/commission/rules/{id}
|
|
40
|
+
* operationId: "AdminDeleteCommissionRuleById"
|
|
41
|
+
* summary: "Delete a Commission Rule"
|
|
42
|
+
* description: "Deletes a commission rule by id."
|
|
43
|
+
* x-authenticated: true
|
|
44
|
+
* parameters:
|
|
45
|
+
* - in: path
|
|
46
|
+
* name: id
|
|
47
|
+
* required: true
|
|
48
|
+
* description: The ID of the rule.
|
|
49
|
+
* schema:
|
|
50
|
+
* type: string
|
|
51
|
+
* responses:
|
|
52
|
+
* "200":
|
|
53
|
+
* description: OK
|
|
54
|
+
* content:
|
|
55
|
+
* application/json:
|
|
56
|
+
* schema:
|
|
57
|
+
* type: object
|
|
58
|
+
* properties:
|
|
59
|
+
* id:
|
|
60
|
+
* type: string
|
|
61
|
+
* description: The ID of the deleted rule
|
|
62
|
+
* object:
|
|
63
|
+
* type: string
|
|
64
|
+
* description: The type of the object that was deleted
|
|
65
|
+
* deleted:
|
|
66
|
+
* type: boolean
|
|
67
|
+
* description: Whether or not the items were deleted
|
|
68
|
+
* tags:
|
|
69
|
+
* - Admin Commission
|
|
70
|
+
* security:
|
|
71
|
+
* - api_token: []
|
|
72
|
+
* - cookie_auth: []
|
|
73
|
+
*/
|
|
74
|
+
export declare function DELETE(req: MedusaRequest, res: MedusaResponse): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* @oas [get] /admin/commission/rules/{id}
|
|
77
|
+
* operationId: "AdminGetCommissionRuleById"
|
|
78
|
+
* summary: "Get commission rule by id"
|
|
79
|
+
* description: "Retrieves a commission rule by id."
|
|
80
|
+
* x-authenticated: true
|
|
81
|
+
* parameters:
|
|
82
|
+
* - in: path
|
|
83
|
+
* name: id
|
|
84
|
+
* required: true
|
|
85
|
+
* description: The ID of the Rule.
|
|
86
|
+
* schema:
|
|
87
|
+
* type: string
|
|
88
|
+
* responses:
|
|
89
|
+
* "200":
|
|
90
|
+
* description: OK
|
|
91
|
+
* content:
|
|
92
|
+
* application/json:
|
|
93
|
+
* schema:
|
|
94
|
+
* type: object
|
|
95
|
+
* properties:
|
|
96
|
+
* commission_rule:
|
|
97
|
+
* $ref: "#/components/schemas/AdminCommissionAggregate"
|
|
98
|
+
* tags:
|
|
99
|
+
* - Admin Commission
|
|
100
|
+
* security:
|
|
101
|
+
* - api_token: []
|
|
102
|
+
* - cookie_auth: []
|
|
103
|
+
*/
|
|
104
|
+
export declare function GET(req: MedusaRequest, res: MedusaResponse): Promise<void>;
|