@xoxno/types 1.0.341 → 1.0.342
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/cosmos-db/documents/external-payment/xmoney-customer.d.ts +52 -0
- package/dist/cosmos-db/documents/external-payment/xmoney-customer.js +225 -0
- package/dist/cosmos-db/documents/external-payment/xmoney-order.d.ts +1 -0
- package/dist/cosmos-db/documents/external-payment/xmoney-order.js +2 -0
- package/dist/cosmos-db/documents/user/user-settings.doc.d.ts +1 -0
- package/dist/cosmos-db/documents/user/user-settings.doc.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { XMoneyErrorType } from '../../../enums/xmoney.enum';
|
|
2
|
+
/**
|
|
3
|
+
* xMoney Customer Request - for creating customers
|
|
4
|
+
*/
|
|
5
|
+
export declare class XMoneyCustomerRequest {
|
|
6
|
+
identifier: string;
|
|
7
|
+
email: string;
|
|
8
|
+
siteId?: number;
|
|
9
|
+
firstName?: string;
|
|
10
|
+
lastName?: string;
|
|
11
|
+
country?: string;
|
|
12
|
+
state?: string;
|
|
13
|
+
city?: string;
|
|
14
|
+
zipCode?: string;
|
|
15
|
+
address?: string;
|
|
16
|
+
phone?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* xMoney Customer Response Data (201 Created)
|
|
20
|
+
*/
|
|
21
|
+
export declare class XMoneyCustomerResponseData {
|
|
22
|
+
id: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* xMoney Customer Success Response (201)
|
|
26
|
+
*/
|
|
27
|
+
export declare class XMoneyCustomerResponse {
|
|
28
|
+
code: number;
|
|
29
|
+
message: string;
|
|
30
|
+
data?: XMoneyCustomerResponseData;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* xMoney Customer Error
|
|
34
|
+
*/
|
|
35
|
+
export declare class XMoneyCustomerError {
|
|
36
|
+
code?: number;
|
|
37
|
+
message?: string;
|
|
38
|
+
type?: XMoneyErrorType;
|
|
39
|
+
field?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* xMoney Customer Error Response (400/409)
|
|
43
|
+
*/
|
|
44
|
+
export declare class XMoneyCustomerErrorResponse {
|
|
45
|
+
code: number;
|
|
46
|
+
message: string;
|
|
47
|
+
error?: XMoneyCustomerError[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Combined customer response type
|
|
51
|
+
*/
|
|
52
|
+
export type XMoneyCustomerResult = XMoneyCustomerResponse | XMoneyCustomerErrorResponse;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.XMoneyCustomerErrorResponse = exports.XMoneyCustomerError = exports.XMoneyCustomerResponse = exports.XMoneyCustomerResponseData = exports.XMoneyCustomerRequest = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const xmoney_enum_1 = require("../../../enums/xmoney.enum");
|
|
16
|
+
// xMoney Customer API Types based on xMoney API documentation
|
|
17
|
+
// https://docs.xmoney.com/api/reference/customer/create-a-customer.md
|
|
18
|
+
// Note: xMoney API expects application/x-www-form-urlencoded content type
|
|
19
|
+
/**
|
|
20
|
+
* xMoney Customer Request - for creating customers
|
|
21
|
+
*/
|
|
22
|
+
class XMoneyCustomerRequest {
|
|
23
|
+
}
|
|
24
|
+
exports.XMoneyCustomerRequest = XMoneyCustomerRequest;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: 'External identifier for the customer (e.g., wallet address)',
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], XMoneyCustomerRequest.prototype, "identifier", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
description: "Customer's email address",
|
|
34
|
+
format: 'email',
|
|
35
|
+
}),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], XMoneyCustomerRequest.prototype, "email", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
40
|
+
description: 'Site profile identifier; required if multiple sites configured',
|
|
41
|
+
type: 'number',
|
|
42
|
+
required: false,
|
|
43
|
+
}),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], XMoneyCustomerRequest.prototype, "siteId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
49
|
+
description: "Customer's first name",
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], XMoneyCustomerRequest.prototype, "firstName", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
57
|
+
description: "Customer's last name",
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], XMoneyCustomerRequest.prototype, "lastName", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
65
|
+
description: "Customer's country (ISO 3166-1 alpha-2 code)",
|
|
66
|
+
example: 'US',
|
|
67
|
+
minLength: 2,
|
|
68
|
+
maxLength: 2,
|
|
69
|
+
required: false,
|
|
70
|
+
}),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], XMoneyCustomerRequest.prototype, "country", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
76
|
+
description: "Customer's state (ISO 3166-2 code, for US/CA)",
|
|
77
|
+
example: 'NY',
|
|
78
|
+
required: false,
|
|
79
|
+
}),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], XMoneyCustomerRequest.prototype, "state", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
85
|
+
description: "Customer's city of residence",
|
|
86
|
+
required: false,
|
|
87
|
+
}),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], XMoneyCustomerRequest.prototype, "city", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
93
|
+
description: "Customer's postal/zip code",
|
|
94
|
+
required: false,
|
|
95
|
+
}),
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], XMoneyCustomerRequest.prototype, "zipCode", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
101
|
+
description: "Customer's street address",
|
|
102
|
+
required: false,
|
|
103
|
+
}),
|
|
104
|
+
(0, class_validator_1.IsOptional)(),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], XMoneyCustomerRequest.prototype, "address", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
109
|
+
description: "Customer's phone number",
|
|
110
|
+
required: false,
|
|
111
|
+
}),
|
|
112
|
+
(0, class_validator_1.IsOptional)(),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], XMoneyCustomerRequest.prototype, "phone", void 0);
|
|
115
|
+
/**
|
|
116
|
+
* xMoney Customer Response Data (201 Created)
|
|
117
|
+
*/
|
|
118
|
+
class XMoneyCustomerResponseData {
|
|
119
|
+
}
|
|
120
|
+
exports.XMoneyCustomerResponseData = XMoneyCustomerResponseData;
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, swagger_1.ApiProperty)({
|
|
123
|
+
description: 'The newly created customer ID',
|
|
124
|
+
type: 'number',
|
|
125
|
+
}),
|
|
126
|
+
__metadata("design:type", Number)
|
|
127
|
+
], XMoneyCustomerResponseData.prototype, "id", void 0);
|
|
128
|
+
/**
|
|
129
|
+
* xMoney Customer Success Response (201)
|
|
130
|
+
*/
|
|
131
|
+
class XMoneyCustomerResponse {
|
|
132
|
+
}
|
|
133
|
+
exports.XMoneyCustomerResponse = XMoneyCustomerResponse;
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, swagger_1.ApiProperty)({
|
|
136
|
+
description: 'Response code',
|
|
137
|
+
type: 'number',
|
|
138
|
+
}),
|
|
139
|
+
__metadata("design:type", Number)
|
|
140
|
+
], XMoneyCustomerResponse.prototype, "code", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, swagger_1.ApiProperty)({
|
|
143
|
+
description: 'Response message',
|
|
144
|
+
}),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], XMoneyCustomerResponse.prototype, "message", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
149
|
+
description: 'Response data containing the customer ID',
|
|
150
|
+
type: () => XMoneyCustomerResponseData,
|
|
151
|
+
required: false,
|
|
152
|
+
}),
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
154
|
+
__metadata("design:type", XMoneyCustomerResponseData)
|
|
155
|
+
], XMoneyCustomerResponse.prototype, "data", void 0);
|
|
156
|
+
/**
|
|
157
|
+
* xMoney Customer Error
|
|
158
|
+
*/
|
|
159
|
+
class XMoneyCustomerError {
|
|
160
|
+
}
|
|
161
|
+
exports.XMoneyCustomerError = XMoneyCustomerError;
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
164
|
+
description: 'Error code',
|
|
165
|
+
type: 'number',
|
|
166
|
+
required: false,
|
|
167
|
+
}),
|
|
168
|
+
(0, class_validator_1.IsOptional)(),
|
|
169
|
+
__metadata("design:type", Number)
|
|
170
|
+
], XMoneyCustomerError.prototype, "code", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
173
|
+
description: 'Error message',
|
|
174
|
+
required: false,
|
|
175
|
+
}),
|
|
176
|
+
(0, class_validator_1.IsOptional)(),
|
|
177
|
+
__metadata("design:type", String)
|
|
178
|
+
], XMoneyCustomerError.prototype, "message", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
181
|
+
description: 'Error type',
|
|
182
|
+
enum: xmoney_enum_1.XMoneyErrorType,
|
|
183
|
+
enumName: 'XMoneyErrorType',
|
|
184
|
+
required: false,
|
|
185
|
+
}),
|
|
186
|
+
(0, class_validator_1.IsOptional)(),
|
|
187
|
+
__metadata("design:type", String)
|
|
188
|
+
], XMoneyCustomerError.prototype, "type", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
191
|
+
description: 'Field that caused the error',
|
|
192
|
+
required: false,
|
|
193
|
+
}),
|
|
194
|
+
(0, class_validator_1.IsOptional)(),
|
|
195
|
+
__metadata("design:type", String)
|
|
196
|
+
], XMoneyCustomerError.prototype, "field", void 0);
|
|
197
|
+
/**
|
|
198
|
+
* xMoney Customer Error Response (400/409)
|
|
199
|
+
*/
|
|
200
|
+
class XMoneyCustomerErrorResponse {
|
|
201
|
+
}
|
|
202
|
+
exports.XMoneyCustomerErrorResponse = XMoneyCustomerErrorResponse;
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, swagger_1.ApiProperty)({
|
|
205
|
+
description: 'Response code',
|
|
206
|
+
type: 'number',
|
|
207
|
+
}),
|
|
208
|
+
__metadata("design:type", Number)
|
|
209
|
+
], XMoneyCustomerErrorResponse.prototype, "code", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, swagger_1.ApiProperty)({
|
|
212
|
+
description: 'Response message',
|
|
213
|
+
}),
|
|
214
|
+
__metadata("design:type", String)
|
|
215
|
+
], XMoneyCustomerErrorResponse.prototype, "message", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
218
|
+
description: 'Array of errors',
|
|
219
|
+
type: [XMoneyCustomerError],
|
|
220
|
+
isArray: true,
|
|
221
|
+
required: false,
|
|
222
|
+
}),
|
|
223
|
+
(0, class_validator_1.IsOptional)(),
|
|
224
|
+
__metadata("design:type", Array)
|
|
225
|
+
], XMoneyCustomerErrorResponse.prototype, "error", void 0);
|
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "XMoneyTransactionMethod", { enumerable: true, ge
|
|
|
23
23
|
Object.defineProperty(exports, "XMoneyWalletType", { enumerable: true, get: function () { return xmoney_enum_1.XMoneyWalletType; } });
|
|
24
24
|
// xMoney Order API Types based on xMoney API documentation
|
|
25
25
|
// https://docs.xmoney.com/
|
|
26
|
+
// Note: xMoney API expects application/x-www-form-urlencoded content type
|
|
26
27
|
/**
|
|
27
28
|
* Digital wallet configuration for transaction options
|
|
28
29
|
*/
|
|
@@ -138,6 +139,7 @@ __decorate([
|
|
|
138
139
|
], XMoneyTransactionOption.prototype, "splitPayment", void 0);
|
|
139
140
|
/**
|
|
140
141
|
* xMoney Order Request - for creating orders
|
|
142
|
+
* Note: xMoney API expects application/x-www-form-urlencoded content type
|
|
141
143
|
*/
|
|
142
144
|
class XMoneyOrderRequest {
|
|
143
145
|
}
|
|
@@ -49,6 +49,7 @@ export declare class UserSettingsDoc {
|
|
|
49
49
|
emailNotifications: UserEmailNotificationSettings;
|
|
50
50
|
phoneNotifications?: UserPhoneNotificationSettings;
|
|
51
51
|
notificationPreferences: UserNotificationPreferences;
|
|
52
|
+
xMoneyCustomerId?: number;
|
|
52
53
|
id: string;
|
|
53
54
|
_ts?: number;
|
|
54
55
|
constructor(props?: Partial<UserSettingsDoc>);
|
|
@@ -296,6 +296,14 @@ __decorate([
|
|
|
296
296
|
}),
|
|
297
297
|
__metadata("design:type", UserNotificationPreferences)
|
|
298
298
|
], UserSettingsDoc.prototype, "notificationPreferences", void 0);
|
|
299
|
+
__decorate([
|
|
300
|
+
(0, swagger_1.ApiProperty)({
|
|
301
|
+
description: 'xMoney customer ID for payment processing',
|
|
302
|
+
required: false,
|
|
303
|
+
type: 'integer',
|
|
304
|
+
}),
|
|
305
|
+
__metadata("design:type", Number)
|
|
306
|
+
], UserSettingsDoc.prototype, "xMoneyCustomerId", void 0);
|
|
299
307
|
__decorate([
|
|
300
308
|
(0, swagger_1.ApiProperty)({ description: 'User ID' }),
|
|
301
309
|
__metadata("design:type", String)
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from './cosmos-db/documents/external-payment/twispay-cart';
|
|
|
38
38
|
export * from './cosmos-db/documents/external-payment/twispay-customer';
|
|
39
39
|
export * from './cosmos-db/documents/external-payment/twispay-payment-form';
|
|
40
40
|
export * from './cosmos-db/documents/external-payment/twispay-transaction';
|
|
41
|
+
export * from './cosmos-db/documents/external-payment/xmoney-customer';
|
|
41
42
|
export * from './cosmos-db/documents/external-payment/xmoney-order';
|
|
42
43
|
export * from './cosmos-db/documents/lending/lending-account-pnl';
|
|
43
44
|
export * from './cosmos-db/documents/lending/lending-account-profile';
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ __exportStar(require("./cosmos-db/documents/external-payment/twispay-cart"), exp
|
|
|
54
54
|
__exportStar(require("./cosmos-db/documents/external-payment/twispay-customer"), exports);
|
|
55
55
|
__exportStar(require("./cosmos-db/documents/external-payment/twispay-payment-form"), exports);
|
|
56
56
|
__exportStar(require("./cosmos-db/documents/external-payment/twispay-transaction"), exports);
|
|
57
|
+
__exportStar(require("./cosmos-db/documents/external-payment/xmoney-customer"), exports);
|
|
57
58
|
__exportStar(require("./cosmos-db/documents/external-payment/xmoney-order"), exports);
|
|
58
59
|
__exportStar(require("./cosmos-db/documents/lending/lending-account-pnl"), exports);
|
|
59
60
|
__exportStar(require("./cosmos-db/documents/lending/lending-account-profile"), exports);
|