@blockchyp/blockchyp-ts 1.0.0 → 2.18.5

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.
Files changed (222) hide show
  1. package/README.md +4 -9
  2. package/_bundles/blockchyp.js +71402 -0
  3. package/_bundles/blockchyp.js.map +1 -0
  4. package/_bundles/blockchyp.min.js +3 -0
  5. package/_bundles/blockchyp.min.js.LICENSE.txt +16 -0
  6. package/_bundles/blockchyp.min.js.map +1 -0
  7. package/lib/index.d.ts +3 -0
  8. package/{index.js → lib/index.js} +1 -0
  9. package/lib/index.js.map +1 -0
  10. package/lib/spec/CryptoSpec.d.ts +1 -0
  11. package/{spec → lib/spec}/CryptoSpec.js +1 -0
  12. package/lib/spec/CryptoSpec.js.map +1 -0
  13. package/lib/spec/SanitySpec.d.ts +1 -0
  14. package/{spec → lib/spec}/SanitySpec.js +2 -1
  15. package/lib/spec/SanitySpec.js.map +1 -0
  16. package/lib/src/client.d.ts +463 -0
  17. package/{src → lib/src}/client.js +2 -1
  18. package/lib/src/client.js.map +1 -0
  19. package/lib/src/cryptoutils.d.ts +16 -0
  20. package/{src → lib/src}/cryptoutils.js +18 -13
  21. package/lib/src/cryptoutils.js.map +1 -0
  22. package/lib/src/global.d.ts +1 -0
  23. package/lib/src/global.js +30 -0
  24. package/lib/src/global.js.map +1 -0
  25. package/lib/src/models.d.ts +9587 -0
  26. package/{src → lib/src}/models.js +1 -0
  27. package/lib/src/models.js.map +1 -0
  28. package/package.json +23 -9
  29. package/spec/SanitySpec.ts +1 -1
  30. package/src/client.ts +1 -2
  31. package/src/cryptoutils.ts +7 -6
  32. package/src/global.ts +1 -1
  33. package/itest/ActivateTerminalITestSpec.js +0 -87
  34. package/itest/ActivateTerminalITestSpec.ts +0 -58
  35. package/itest/AddTestMerchantITestSpec.js +0 -89
  36. package/itest/AddTestMerchantITestSpec.ts +0 -60
  37. package/itest/BatchHistoryITestSpec.js +0 -101
  38. package/itest/BatchHistoryITestSpec.ts +0 -73
  39. package/itest/BooleanPromptITestSpec.js +0 -104
  40. package/itest/BooleanPromptITestSpec.ts +0 -76
  41. package/itest/CancelPaymentLinkITestSpec.js +0 -116
  42. package/itest/CancelPaymentLinkITestSpec.ts +0 -93
  43. package/itest/CaptureSignatureITestSpec.js +0 -101
  44. package/itest/CaptureSignatureITestSpec.ts +0 -73
  45. package/itest/DeactivateTerminalITestSpec.js +0 -82
  46. package/itest/DeactivateTerminalITestSpec.ts +0 -52
  47. package/itest/DeleteBrandingAssetITestSpec.js +0 -96
  48. package/itest/DeleteBrandingAssetITestSpec.ts +0 -69
  49. package/itest/DeleteCustomerITestSpec.js +0 -102
  50. package/itest/DeleteCustomerITestSpec.ts +0 -75
  51. package/itest/DeleteMediaAssetITestSpec.js +0 -100
  52. package/itest/DeleteMediaAssetITestSpec.ts +0 -71
  53. package/itest/DeleteQueuedTransactionITestSpec.js +0 -117
  54. package/itest/DeleteQueuedTransactionITestSpec.ts +0 -89
  55. package/itest/DeleteSlideShowITestSpec.js +0 -96
  56. package/itest/DeleteSlideShowITestSpec.ts +0 -69
  57. package/itest/DeleteSurveyQuestionITestSpec.js +0 -97
  58. package/itest/DeleteSurveyQuestionITestSpec.ts +0 -70
  59. package/itest/DeleteTestMerchantITestSpec.js +0 -96
  60. package/itest/DeleteTestMerchantITestSpec.ts +0 -69
  61. package/itest/DeleteTokenITestSpec.js +0 -102
  62. package/itest/DeleteTokenITestSpec.ts +0 -75
  63. package/itest/EmptyBrandingAssetITestSpec.js +0 -85
  64. package/itest/EmptyBrandingAssetITestSpec.ts +0 -57
  65. package/itest/EmptySlideShowITestSpec.js +0 -87
  66. package/itest/EmptySlideShowITestSpec.ts +0 -58
  67. package/itest/GatewayTimeoutITestSpec.js +0 -103
  68. package/itest/GatewayTimeoutITestSpec.ts +0 -73
  69. package/itest/GetCustomerITestSpec.js +0 -102
  70. package/itest/GetCustomerITestSpec.ts +0 -75
  71. package/itest/GetMerchantsITestSpec.js +0 -84
  72. package/itest/GetMerchantsITestSpec.ts +0 -56
  73. package/itest/InviteMerchantUserITestSpec.js +0 -86
  74. package/itest/InviteMerchantUserITestSpec.ts +0 -58
  75. package/itest/LinkTokenITestSpec.js +0 -103
  76. package/itest/LinkTokenITestSpec.ts +0 -76
  77. package/itest/ListQueuedTransactionsITestSpec.js +0 -116
  78. package/itest/ListQueuedTransactionsITestSpec.ts +0 -88
  79. package/itest/ListTerminalsITestSpec.js +0 -83
  80. package/itest/ListTerminalsITestSpec.ts +0 -56
  81. package/itest/MediaAssetITestSpec.js +0 -105
  82. package/itest/MediaAssetITestSpec.ts +0 -75
  83. package/itest/MediaITestSpec.js +0 -83
  84. package/itest/MediaITestSpec.ts +0 -56
  85. package/itest/MediaUploadITestSpec.js +0 -94
  86. package/itest/MediaUploadITestSpec.ts +0 -63
  87. package/itest/MerchantCredentialGenerationITestSpec.js +0 -85
  88. package/itest/MerchantCredentialGenerationITestSpec.ts +0 -57
  89. package/itest/MerchantInvoiceDetailITestSpec.js +0 -84
  90. package/itest/MerchantInvoiceDetailITestSpec.ts +0 -56
  91. package/itest/MerchantInvoicesITestSpec.js +0 -84
  92. package/itest/MerchantInvoicesITestSpec.ts +0 -56
  93. package/itest/MerchantPlatformsITestSpec.js +0 -96
  94. package/itest/MerchantPlatformsITestSpec.ts +0 -69
  95. package/itest/MerchantProfileITestSpec.js +0 -84
  96. package/itest/MerchantProfileITestSpec.ts +0 -56
  97. package/itest/MerchantUsersITestSpec.js +0 -83
  98. package/itest/MerchantUsersITestSpec.ts +0 -56
  99. package/itest/NewTransactionDisplayITestSpec.js +0 -115
  100. package/itest/NewTransactionDisplayITestSpec.ts +0 -92
  101. package/itest/PANChargeITestSpec.js +0 -118
  102. package/itest/PANChargeITestSpec.ts +0 -88
  103. package/itest/PANEnrollITestSpec.js +0 -118
  104. package/itest/PANEnrollITestSpec.ts +0 -90
  105. package/itest/PANPreauthITestSpec.js +0 -116
  106. package/itest/PANPreauthITestSpec.ts +0 -87
  107. package/itest/PartialRefundITestSpec.js +0 -119
  108. package/itest/PartialRefundITestSpec.ts +0 -91
  109. package/itest/PartnerCommissionBreakdownITestSpec.js +0 -84
  110. package/itest/PartnerCommissionBreakdownITestSpec.ts +0 -56
  111. package/itest/PartnerStatementDetailITestSpec.js +0 -84
  112. package/itest/PartnerStatementDetailITestSpec.ts +0 -56
  113. package/itest/PartnerStatementsITestSpec.js +0 -84
  114. package/itest/PartnerStatementsITestSpec.ts +0 -56
  115. package/itest/PaymentLinkStatusITestSpec.js +0 -116
  116. package/itest/PaymentLinkStatusITestSpec.ts +0 -93
  117. package/itest/PricingPolicyITestSpec.js +0 -85
  118. package/itest/PricingPolicyITestSpec.ts +0 -57
  119. package/itest/ResendPaymentLinkITestSpec.js +0 -116
  120. package/itest/ResendPaymentLinkITestSpec.ts +0 -93
  121. package/itest/SearchCustomerITestSpec.js +0 -101
  122. package/itest/SearchCustomerITestSpec.ts +0 -75
  123. package/itest/SendPaymentLinkITestSpec.js +0 -107
  124. package/itest/SendPaymentLinkITestSpec.ts +0 -82
  125. package/itest/SimpleBatchCloseITestSpec.js +0 -101
  126. package/itest/SimpleBatchCloseITestSpec.ts +0 -73
  127. package/itest/SimpleCaptureITestSpec.js +0 -101
  128. package/itest/SimpleCaptureITestSpec.ts +0 -74
  129. package/itest/SimpleGiftActivateITestSpec.js +0 -104
  130. package/itest/SimpleGiftActivateITestSpec.ts +0 -75
  131. package/itest/SimpleLocateITestSpec.js +0 -85
  132. package/itest/SimpleLocateITestSpec.ts +0 -57
  133. package/itest/SimpleMessageITestSpec.js +0 -101
  134. package/itest/SimpleMessageITestSpec.ts +0 -73
  135. package/itest/SimplePingITestSpec.js +0 -100
  136. package/itest/SimplePingITestSpec.ts +0 -72
  137. package/itest/SimpleRefundITestSpec.js +0 -118
  138. package/itest/SimpleRefundITestSpec.ts +0 -90
  139. package/itest/SimpleReversalITestSpec.js +0 -103
  140. package/itest/SimpleReversalITestSpec.ts +0 -75
  141. package/itest/SimpleVoidITestSpec.js +0 -103
  142. package/itest/SimpleVoidITestSpec.ts +0 -75
  143. package/itest/SlideShowITestSpec.js +0 -98
  144. package/itest/SlideShowITestSpec.ts +0 -70
  145. package/itest/SlideShowsITestSpec.js +0 -95
  146. package/itest/SlideShowsITestSpec.ts +0 -69
  147. package/itest/SurveyQuestionITestSpec.js +0 -95
  148. package/itest/SurveyQuestionITestSpec.ts +0 -68
  149. package/itest/SurveyQuestionsITestSpec.js +0 -96
  150. package/itest/SurveyQuestionsITestSpec.ts +0 -70
  151. package/itest/SurveyResultsITestSpec.js +0 -95
  152. package/itest/SurveyResultsITestSpec.ts +0 -68
  153. package/itest/TCDeleteTemplateITestSpec.js +0 -98
  154. package/itest/TCDeleteTemplateITestSpec.ts +0 -70
  155. package/itest/TCEntryITestSpec.js +0 -103
  156. package/itest/TCEntryITestSpec.ts +0 -76
  157. package/itest/TCLogITestSpec.js +0 -83
  158. package/itest/TCLogITestSpec.ts +0 -56
  159. package/itest/TCTemplateITestSpec.js +0 -101
  160. package/itest/TCTemplateITestSpec.ts +0 -72
  161. package/itest/TCTemplateUpdateITestSpec.js +0 -91
  162. package/itest/TCTemplateUpdateITestSpec.ts +0 -61
  163. package/itest/TCTemplatesITestSpec.js +0 -83
  164. package/itest/TCTemplatesITestSpec.ts +0 -56
  165. package/itest/TerminalBrandingITestSpec.js +0 -83
  166. package/itest/TerminalBrandingITestSpec.ts +0 -56
  167. package/itest/TerminalChargeITestSpec.js +0 -113
  168. package/itest/TerminalChargeITestSpec.ts +0 -84
  169. package/itest/TerminalClearITestSpec.js +0 -100
  170. package/itest/TerminalClearITestSpec.ts +0 -72
  171. package/itest/TerminalEBTBalanceITestSpec.js +0 -103
  172. package/itest/TerminalEBTBalanceITestSpec.ts +0 -74
  173. package/itest/TerminalEBTChargeITestSpec.js +0 -115
  174. package/itest/TerminalEBTChargeITestSpec.ts +0 -86
  175. package/itest/TerminalEnrollITestSpec.js +0 -112
  176. package/itest/TerminalEnrollITestSpec.ts +0 -83
  177. package/itest/TerminalGiftCardBalanceITestSpec.js +0 -102
  178. package/itest/TerminalGiftCardBalanceITestSpec.ts +0 -73
  179. package/itest/TerminalKeyedChargeITestSpec.js +0 -114
  180. package/itest/TerminalKeyedChargeITestSpec.ts +0 -85
  181. package/itest/TerminalManualEBTChargeITestSpec.js +0 -116
  182. package/itest/TerminalManualEBTChargeITestSpec.ts +0 -87
  183. package/itest/TerminalPreauthITestSpec.js +0 -113
  184. package/itest/TerminalPreauthITestSpec.ts +0 -84
  185. package/itest/TerminalQueuedTransactionITestSpec.js +0 -108
  186. package/itest/TerminalQueuedTransactionITestSpec.ts +0 -78
  187. package/itest/TerminalStatusITestSpec.js +0 -100
  188. package/itest/TerminalStatusITestSpec.ts +0 -72
  189. package/itest/TerminalTimeoutITestSpec.js +0 -99
  190. package/itest/TerminalTimeoutITestSpec.ts +0 -70
  191. package/itest/TermsAndConditionsITestSpec.js +0 -105
  192. package/itest/TermsAndConditionsITestSpec.ts +0 -77
  193. package/itest/TextPromptITestSpec.js +0 -103
  194. package/itest/TextPromptITestSpec.ts +0 -74
  195. package/itest/TokenMetadataITestSpec.js +0 -102
  196. package/itest/TokenMetadataITestSpec.ts +0 -75
  197. package/itest/TransactionHistoryITestSpec.js +0 -101
  198. package/itest/TransactionHistoryITestSpec.ts +0 -73
  199. package/itest/UnlinkTokenITestSpec.js +0 -103
  200. package/itest/UnlinkTokenITestSpec.ts +0 -76
  201. package/itest/UpdateBrandingAssetITestSpec.js +0 -109
  202. package/itest/UpdateBrandingAssetITestSpec.ts +0 -80
  203. package/itest/UpdateCustomerITestSpec.js +0 -90
  204. package/itest/UpdateCustomerITestSpec.ts +0 -63
  205. package/itest/UpdateMerchantITestSpec.js +0 -92
  206. package/itest/UpdateMerchantITestSpec.ts +0 -65
  207. package/itest/UpdateMerchantPlatformsITestSpec.js +0 -98
  208. package/itest/UpdateMerchantPlatformsITestSpec.ts +0 -71
  209. package/itest/UpdateSlideShowITestSpec.js +0 -106
  210. package/itest/UpdateSlideShowITestSpec.ts +0 -78
  211. package/itest/UpdateSurveyQuestionITestSpec.js +0 -89
  212. package/itest/UpdateSurveyQuestionITestSpec.ts +0 -60
  213. package/itest/UpdateTransactionDisplayITestSpec.js +0 -115
  214. package/itest/UpdateTransactionDisplayITestSpec.ts +0 -92
  215. package/itest/UploadStatusITestSpec.js +0 -100
  216. package/itest/UploadStatusITestSpec.ts +0 -71
  217. package/itest/support/aviato.png +0 -0
  218. package/itest/support/config.js +0 -67
  219. package/itest/support/config.ts +0 -106
  220. package/itest/support/jasmine.json +0 -11
  221. package/spec/support/jasmine.json +0 -11
  222. package/src/global.js +0 -9
@@ -1,56 +0,0 @@
1
- /**
2
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
3
- * by a license that can be found in the LICENSE file.
4
- *
5
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
6
- * file will be lost every time the code is regenerated.
7
- */
8
-
9
- import { v4 as uuidv4 } from 'uuid';
10
- import { Config } from './support/config';
11
- import * as BlockChyp from '../index';
12
-
13
- describe('TCLog', function () {
14
- let originalTimeout: number;
15
- let client: typeof BlockChyp.BlockChypClient;
16
- Config.load();
17
-
18
- beforeEach(function () {
19
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
20
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
21
- });
22
-
23
- it('returns Terms and Conditions log entries.', function (done) {
24
- client = BlockChyp.newClient(Config.getCreds(""));
25
- client.setGatewayHost(Config.getGatewayHost());
26
- client.setTestGatewayHost(Config.getTestGatewayHost());
27
- client.setDashboardHost(Config.getDashboardHost());
28
-
29
- const testDelay = process.env.BC_TEST_DELAY;
30
- let testDelayInt = 0;
31
- if (testDelay) {
32
- testDelayInt = parseInt(testDelay);
33
- }
34
-
35
- console.log('Running tcLog...');
36
-
37
- setTimeout(async function () {
38
- try {
39
- // setup request object
40
- const request = new BlockChyp.TermsAndConditionsLogRequest();
41
-
42
-
43
- const httpResponse = await client.tcLog(request)
44
- const response: BlockChyp.TermsAndConditionsLogResponse = httpResponse.data;
45
- // response assertions
46
- expect(response.success).toBe(true);
47
-
48
- } catch (error) {
49
- console.log('Error:', error);
50
- fail(error);
51
- } finally {
52
- done();
53
- }
54
- }, testDelayInt * 1000);
55
- });
56
- });
@@ -1,101 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
4
- * by a license that can be found in the LICENSE file.
5
- *
6
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
7
- * file will be lost every time the code is regenerated.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
- return new (P || (P = Promise))(function (resolve, reject) {
35
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
- step((generator = generator.apply(thisArg, _arguments || [])).next());
39
- });
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- const uuid_1 = require("uuid");
43
- const config_1 = require("./support/config");
44
- const BlockChyp = __importStar(require("../index"));
45
- describe('TCTemplate', function () {
46
- let originalTimeout;
47
- let client;
48
- config_1.Config.load();
49
- beforeEach(function () {
50
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
51
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
52
- });
53
- it('returns a single terms and conditions template.', function (done) {
54
- client = BlockChyp.newClient(config_1.Config.getCreds(""));
55
- client.setGatewayHost(config_1.Config.getGatewayHost());
56
- client.setTestGatewayHost(config_1.Config.getTestGatewayHost());
57
- client.setDashboardHost(config_1.Config.getDashboardHost());
58
- const testDelay = process.env.BC_TEST_DELAY;
59
- let testDelayInt = 0;
60
- if (testDelay) {
61
- testDelayInt = parseInt(testDelay);
62
- }
63
- console.log('Running tcTemplate...');
64
- setTimeout(function () {
65
- return __awaiter(this, void 0, void 0, function* () {
66
- var _a, _b;
67
- try {
68
- // setup request object
69
- const setupRequest = new BlockChyp.TermsAndConditionsTemplate();
70
- setupRequest.alias = (0, uuid_1.v4)();
71
- setupRequest.name = 'HIPPA Disclosure';
72
- setupRequest.content = 'Lorem ipsum dolor sit amet.';
73
- let setupResponse = new BlockChyp.TermsAndConditionsTemplate();
74
- const setupHttpResponse = yield client.tcUpdateTemplate(setupRequest);
75
- if (setupHttpResponse.status !== 200) {
76
- console.log('Error:', setupHttpResponse.statusText);
77
- fail(setupHttpResponse.statusText);
78
- done();
79
- }
80
- setupResponse = setupHttpResponse.data;
81
- // setup request object
82
- const request = new BlockChyp.TermsAndConditionsTemplateRequest();
83
- request.templateId = setupResponse.id;
84
- const httpResponse = yield client.tcTemplate(request);
85
- const response = httpResponse.data;
86
- // response assertions
87
- expect(response.success).toBe(true);
88
- (_a = expect(response.name)) === null || _a === void 0 ? void 0 : _a.toEqual('HIPPA Disclosure');
89
- (_b = expect(response.content)) === null || _b === void 0 ? void 0 : _b.toEqual('Lorem ipsum dolor sit amet.');
90
- }
91
- catch (error) {
92
- console.log('Error:', error);
93
- fail(error);
94
- }
95
- finally {
96
- done();
97
- }
98
- });
99
- }, testDelayInt * 1000);
100
- });
101
- });
@@ -1,72 +0,0 @@
1
- /**
2
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
3
- * by a license that can be found in the LICENSE file.
4
- *
5
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
6
- * file will be lost every time the code is regenerated.
7
- */
8
-
9
- import { v4 as uuidv4 } from 'uuid';
10
- import { Config } from './support/config';
11
- import * as BlockChyp from '../index';
12
-
13
- describe('TCTemplate', function () {
14
- let originalTimeout: number;
15
- let client: typeof BlockChyp.BlockChypClient;
16
- Config.load();
17
-
18
- beforeEach(function () {
19
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
20
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
21
- });
22
-
23
- it('returns a single terms and conditions template.', function (done) {
24
- client = BlockChyp.newClient(Config.getCreds(""));
25
- client.setGatewayHost(Config.getGatewayHost());
26
- client.setTestGatewayHost(Config.getTestGatewayHost());
27
- client.setDashboardHost(Config.getDashboardHost());
28
-
29
- const testDelay = process.env.BC_TEST_DELAY;
30
- let testDelayInt = 0;
31
- if (testDelay) {
32
- testDelayInt = parseInt(testDelay);
33
- }
34
-
35
- console.log('Running tcTemplate...');
36
-
37
- setTimeout(async function () {
38
- try {
39
- // setup request object
40
- const setupRequest = new BlockChyp.TermsAndConditionsTemplate();
41
- setupRequest.alias = uuidv4();
42
- setupRequest.name = 'HIPPA Disclosure';
43
- setupRequest.content = 'Lorem ipsum dolor sit amet.';
44
- let setupResponse: BlockChyp.TermsAndConditionsTemplate = new BlockChyp.TermsAndConditionsTemplate();
45
- const setupHttpResponse = await client.tcUpdateTemplate(setupRequest);
46
- if (setupHttpResponse.status !== 200) {
47
- console.log('Error:', setupHttpResponse.statusText);
48
- fail(setupHttpResponse.statusText);
49
- done();
50
- }
51
- setupResponse = setupHttpResponse.data
52
-
53
- // setup request object
54
- const request = new BlockChyp.TermsAndConditionsTemplateRequest();
55
- request.templateId = setupResponse.id;
56
-
57
- const httpResponse = await client.tcTemplate(request)
58
- const response: BlockChyp.TermsAndConditionsTemplate = httpResponse.data;
59
- // response assertions
60
- expect(response.success).toBe(true);
61
- expect(response.name)?.toEqual('HIPPA Disclosure');
62
- expect(response.content)?.toEqual('Lorem ipsum dolor sit amet.');
63
-
64
- } catch (error) {
65
- console.log('Error:', error);
66
- fail(error);
67
- } finally {
68
- done();
69
- }
70
- }, testDelayInt * 1000);
71
- });
72
- });
@@ -1,91 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
4
- * by a license that can be found in the LICENSE file.
5
- *
6
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
7
- * file will be lost every time the code is regenerated.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
- return new (P || (P = Promise))(function (resolve, reject) {
35
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
- step((generator = generator.apply(thisArg, _arguments || [])).next());
39
- });
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- const uuid_1 = require("uuid");
43
- const config_1 = require("./support/config");
44
- const BlockChyp = __importStar(require("../index"));
45
- describe('TCTemplateUpdate', function () {
46
- let originalTimeout;
47
- let client;
48
- config_1.Config.load();
49
- beforeEach(function () {
50
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
51
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
52
- });
53
- it('updates a terms and conditions template.', function (done) {
54
- client = BlockChyp.newClient(config_1.Config.getCreds(""));
55
- client.setGatewayHost(config_1.Config.getGatewayHost());
56
- client.setTestGatewayHost(config_1.Config.getTestGatewayHost());
57
- client.setDashboardHost(config_1.Config.getDashboardHost());
58
- const testDelay = process.env.BC_TEST_DELAY;
59
- let testDelayInt = 0;
60
- if (testDelay) {
61
- testDelayInt = parseInt(testDelay);
62
- }
63
- console.log('Running tcTemplateUpdate...');
64
- setTimeout(function () {
65
- return __awaiter(this, void 0, void 0, function* () {
66
- var _a, _b, _c;
67
- try {
68
- // setup request object
69
- const request = new BlockChyp.TermsAndConditionsTemplate();
70
- request.alias = (0, uuid_1.v4)();
71
- request.name = 'HIPPA Disclosure';
72
- request.content = 'Lorem ipsum dolor sit amet.';
73
- const httpResponse = yield client.tcUpdateTemplate(request);
74
- const response = httpResponse.data;
75
- // response assertions
76
- expect(response.success).toBe(true);
77
- expect((_a = response.alias) === null || _a === void 0 ? void 0 : _a.trim().length).toBeGreaterThan(0);
78
- (_b = expect(response.name)) === null || _b === void 0 ? void 0 : _b.toEqual('HIPPA Disclosure');
79
- (_c = expect(response.content)) === null || _c === void 0 ? void 0 : _c.toEqual('Lorem ipsum dolor sit amet.');
80
- }
81
- catch (error) {
82
- console.log('Error:', error);
83
- fail(error);
84
- }
85
- finally {
86
- done();
87
- }
88
- });
89
- }, testDelayInt * 1000);
90
- });
91
- });
@@ -1,61 +0,0 @@
1
- /**
2
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
3
- * by a license that can be found in the LICENSE file.
4
- *
5
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
6
- * file will be lost every time the code is regenerated.
7
- */
8
-
9
- import { v4 as uuidv4 } from 'uuid';
10
- import { Config } from './support/config';
11
- import * as BlockChyp from '../index';
12
-
13
- describe('TCTemplateUpdate', function () {
14
- let originalTimeout: number;
15
- let client: typeof BlockChyp.BlockChypClient;
16
- Config.load();
17
-
18
- beforeEach(function () {
19
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
20
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
21
- });
22
-
23
- it('updates a terms and conditions template.', function (done) {
24
- client = BlockChyp.newClient(Config.getCreds(""));
25
- client.setGatewayHost(Config.getGatewayHost());
26
- client.setTestGatewayHost(Config.getTestGatewayHost());
27
- client.setDashboardHost(Config.getDashboardHost());
28
-
29
- const testDelay = process.env.BC_TEST_DELAY;
30
- let testDelayInt = 0;
31
- if (testDelay) {
32
- testDelayInt = parseInt(testDelay);
33
- }
34
-
35
- console.log('Running tcTemplateUpdate...');
36
-
37
- setTimeout(async function () {
38
- try {
39
- // setup request object
40
- const request = new BlockChyp.TermsAndConditionsTemplate();
41
- request.alias = uuidv4();
42
- request.name = 'HIPPA Disclosure';
43
- request.content = 'Lorem ipsum dolor sit amet.';
44
-
45
- const httpResponse = await client.tcUpdateTemplate(request)
46
- const response: BlockChyp.TermsAndConditionsTemplate = httpResponse.data;
47
- // response assertions
48
- expect(response.success).toBe(true);
49
- expect(response.alias?.trim().length).toBeGreaterThan(0);
50
- expect(response.name)?.toEqual('HIPPA Disclosure');
51
- expect(response.content)?.toEqual('Lorem ipsum dolor sit amet.');
52
-
53
- } catch (error) {
54
- console.log('Error:', error);
55
- fail(error);
56
- } finally {
57
- done();
58
- }
59
- }, testDelayInt * 1000);
60
- });
61
- });
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
4
- * by a license that can be found in the LICENSE file.
5
- *
6
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
7
- * file will be lost every time the code is regenerated.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
- return new (P || (P = Promise))(function (resolve, reject) {
35
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
- step((generator = generator.apply(thisArg, _arguments || [])).next());
39
- });
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- const config_1 = require("./support/config");
43
- const BlockChyp = __importStar(require("../index"));
44
- describe('TCTemplates', function () {
45
- let originalTimeout;
46
- let client;
47
- config_1.Config.load();
48
- beforeEach(function () {
49
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
50
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
51
- });
52
- it('lists all terms and conditions template associated with a merchant account.', function (done) {
53
- client = BlockChyp.newClient(config_1.Config.getCreds(""));
54
- client.setGatewayHost(config_1.Config.getGatewayHost());
55
- client.setTestGatewayHost(config_1.Config.getTestGatewayHost());
56
- client.setDashboardHost(config_1.Config.getDashboardHost());
57
- const testDelay = process.env.BC_TEST_DELAY;
58
- let testDelayInt = 0;
59
- if (testDelay) {
60
- testDelayInt = parseInt(testDelay);
61
- }
62
- console.log('Running tcTemplates...');
63
- setTimeout(function () {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- try {
66
- // setup request object
67
- const request = new BlockChyp.TermsAndConditionsTemplateRequest();
68
- const httpResponse = yield client.tcTemplates(request);
69
- const response = httpResponse.data;
70
- // response assertions
71
- expect(response.success).toBe(true);
72
- }
73
- catch (error) {
74
- console.log('Error:', error);
75
- fail(error);
76
- }
77
- finally {
78
- done();
79
- }
80
- });
81
- }, testDelayInt * 1000);
82
- });
83
- });
@@ -1,56 +0,0 @@
1
- /**
2
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
3
- * by a license that can be found in the LICENSE file.
4
- *
5
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
6
- * file will be lost every time the code is regenerated.
7
- */
8
-
9
- import { v4 as uuidv4 } from 'uuid';
10
- import { Config } from './support/config';
11
- import * as BlockChyp from '../index';
12
-
13
- describe('TCTemplates', function () {
14
- let originalTimeout: number;
15
- let client: typeof BlockChyp.BlockChypClient;
16
- Config.load();
17
-
18
- beforeEach(function () {
19
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
20
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
21
- });
22
-
23
- it('lists all terms and conditions template associated with a merchant account.', function (done) {
24
- client = BlockChyp.newClient(Config.getCreds(""));
25
- client.setGatewayHost(Config.getGatewayHost());
26
- client.setTestGatewayHost(Config.getTestGatewayHost());
27
- client.setDashboardHost(Config.getDashboardHost());
28
-
29
- const testDelay = process.env.BC_TEST_DELAY;
30
- let testDelayInt = 0;
31
- if (testDelay) {
32
- testDelayInt = parseInt(testDelay);
33
- }
34
-
35
- console.log('Running tcTemplates...');
36
-
37
- setTimeout(async function () {
38
- try {
39
- // setup request object
40
- const request = new BlockChyp.TermsAndConditionsTemplateRequest();
41
-
42
-
43
- const httpResponse = await client.tcTemplates(request)
44
- const response: BlockChyp.TermsAndConditionsTemplateResponse = httpResponse.data;
45
- // response assertions
46
- expect(response.success).toBe(true);
47
-
48
- } catch (error) {
49
- console.log('Error:', error);
50
- fail(error);
51
- } finally {
52
- done();
53
- }
54
- }, testDelayInt * 1000);
55
- });
56
- });
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
4
- * by a license that can be found in the LICENSE file.
5
- *
6
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
7
- * file will be lost every time the code is regenerated.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
- return new (P || (P = Promise))(function (resolve, reject) {
35
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
- step((generator = generator.apply(thisArg, _arguments || [])).next());
39
- });
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- const config_1 = require("./support/config");
43
- const BlockChyp = __importStar(require("../index"));
44
- describe('TerminalBranding', function () {
45
- let originalTimeout;
46
- let client;
47
- config_1.Config.load();
48
- beforeEach(function () {
49
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
50
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
51
- });
52
- it('returns the terminal branding stack.', function (done) {
53
- client = BlockChyp.newClient(config_1.Config.getCreds(""));
54
- client.setGatewayHost(config_1.Config.getGatewayHost());
55
- client.setTestGatewayHost(config_1.Config.getTestGatewayHost());
56
- client.setDashboardHost(config_1.Config.getDashboardHost());
57
- const testDelay = process.env.BC_TEST_DELAY;
58
- let testDelayInt = 0;
59
- if (testDelay) {
60
- testDelayInt = parseInt(testDelay);
61
- }
62
- console.log('Running terminalBranding...');
63
- setTimeout(function () {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- try {
66
- // setup request object
67
- const request = new BlockChyp.BrandingAssetRequest();
68
- const httpResponse = yield client.terminalBranding(request);
69
- const response = httpResponse.data;
70
- // response assertions
71
- expect(response.success).toBe(true);
72
- }
73
- catch (error) {
74
- console.log('Error:', error);
75
- fail(error);
76
- }
77
- finally {
78
- done();
79
- }
80
- });
81
- }, testDelayInt * 1000);
82
- });
83
- });
@@ -1,56 +0,0 @@
1
- /**
2
- * Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is governed
3
- * by a license that can be found in the LICENSE file.
4
- *
5
- * This file was generated automatically by the BlockChyp SDK Generator. Changes to this
6
- * file will be lost every time the code is regenerated.
7
- */
8
-
9
- import { v4 as uuidv4 } from 'uuid';
10
- import { Config } from './support/config';
11
- import * as BlockChyp from '../index';
12
-
13
- describe('TerminalBranding', function () {
14
- let originalTimeout: number;
15
- let client: typeof BlockChyp.BlockChypClient;
16
- Config.load();
17
-
18
- beforeEach(function () {
19
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
20
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
21
- });
22
-
23
- it('returns the terminal branding stack.', function (done) {
24
- client = BlockChyp.newClient(Config.getCreds(""));
25
- client.setGatewayHost(Config.getGatewayHost());
26
- client.setTestGatewayHost(Config.getTestGatewayHost());
27
- client.setDashboardHost(Config.getDashboardHost());
28
-
29
- const testDelay = process.env.BC_TEST_DELAY;
30
- let testDelayInt = 0;
31
- if (testDelay) {
32
- testDelayInt = parseInt(testDelay);
33
- }
34
-
35
- console.log('Running terminalBranding...');
36
-
37
- setTimeout(async function () {
38
- try {
39
- // setup request object
40
- const request = new BlockChyp.BrandingAssetRequest();
41
-
42
-
43
- const httpResponse = await client.terminalBranding(request)
44
- const response: BlockChyp.BrandingAssetResponse = httpResponse.data;
45
- // response assertions
46
- expect(response.success).toBe(true);
47
-
48
- } catch (error) {
49
- console.log('Error:', error);
50
- fail(error);
51
- } finally {
52
- done();
53
- }
54
- }, testDelayInt * 1000);
55
- });
56
- });