@venturialstd/capa 0.0.1
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/README.md +253 -0
- package/dist/capa.module.d.ts +3 -0
- package/dist/capa.module.d.ts.map +1 -0
- package/dist/capa.module.js +53 -0
- package/dist/capa.module.js.map +1 -0
- package/dist/clients/capa.client.d.ts +8 -0
- package/dist/clients/capa.client.d.ts.map +1 -0
- package/dist/clients/capa.client.js +53 -0
- package/dist/clients/capa.client.js.map +1 -0
- package/dist/constants/capa-base.constant.d.ts +7 -0
- package/dist/constants/capa-base.constant.d.ts.map +1 -0
- package/dist/constants/capa-base.constant.js +11 -0
- package/dist/constants/capa-base.constant.js.map +1 -0
- package/dist/constants/capa.constant.d.ts +11 -0
- package/dist/constants/capa.constant.d.ts.map +1 -0
- package/dist/constants/capa.constant.js +15 -0
- package/dist/constants/capa.constant.js.map +1 -0
- package/dist/constants/capa.settings.constant.d.ts +6 -0
- package/dist/constants/capa.settings.constant.d.ts.map +1 -0
- package/dist/constants/capa.settings.constant.js +9 -0
- package/dist/constants/capa.settings.constant.js.map +1 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +20 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/services/capa-base.service.d.ts +14 -0
- package/dist/services/capa-base.service.d.ts.map +1 -0
- package/dist/services/capa-base.service.js +116 -0
- package/dist/services/capa-base.service.js.map +1 -0
- package/dist/services/capa-cross-ramp.service.d.ts +13 -0
- package/dist/services/capa-cross-ramp.service.d.ts.map +1 -0
- package/dist/services/capa-cross-ramp.service.js +48 -0
- package/dist/services/capa-cross-ramp.service.js.map +1 -0
- package/dist/services/capa-kyb.service.d.ts +11 -0
- package/dist/services/capa-kyb.service.d.ts.map +1 -0
- package/dist/services/capa-kyb.service.js +35 -0
- package/dist/services/capa-kyb.service.js.map +1 -0
- package/dist/services/capa-kyc.service.d.ts +11 -0
- package/dist/services/capa-kyc.service.d.ts.map +1 -0
- package/dist/services/capa-kyc.service.js +35 -0
- package/dist/services/capa-kyc.service.js.map +1 -0
- package/dist/services/capa-off-ramp.service.d.ts +11 -0
- package/dist/services/capa-off-ramp.service.d.ts.map +1 -0
- package/dist/services/capa-off-ramp.service.js +35 -0
- package/dist/services/capa-off-ramp.service.js.map +1 -0
- package/dist/services/capa-on-ramp.service.d.ts +11 -0
- package/dist/services/capa-on-ramp.service.d.ts.map +1 -0
- package/dist/services/capa-on-ramp.service.js +35 -0
- package/dist/services/capa-on-ramp.service.js.map +1 -0
- package/dist/services/capa-quotes.service.d.ts +12 -0
- package/dist/services/capa-quotes.service.d.ts.map +1 -0
- package/dist/services/capa-quotes.service.js +44 -0
- package/dist/services/capa-quotes.service.js.map +1 -0
- package/dist/services/capa-receivers.service.d.ts +13 -0
- package/dist/services/capa-receivers.service.d.ts.map +1 -0
- package/dist/services/capa-receivers.service.js +50 -0
- package/dist/services/capa-receivers.service.js.map +1 -0
- package/dist/services/capa-transactions.service.d.ts +13 -0
- package/dist/services/capa-transactions.service.d.ts.map +1 -0
- package/dist/services/capa-transactions.service.js +50 -0
- package/dist/services/capa-transactions.service.js.map +1 -0
- package/dist/services/capa-users.service.d.ts +16 -0
- package/dist/services/capa-users.service.d.ts.map +1 -0
- package/dist/services/capa-users.service.js +54 -0
- package/dist/services/capa-users.service.js.map +1 -0
- package/dist/services/capa-webhook-settings.service.d.ts +11 -0
- package/dist/services/capa-webhook-settings.service.d.ts.map +1 -0
- package/dist/services/capa-webhook-settings.service.js +35 -0
- package/dist/services/capa-webhook-settings.service.js.map +1 -0
- package/dist/services/index.d.ts +12 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +28 -0
- package/dist/services/index.js.map +1 -0
- package/dist/settings/capa.settings.d.ts +3 -0
- package/dist/settings/capa.settings.d.ts.map +1 -0
- package/dist/settings/capa.settings.js +47 -0
- package/dist/settings/capa.settings.js.map +1 -0
- package/dist/types/capa-api.types.d.ts +520 -0
- package/dist/types/capa-api.types.d.ts.map +1 -0
- package/dist/types/capa-api.types.js +3 -0
- package/dist/types/capa-api.types.js.map +1 -0
- package/dist/types/capa.config.type.d.ts +11 -0
- package/dist/types/capa.config.type.d.ts.map +1 -0
- package/dist/types/capa.config.type.js +3 -0
- package/dist/types/capa.config.type.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,50 @@
|
|
|
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.CapaTransactionsService = void 0;
|
|
13
|
+
const axios_1 = require("@nestjs/axios");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const core_1 = require("@venturialstd/core");
|
|
16
|
+
const capa_base_constant_1 = require("../constants/capa-base.constant");
|
|
17
|
+
const capa_client_1 = require("../clients/capa.client");
|
|
18
|
+
const capa_base_service_1 = require("./capa-base.service");
|
|
19
|
+
let CapaTransactionsService = class CapaTransactionsService extends capa_base_service_1.CapaBaseService {
|
|
20
|
+
constructor(httpService, capaClient, logger) {
|
|
21
|
+
super(httpService, capaClient, logger);
|
|
22
|
+
}
|
|
23
|
+
async listTransactions(query, config = null) {
|
|
24
|
+
const queryString = query
|
|
25
|
+
? '?' +
|
|
26
|
+
Object.entries(query)
|
|
27
|
+
.filter(([_, value]) => value !== undefined)
|
|
28
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
29
|
+
.join('&')
|
|
30
|
+
: '';
|
|
31
|
+
const response = await this.makeApiCall(`/transactions${queryString}`, capa_base_constant_1.CapaBaseMethod.GET, undefined, config);
|
|
32
|
+
return response.data;
|
|
33
|
+
}
|
|
34
|
+
async cancelTransaction(transactionId, config = null) {
|
|
35
|
+
const response = await this.makeApiCall(`/transactions/${transactionId}/cancel`, capa_base_constant_1.CapaBaseMethod.PUT, undefined, config);
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
async getMockTestingGuide(config = null) {
|
|
39
|
+
const response = await this.makeApiCall('/transactions/mock-testing-guide', capa_base_constant_1.CapaBaseMethod.GET, undefined, config);
|
|
40
|
+
return response.data;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.CapaTransactionsService = CapaTransactionsService;
|
|
44
|
+
exports.CapaTransactionsService = CapaTransactionsService = __decorate([
|
|
45
|
+
(0, common_1.Injectable)(),
|
|
46
|
+
__metadata("design:paramtypes", [axios_1.HttpService,
|
|
47
|
+
capa_client_1.CapaClient,
|
|
48
|
+
core_1.AppLogger])
|
|
49
|
+
], CapaTransactionsService);
|
|
50
|
+
//# sourceMappingURL=capa-transactions.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa-transactions.service.js","sourceRoot":"","sources":["../../src/services/capa-transactions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA4C;AAC5C,2CAA4C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CAAkC,EAClC,mCAAc,CAAC,GAAG,EAClB,SAAS,EACT,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAA;AAlEY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAGI,mBAAW;QACZ,wBAAU;QACd,gBAAS;GAJR,uBAAuB,CAkEnC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpService } from '@nestjs/axios';
|
|
2
|
+
import { AppLogger } from '@venturialstd/core';
|
|
3
|
+
import { CapaClient } from '../clients/capa.client';
|
|
4
|
+
import { CapaBaseService } from './capa-base.service';
|
|
5
|
+
import { CapaAgreement, CapaCreateKycRequest, CapaCreateUserRequest, CapaDocumentSignRequest, CapaDocumentSignResponse, CapaKybVerificationLinkRequest, CapaKybVerificationLinkResponse, CapaKycVerificationLinkRequest, CapaKycVerificationLinkResponse, CapaUser } from '../types/capa-api.types';
|
|
6
|
+
import { CapaConfig } from '../types/capa.config.type';
|
|
7
|
+
export declare class CapaUsersService extends CapaBaseService {
|
|
8
|
+
constructor(httpService: HttpService, capaClient: CapaClient, logger: AppLogger);
|
|
9
|
+
createUser(request: CapaCreateUserRequest, config?: CapaConfig | null): Promise<CapaUser>;
|
|
10
|
+
createUserKyc(userId: string, request: CapaCreateKycRequest, config?: CapaConfig | null): Promise<void>;
|
|
11
|
+
createKycVerificationLink(userId: string, request: CapaKycVerificationLinkRequest, config?: CapaConfig | null): Promise<CapaKycVerificationLinkResponse>;
|
|
12
|
+
createKybVerificationLink(userId: string, request: CapaKybVerificationLinkRequest, config?: CapaConfig | null): Promise<CapaKybVerificationLinkResponse>;
|
|
13
|
+
getUserAgreements(userId: string, config?: CapaConfig | null): Promise<CapaAgreement[]>;
|
|
14
|
+
requestDocumentSignature(userId: string, request: CapaDocumentSignRequest, config?: CapaConfig | null): Promise<CapaDocumentSignResponse>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=capa-users.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa-users.service.d.ts","sourceRoot":"","sources":["../../src/services/capa-users.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,aAAa,EAEb,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,qBACa,gBAAiB,SAAQ,eAAe;gBAEjD,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,SAAS;IASb,UAAU,CACd,OAAO,EAAE,qBAAqB,EAC9B,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,QAAQ,CAAC;IAcd,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,oBAAoB,EAC7B,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,IAAI,CAAC;IAaV,yBAAyB,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,8BAA8B,EACvC,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,+BAA+B,CAAC;IAcrC,yBAAyB,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,8BAA8B,EACvC,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,+BAA+B,CAAC;IAcrC,iBAAiB,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,aAAa,EAAE,CAAC;IAcrB,wBAAwB,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,EAChC,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,wBAAwB,CAAC;CASrC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.CapaUsersService = void 0;
|
|
13
|
+
const axios_1 = require("@nestjs/axios");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const core_1 = require("@venturialstd/core");
|
|
16
|
+
const capa_client_1 = require("../clients/capa.client");
|
|
17
|
+
const capa_base_service_1 = require("./capa-base.service");
|
|
18
|
+
const capa_base_constant_1 = require("../constants/capa-base.constant");
|
|
19
|
+
let CapaUsersService = class CapaUsersService extends capa_base_service_1.CapaBaseService {
|
|
20
|
+
constructor(httpService, capaClient, logger) {
|
|
21
|
+
super(httpService, capaClient, logger);
|
|
22
|
+
}
|
|
23
|
+
async createUser(request, config = null) {
|
|
24
|
+
const response = await this.makeApiCall('/users', capa_base_constant_1.CapaBaseMethod.POST, request, config);
|
|
25
|
+
return response.data;
|
|
26
|
+
}
|
|
27
|
+
async createUserKyc(userId, request, config = null) {
|
|
28
|
+
await this.makeApiCall(`/users/${userId}/kyc`, capa_base_constant_1.CapaBaseMethod.POST, request, config);
|
|
29
|
+
}
|
|
30
|
+
async createKycVerificationLink(userId, request, config = null) {
|
|
31
|
+
const response = await this.makeApiCall(`/users/${userId}/kyc/verification-link`, capa_base_constant_1.CapaBaseMethod.POST, request, config);
|
|
32
|
+
return response.data;
|
|
33
|
+
}
|
|
34
|
+
async createKybVerificationLink(userId, request, config = null) {
|
|
35
|
+
const response = await this.makeApiCall(`/users/${userId}/kyb/verification-link`, capa_base_constant_1.CapaBaseMethod.POST, request, config);
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
async getUserAgreements(userId, config = null) {
|
|
39
|
+
const response = await this.makeApiCall(`/users/${userId}/agreements`, capa_base_constant_1.CapaBaseMethod.GET, undefined, config);
|
|
40
|
+
return response.data;
|
|
41
|
+
}
|
|
42
|
+
async requestDocumentSignature(userId, request, config = null) {
|
|
43
|
+
const response = await this.makeApiCall(`/users/${userId}/documents/sign`, capa_base_constant_1.CapaBaseMethod.POST, request, config);
|
|
44
|
+
return response.data;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.CapaUsersService = CapaUsersService;
|
|
48
|
+
exports.CapaUsersService = CapaUsersService = __decorate([
|
|
49
|
+
(0, common_1.Injectable)(),
|
|
50
|
+
__metadata("design:paramtypes", [axios_1.HttpService,
|
|
51
|
+
capa_client_1.CapaClient,
|
|
52
|
+
core_1.AppLogger])
|
|
53
|
+
], CapaUsersService);
|
|
54
|
+
//# sourceMappingURL=capa-users.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa-users.service.js","sourceRoot":"","sources":["../../src/services/capa-users.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA4C;AAC5C,2CAA4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,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CACrC,UAAU,MAAM,aAAa,EAC7B,mCAAc,CAAC,GAAG,EAClB,SAAS,EACT,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAMD,KAAK,CAAC,wBAAwB,CAC5B,MAAc,EACd,OAAgC,EAChC,SAA4B,IAAI;QAEhC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CACrC,UAAU,MAAM,iBAAiB,EACjC,mCAAc,CAAC,IAAI,EACnB,OAAO,EACP,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAA;AAjHY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAGI,mBAAW;QACZ,wBAAU;QACd,gBAAS;GAJR,gBAAgB,CAiH5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpService } from '@nestjs/axios';
|
|
2
|
+
import { AppLogger } from '@venturialstd/core';
|
|
3
|
+
import { CapaClient } from '../clients/capa.client';
|
|
4
|
+
import { CapaBaseService } from './capa-base.service';
|
|
5
|
+
import { CapaUpdateWebhookSettingsRequest, CapaWebhookSettings } from '../types/capa-api.types';
|
|
6
|
+
import { CapaConfig } from '../types/capa.config.type';
|
|
7
|
+
export declare class CapaWebhookSettingsService extends CapaBaseService {
|
|
8
|
+
constructor(httpService: HttpService, capaClient: CapaClient, logger: AppLogger);
|
|
9
|
+
updateWebhookSettings(request: CapaUpdateWebhookSettingsRequest, config?: CapaConfig | null): Promise<CapaWebhookSettings>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=capa-webhook-settings.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa-webhook-settings.service.d.ts","sourceRoot":"","sources":["../../src/services/capa-webhook-settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAEL,gCAAgC,EAChC,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,qBACa,0BAA2B,SAAQ,eAAe;gBAE3D,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,SAAS;IASb,qBAAqB,CACzB,OAAO,EAAE,gCAAgC,EACzC,MAAM,GAAE,UAAU,GAAG,IAAW,GAC/B,OAAO,CAAC,mBAAmB,CAAC;CAShC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.CapaWebhookSettingsService = void 0;
|
|
13
|
+
const axios_1 = require("@nestjs/axios");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const core_1 = require("@venturialstd/core");
|
|
16
|
+
const capa_base_constant_1 = require("../constants/capa-base.constant");
|
|
17
|
+
const capa_client_1 = require("../clients/capa.client");
|
|
18
|
+
const capa_base_service_1 = require("./capa-base.service");
|
|
19
|
+
let CapaWebhookSettingsService = class CapaWebhookSettingsService extends capa_base_service_1.CapaBaseService {
|
|
20
|
+
constructor(httpService, capaClient, logger) {
|
|
21
|
+
super(httpService, capaClient, logger);
|
|
22
|
+
}
|
|
23
|
+
async updateWebhookSettings(request, config = null) {
|
|
24
|
+
const response = await this.makeApiCall('/webhook-settings', capa_base_constant_1.CapaBaseMethod.PUT, request, config);
|
|
25
|
+
return response.data;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.CapaWebhookSettingsService = CapaWebhookSettingsService;
|
|
29
|
+
exports.CapaWebhookSettingsService = CapaWebhookSettingsService = __decorate([
|
|
30
|
+
(0, common_1.Injectable)(),
|
|
31
|
+
__metadata("design:paramtypes", [axios_1.HttpService,
|
|
32
|
+
capa_client_1.CapaClient,
|
|
33
|
+
core_1.AppLogger])
|
|
34
|
+
], CapaWebhookSettingsService);
|
|
35
|
+
//# sourceMappingURL=capa-webhook-settings.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa-webhook-settings.service.js","sourceRoot":"","sources":["../../src/services/capa-webhook-settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA4C;AAC5C,2CAA4C;AAC5C,6CAA+C;AAE/C,wEAAiE;AACjE,wDAAoD;AACpD,2DAAsD;AAS/C,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,mCAAe;IAC7D,YACE,WAAwB,EACxB,UAAsB,EACtB,MAAiB;QAEjB,KAAK,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAMD,KAAK,CAAC,qBAAqB,CACzB,OAAyC,EACzC,SAA4B,IAAI;QAEhC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CACrC,mBAAmB,EACnB,mCAAc,CAAC,GAAG,EAClB,OAAO,EACP,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAA;AAzBY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAGI,mBAAW;QACZ,wBAAU;QACd,gBAAS;GAJR,0BAA0B,CAyBtC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './capa-base.service';
|
|
2
|
+
export * from './capa-quotes.service';
|
|
3
|
+
export * from './capa-receivers.service';
|
|
4
|
+
export * from './capa-users.service';
|
|
5
|
+
export * from './capa-transactions.service';
|
|
6
|
+
export * from './capa-on-ramp.service';
|
|
7
|
+
export * from './capa-off-ramp.service';
|
|
8
|
+
export * from './capa-cross-ramp.service';
|
|
9
|
+
export * from './capa-kyc.service';
|
|
10
|
+
export * from './capa-kyb.service';
|
|
11
|
+
export * from './capa-webhook-settings.service';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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("./capa-base.service"), exports);
|
|
18
|
+
__exportStar(require("./capa-quotes.service"), exports);
|
|
19
|
+
__exportStar(require("./capa-receivers.service"), exports);
|
|
20
|
+
__exportStar(require("./capa-users.service"), exports);
|
|
21
|
+
__exportStar(require("./capa-transactions.service"), exports);
|
|
22
|
+
__exportStar(require("./capa-on-ramp.service"), exports);
|
|
23
|
+
__exportStar(require("./capa-off-ramp.service"), exports);
|
|
24
|
+
__exportStar(require("./capa-cross-ramp.service"), exports);
|
|
25
|
+
__exportStar(require("./capa-kyc.service"), exports);
|
|
26
|
+
__exportStar(require("./capa-kyb.service"), exports);
|
|
27
|
+
__exportStar(require("./capa-webhook-settings.service"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,wDAAsC;AACtC,2DAAyC;AACzC,uDAAqC;AACrC,8DAA4C;AAC5C,yDAAuC;AACvC,0DAAwC;AACxC,4DAA0C;AAC1C,qDAAmC;AACnC,qDAAmC;AACnC,kEAAgD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa.settings.d.ts","sourceRoot":"","sources":["../../src/settings/capa.settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,MAAM,oBAAoB,CAAC;AAI7D,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,CAAC,EAwCtE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SETTINGS = void 0;
|
|
4
|
+
const core_1 = require("@venturialstd/core");
|
|
5
|
+
const capa_constant_1 = require("../constants/capa.constant");
|
|
6
|
+
exports.SETTINGS = [
|
|
7
|
+
{
|
|
8
|
+
scope: 'GLOBAL',
|
|
9
|
+
module: 'CAPA',
|
|
10
|
+
section: 'GENERAL',
|
|
11
|
+
key: 'PARTNER_API_KEY',
|
|
12
|
+
label: 'Capa Partner API Key',
|
|
13
|
+
description: 'API key for the Capa Partner API v2. Required for all API requests.',
|
|
14
|
+
type: core_1.SETTINGS_TYPE.SECRET,
|
|
15
|
+
value: '',
|
|
16
|
+
options: null,
|
|
17
|
+
sortOrder: 1,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
scope: 'GLOBAL',
|
|
21
|
+
module: 'CAPA',
|
|
22
|
+
section: 'GENERAL',
|
|
23
|
+
key: 'BASE_URL',
|
|
24
|
+
label: 'Capa Base URL',
|
|
25
|
+
description: 'Base URL for the Capa API. Leave empty to use environment-based defaults.',
|
|
26
|
+
type: core_1.SETTINGS_TYPE.TEXT,
|
|
27
|
+
value: '',
|
|
28
|
+
options: null,
|
|
29
|
+
sortOrder: 2,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
scope: 'GLOBAL',
|
|
33
|
+
module: 'CAPA',
|
|
34
|
+
section: 'GENERAL',
|
|
35
|
+
key: 'ENVIRONMENT',
|
|
36
|
+
label: 'Capa Environment',
|
|
37
|
+
description: 'Environment to use for Capa API (staging or production). Defaults to staging if not set.',
|
|
38
|
+
type: core_1.SETTINGS_TYPE.SELECT,
|
|
39
|
+
value: capa_constant_1.CapaEnvironment.STAGING,
|
|
40
|
+
options: [
|
|
41
|
+
{ label: 'Staging', value: capa_constant_1.CapaEnvironment.STAGING },
|
|
42
|
+
{ label: 'Production', value: capa_constant_1.CapaEnvironment.PRODUCTION },
|
|
43
|
+
],
|
|
44
|
+
sortOrder: 3,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
//# sourceMappingURL=capa.settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capa.settings.js","sourceRoot":"","sources":["../../src/settings/capa.settings.ts"],"names":[],"mappings":";;;AAAA,6CAA6D;AAE7D,8DAA6D;AAEhD,QAAA,QAAQ,GAAuD;IAC1E;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,iBAAiB;QACtB,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,qEAAqE;QAClF,IAAI,EAAE,oBAAa,CAAC,MAAM;QAC1B,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC;KACb;IACD;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,2EAA2E;QACxF,IAAI,EAAE,oBAAa,CAAC,IAAI;QACxB,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC;KACb;IACD;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,aAAa;QAClB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,0FAA0F;QACvG,IAAI,EAAE,oBAAa,CAAC,MAAM;QAC1B,KAAK,EAAE,+BAAe,CAAC,OAAO;QAC9B,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,+BAAe,CAAC,OAAO,EAAE;YACpD,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,+BAAe,CAAC,UAAU,EAAE;SAC3D;QACD,SAAS,EAAE,CAAC;KACb;CACF,CAAC"}
|