@flink-app/s3-plugin 0.3.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 (165) hide show
  1. package/.flink/generated-schemas.json +311 -0
  2. package/.flink/generatedHandlers.ts +7 -0
  3. package/.flink/generatedRepos.ts +5 -0
  4. package/.flink/schemas/schemas.json +5 -0
  5. package/.flink/schemas/schemas.ts +1 -0
  6. package/.flink/start.ts +4 -0
  7. package/dist/.flink/generatedHandlers.d.ts +1 -0
  8. package/dist/.flink/generatedHandlers.js +7 -0
  9. package/dist/.flink/generatedRepos.d.ts +1 -0
  10. package/dist/.flink/generatedRepos.js +7 -0
  11. package/dist/.flink/schemas/schemas.d.ts +0 -0
  12. package/dist/.flink/schemas/schemas.js +2 -0
  13. package/dist/.flink/schemas/schemas.json +5 -0
  14. package/dist/.flink/start.d.ts +3 -0
  15. package/dist/.flink/start.js +6 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.js +172 -0
  18. package/dist/s3Client.d.ts +36 -0
  19. package/dist/s3Client.js +233 -0
  20. package/dist/s3PluginContext.d.ts +6 -0
  21. package/dist/s3PluginContext.js +2 -0
  22. package/dist/schemas/ListObjectsResponse.d.ts +5 -0
  23. package/dist/schemas/ListObjectsResponse.js +2 -0
  24. package/dist/schemas/s3ClientOptions.d.ts +7 -0
  25. package/dist/schemas/s3ClientOptions.js +2 -0
  26. package/dist/schemas/s3PluginOptions.d.ts +11 -0
  27. package/dist/schemas/s3PluginOptions.js +2 -0
  28. package/dist/src/Ctx.d.ts +19 -0
  29. package/dist/src/Ctx.js +2 -0
  30. package/dist/src/handlers/HandlebarsTemplateHandler.d.ts +5 -0
  31. package/dist/src/handlers/HandlebarsTemplateHandler.js +63 -0
  32. package/dist/src/handlers/Management/Get.d.ts +7 -0
  33. package/dist/src/handlers/Management/Get.js +53 -0
  34. package/dist/src/handlers/Management/GetManagement.d.ts +8 -0
  35. package/dist/src/handlers/Management/GetManagement.js +53 -0
  36. package/dist/src/handlers/User/DeleteByUserid.d.ts +9 -0
  37. package/dist/src/handlers/User/DeleteByUserid.js +70 -0
  38. package/dist/src/handlers/User/GetByUserid.d.ts +9 -0
  39. package/dist/src/handlers/User/GetByUserid.js +71 -0
  40. package/dist/src/handlers/User/GetList.d.ts +9 -0
  41. package/dist/src/handlers/User/GetList.js +64 -0
  42. package/dist/src/handlers/User/GetMe.d.ts +8 -0
  43. package/dist/src/handlers/User/GetMe.js +81 -0
  44. package/dist/src/handlers/User/Post.d.ts +10 -0
  45. package/dist/src/handlers/User/Post.js +87 -0
  46. package/dist/src/handlers/User/PostLogin.d.ts +10 -0
  47. package/dist/src/handlers/User/PostLogin.js +86 -0
  48. package/dist/src/handlers/User/PutByUserid.d.ts +9 -0
  49. package/dist/src/handlers/User/PutByUserid.js +97 -0
  50. package/dist/src/index.d.ts +4 -0
  51. package/dist/src/index.js +380 -0
  52. package/dist/src/lib/customer.d.ts +6 -0
  53. package/dist/src/lib/customer.js +121 -0
  54. package/dist/src/lib/payment.d.ts +6 -0
  55. package/dist/src/lib/payment.js +113 -0
  56. package/dist/src/managementApiContext.d.ts +7 -0
  57. package/dist/src/managementApiContext.js +2 -0
  58. package/dist/src/models/ManagementApi.d.ts +28 -0
  59. package/dist/src/models/ManagementApi.js +8 -0
  60. package/dist/src/repos/ConnectSessionRepo.d.ts +5 -0
  61. package/dist/src/repos/ConnectSessionRepo.js +26 -0
  62. package/dist/src/repos/ManagementUserRepo.d.ts +5 -0
  63. package/dist/src/repos/ManagementUserRepo.js +26 -0
  64. package/dist/src/reposx/ConnectSessionRepo.d.ts +5 -0
  65. package/dist/src/reposx/ConnectSessionRepo.js +26 -0
  66. package/dist/src/schemas/ConnectSession.d.ts +4 -0
  67. package/dist/src/schemas/ConnectSession.js +2 -0
  68. package/dist/src/schemas/Management/GetReq.d.ts +2 -0
  69. package/dist/src/schemas/Management/GetReq.js +2 -0
  70. package/dist/src/schemas/Management/GetRes.d.ts +3 -0
  71. package/dist/src/schemas/Management/GetRes.js +2 -0
  72. package/dist/src/schemas/ManagementUser.d.ts +6 -0
  73. package/dist/src/schemas/ManagementUser.js +2 -0
  74. package/dist/src/schemas/ManagementUserViewModel.d.ts +4 -0
  75. package/dist/src/schemas/ManagementUserViewModel.js +19 -0
  76. package/dist/src/schemas/ModuleList.d.ts +18 -0
  77. package/dist/src/schemas/ModuleList.js +2 -0
  78. package/dist/src/schemas/User/DeleteByUseridReq.d.ts +2 -0
  79. package/dist/src/schemas/User/DeleteByUseridReq.js +2 -0
  80. package/dist/src/schemas/User/DeleteByUseridRes.d.ts +2 -0
  81. package/dist/src/schemas/User/DeleteByUseridRes.js +2 -0
  82. package/dist/src/schemas/User/GetByUseridReq.d.ts +2 -0
  83. package/dist/src/schemas/User/GetByUseridReq.js +2 -0
  84. package/dist/src/schemas/User/GetByUseridRes.d.ts +3 -0
  85. package/dist/src/schemas/User/GetByUseridRes.js +2 -0
  86. package/dist/src/schemas/User/GetListReq.d.ts +2 -0
  87. package/dist/src/schemas/User/GetListReq.js +2 -0
  88. package/dist/src/schemas/User/GetListRes.d.ts +4 -0
  89. package/dist/src/schemas/User/GetListRes.js +2 -0
  90. package/dist/src/schemas/User/GetMeReq.d.ts +2 -0
  91. package/dist/src/schemas/User/GetMeReq.js +2 -0
  92. package/dist/src/schemas/User/GetMeRes.d.ts +3 -0
  93. package/dist/src/schemas/User/GetMeRes.js +2 -0
  94. package/dist/src/schemas/User/PostLoginReq.d.ts +4 -0
  95. package/dist/src/schemas/User/PostLoginReq.js +2 -0
  96. package/dist/src/schemas/User/PostLoginRes.d.ts +5 -0
  97. package/dist/src/schemas/User/PostLoginRes.js +2 -0
  98. package/dist/src/schemas/User/PostReq.d.ts +3 -0
  99. package/dist/src/schemas/User/PostReq.js +2 -0
  100. package/dist/src/schemas/User/PostRes.d.ts +3 -0
  101. package/dist/src/schemas/User/PostRes.js +2 -0
  102. package/dist/src/schemas/User/PutByUseridReq.d.ts +3 -0
  103. package/dist/src/schemas/User/PutByUseridReq.js +2 -0
  104. package/dist/src/schemas/User/PutByUseridRes.d.ts +3 -0
  105. package/dist/src/schemas/User/PutByUseridRes.js +2 -0
  106. package/dist/src/schemas/createStripeCustomerOptions.d.ts +11 -0
  107. package/dist/src/schemas/createStripeCustomerOptions.js +2 -0
  108. package/dist/src/schemas/customer/connectToStripeConnectOptions.d.ts +3 -0
  109. package/dist/src/schemas/customer/connectToStripeConnectOptions.js +2 -0
  110. package/dist/src/schemas/customer/hasPaymentMethodOptions.d.ts +3 -0
  111. package/dist/src/schemas/customer/hasPaymentMethodOptions.js +2 -0
  112. package/dist/src/schemas/customer/setupCardOptions.d.ts +3 -0
  113. package/dist/src/schemas/customer/setupCardOptions.js +2 -0
  114. package/dist/src/schemas/customer/setupCardResponse.d.ts +4 -0
  115. package/dist/src/schemas/customer/setupCardResponse.js +2 -0
  116. package/dist/src/schemas/customer/setupCardTokenOptions.d.ts +4 -0
  117. package/dist/src/schemas/customer/setupCardTokenOptions.js +2 -0
  118. package/dist/src/schemas/payment/capturePaymentOptions.d.ts +4 -0
  119. package/dist/src/schemas/payment/capturePaymentOptions.js +2 -0
  120. package/dist/src/schemas/payment/confirmPaymentOptions.d.ts +4 -0
  121. package/dist/src/schemas/payment/confirmPaymentOptions.js +2 -0
  122. package/dist/src/schemas/payment/confirmPaymentResponse.d.ts +7 -0
  123. package/dist/src/schemas/payment/confirmPaymentResponse.js +2 -0
  124. package/dist/src/schemas/payment/confirmPaymentTokenOptions.d.ts +4 -0
  125. package/dist/src/schemas/payment/confirmPaymentTokenOptions.js +2 -0
  126. package/dist/src/schemas/payment/createPaymentResponse.d.ts +5 -0
  127. package/dist/src/schemas/payment/createPaymentResponse.js +2 -0
  128. package/dist/src/schemas/stripeAPIToken.d.ts +4 -0
  129. package/dist/src/schemas/stripeAPIToken.js +2 -0
  130. package/dist/src/schemas/stripePluginOptions.d.ts +31 -0
  131. package/dist/src/schemas/stripePluginOptions.js +2 -0
  132. package/dist/src/stripeAPI.d.ts +32 -0
  133. package/dist/src/stripeAPI.js +163 -0
  134. package/dist/src/stripePlguinContext.d.ts +5 -0
  135. package/dist/src/stripePlguinContext.js +2 -0
  136. package/dist/src/stripePluginContext.d.ts +6 -0
  137. package/dist/src/stripePluginContext.js +2 -0
  138. package/dist/src/templates/connect-done.d.ts +1 -0
  139. package/dist/src/templates/connect-done.js +4 -0
  140. package/dist/src/templates/error.d.ts +1 -0
  141. package/dist/src/templates/error.js +4 -0
  142. package/dist/src/templates/master.d.ts +1 -0
  143. package/dist/src/templates/master.js +4 -0
  144. package/dist/src/templates/pay-enter-card.d.ts +1 -0
  145. package/dist/src/templates/pay-enter-card.js +4 -0
  146. package/dist/src/templates/pay-select-card.d.ts +1 -0
  147. package/dist/src/templates/pay-select-card.js +4 -0
  148. package/dist/src/templates/setup-card.d.ts +1 -0
  149. package/dist/src/templates/setup-card.js +4 -0
  150. package/dist/src/templates/setup-done.d.ts +1 -0
  151. package/dist/src/templates/setup-done.js +4 -0
  152. package/dist/src/templates/style.d.ts +1 -0
  153. package/dist/src/templates/style.js +4 -0
  154. package/dist/src/utils/bcrypt.d.ts +2 -0
  155. package/dist/src/utils/bcrypt.js +28 -0
  156. package/nodemon.json +7 -0
  157. package/package.json +34 -0
  158. package/readme.md +57 -0
  159. package/src/index.ts +100 -0
  160. package/src/s3Client.ts +150 -0
  161. package/src/s3PluginContext.ts +8 -0
  162. package/src/schemas/ListObjectsResponse.ts +3 -0
  163. package/src/schemas/s3ClientOptions.ts +7 -0
  164. package/src/schemas/s3PluginOptions.ts +11 -0
  165. package/tsconfig.json +23 -0
@@ -0,0 +1,28 @@
1
+ import { HandlerFile, RouteProps } from "@flink-app/flink";
2
+ export interface ManagementApiModule {
3
+ id: string;
4
+ type: ManagementApiType;
5
+ endpoints: {
6
+ handler: HandlerFile;
7
+ routeProps: Partial<RouteProps>;
8
+ }[];
9
+ ui: boolean;
10
+ uiSettings?: {
11
+ title: string;
12
+ icon: string;
13
+ features: string[];
14
+ };
15
+ data: {
16
+ [key: string]: any;
17
+ };
18
+ }
19
+ export interface ManagementApiOptions {
20
+ token: string;
21
+ baseUrl?: string;
22
+ jwtSecret: string;
23
+ modules: ManagementApiModule[];
24
+ }
25
+ export declare enum ManagementApiType {
26
+ user = "USER",
27
+ managementUser = "MANAGEMENT_USER"
28
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ManagementApiType = void 0;
4
+ var ManagementApiType;
5
+ (function (ManagementApiType) {
6
+ ManagementApiType["user"] = "USER";
7
+ ManagementApiType["managementUser"] = "MANAGEMENT_USER";
8
+ })(ManagementApiType = exports.ManagementApiType || (exports.ManagementApiType = {}));
@@ -0,0 +1,5 @@
1
+ import { FlinkRepo } from "@flink-app/flink";
2
+ import { ConnectSession } from "../schemas/ConnectSession";
3
+ declare class ConnectSessionRepo extends FlinkRepo<any, ConnectSession> {
4
+ }
5
+ export default ConnectSessionRepo;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var flink_1 = require("@flink-app/flink");
19
+ var ConnectSessionRepo = /** @class */ (function (_super) {
20
+ __extends(ConnectSessionRepo, _super);
21
+ function ConnectSessionRepo() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ return ConnectSessionRepo;
25
+ }(flink_1.FlinkRepo));
26
+ exports.default = ConnectSessionRepo;
@@ -0,0 +1,5 @@
1
+ import { FlinkRepo } from "@flink-app/flink";
2
+ import { ManagementUser } from "../schemas/ManagementUser";
3
+ declare class ManagementUserRepo extends FlinkRepo<any, ManagementUser> {
4
+ }
5
+ export default ManagementUserRepo;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var flink_1 = require("@flink-app/flink");
19
+ var ManagementUserRepo = /** @class */ (function (_super) {
20
+ __extends(ManagementUserRepo, _super);
21
+ function ManagementUserRepo() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ return ManagementUserRepo;
25
+ }(flink_1.FlinkRepo));
26
+ exports.default = ManagementUserRepo;
@@ -0,0 +1,5 @@
1
+ import { FlinkRepo } from "@flink-app/flink";
2
+ import { ConnectSession } from "../schemas/ConnectSession";
3
+ declare class ConnectSessionRepo extends FlinkRepo<any, ConnectSession> {
4
+ }
5
+ export default ConnectSessionRepo;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var flink_1 = require("@flink-app/flink");
19
+ var ConnectSessionRepo = /** @class */ (function (_super) {
20
+ __extends(ConnectSessionRepo, _super);
21
+ function ConnectSessionRepo() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ return ConnectSessionRepo;
25
+ }(flink_1.FlinkRepo));
26
+ exports.default = ConnectSessionRepo;
@@ -0,0 +1,4 @@
1
+ export interface ConnectSession {
2
+ id: string;
3
+ userId: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface GetManagementReq {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { ModuleList } from "../ModuleList";
2
+ export interface GetManagementRes extends ModuleList {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface ManagementUser {
2
+ _id: string;
3
+ username: string;
4
+ password: string;
5
+ salt: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { ManagementUser } from "./ManagementUser";
2
+ export interface ManagementUserViewModel extends Omit<ManagementUser, "password" | "salt"> {
3
+ }
4
+ export declare const GetManagementUserViewModel: (user: ManagementUser) => ManagementUserViewModel;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.GetManagementUserViewModel = void 0;
15
+ var GetManagementUserViewModel = function (user) {
16
+ var password = user.password, salt = user.salt, resp = __rest(user, ["password", "salt"]);
17
+ return resp;
18
+ };
19
+ exports.GetManagementUserViewModel = GetManagementUserViewModel;
@@ -0,0 +1,18 @@
1
+ export interface ModuleList {
2
+ modules: Module[];
3
+ }
4
+ export interface Module {
5
+ id: string;
6
+ type: string;
7
+ features: string[];
8
+ title: string;
9
+ ui: string;
10
+ data: {
11
+ [key: string]: any;
12
+ };
13
+ endpoints: ModuleEndpoint[];
14
+ }
15
+ export interface ModuleEndpoint {
16
+ method: string;
17
+ url: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface DeleteUserByUseridReq {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface DeleteUserByUseridRes {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface GetUserByUseridReq {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { ManagementUserViewModel } from "../ManagementUserViewModel";
2
+ export interface GetUserByUseridRes extends ManagementUserViewModel {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface GetUserListReq {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { ManagementUserViewModel } from "../ManagementUserViewModel";
2
+ export interface GetUserListRes {
3
+ users: ManagementUserViewModel[];
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface GetUserMeReq {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { PostUserLoginRes } from "./PostLoginRes";
2
+ export interface GetUserMeRes extends PostUserLoginRes {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface PostUserLoginReq {
2
+ username: string;
3
+ password: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { ManagementUserViewModel } from "../ManagementUserViewModel";
2
+ export interface PostUserLoginRes {
3
+ user: ManagementUserViewModel;
4
+ token: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { ManagementUser } from "../ManagementUser";
2
+ export interface PostUserReq extends Omit<ManagementUser, "_id" | "salt"> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { ManagementUserViewModel } from "../ManagementUserViewModel";
2
+ export interface PostUserRes extends ManagementUserViewModel {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { ManagementUser } from "../ManagementUser";
2
+ export interface PutUserByUseridReq extends Partial<Omit<ManagementUser, "_id" | "salt">> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { ManagementUserViewModel } from "../ManagementUserViewModel";
2
+ export interface PutUserByUseridRes extends ManagementUserViewModel {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface createStripeCustomerOptions {
2
+ userId: string;
3
+ description?: string;
4
+ email?: string;
5
+ metaData?: createStripeCustomerMetaData;
6
+ name?: string;
7
+ phone?: string;
8
+ }
9
+ export interface createStripeCustomerMetaData {
10
+ [key: string]: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface connectToStripeConnectOptions {
2
+ userId: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface hasPaymentMethodOptions {
2
+ stripeCustomerId: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface setupCardOptions {
2
+ stripeCustomerId: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface setupCardResponse {
2
+ token: string;
3
+ redirectUrl: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { setupCardOptions } from "./setupCardOptions";
2
+ export interface setupCardTokenOptions extends setupCardOptions {
3
+ client_secret: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface capturePaymentOptions {
2
+ paymentIntentId: string;
3
+ amount: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface confirmPaymentOptions {
2
+ paymentIntentId: string;
3
+ background?: boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface confirmPaymentResponse {
2
+ paymentIntentId: string;
3
+ confirmed: boolean;
4
+ captured: boolean;
5
+ token?: string;
6
+ redirectUrl?: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface confirmPaymentTokenOptions {
2
+ paymentIntentId: string;
3
+ client_secret: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface createPaymentResponse {
2
+ paymentIntentId: string;
3
+ token: string;
4
+ paymentUrl?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface stripeAPIToken<T> {
2
+ type: string;
3
+ options: T;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ export interface stripePluginOptions {
2
+ baseUrl?: string;
3
+ stripeSecreteKey: string;
4
+ stripePublishableKey: string;
5
+ JTW_TOKEN: string;
6
+ logo?: string;
7
+ redirectUrl?: string;
8
+ stripeConnectClientID?: string;
9
+ phrases?: {
10
+ setupDescription?: string;
11
+ setupButtonText?: string;
12
+ setupDoneMessage: string;
13
+ paymentSelectCardPayButtonText?: string;
14
+ paymentSelectCardChangeCardButtonText?: string;
15
+ paymentDoneMessage?: string;
16
+ paymentEnterCardPayButtonText?: string;
17
+ connectDoneMessage: string;
18
+ };
19
+ templates?: {
20
+ master?: string;
21
+ style?: string;
22
+ setupCard?: string;
23
+ setupDone?: string;
24
+ error?: string;
25
+ paySelectCard?: string;
26
+ payEnterCard?: string;
27
+ connectDone?: string;
28
+ };
29
+ paymentCallback?(paymentIntentId: string, status: string): void;
30
+ stripeConnectCallback?(userId: string, stripeConnectUserId: string): void;
31
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { Stripe } from "stripe";
2
+ import { hasPaymentMethodOptions } from "./schemas/customer/hasPaymentMethodOptions";
3
+ import { setupCardOptions } from "./schemas/customer/setupCardOptions";
4
+ import { setupCardResponse } from "./schemas/customer/setupCardResponse";
5
+ import { stripePluginOptions } from "./schemas/stripePluginOptions";
6
+ import { confirmPaymentOptions } from "./schemas/payment/confirmPaymentOptions";
7
+ import { confirmPaymentResponse } from "./schemas/payment/confirmPaymentResponse";
8
+ import { createPaymentResponse } from "./schemas/payment/createPaymentResponse";
9
+ import ConnectSessionRepo from "./reposx/ConnectSessionRepo";
10
+ import { connectToStripeConnectOptions } from "./schemas/customer/connectToStripeConnectOptions";
11
+ import { capturePaymentOptions } from "./schemas/payment/capturePaymentOptions";
12
+ export declare class StripeAPI {
13
+ stripe: Stripe;
14
+ pluginOptions: stripePluginOptions;
15
+ repo?: ConnectSessionRepo;
16
+ constructor(options: stripePluginOptions);
17
+ config: {
18
+ setRepo: (repo: ConnectSessionRepo) => void;
19
+ };
20
+ payment: {
21
+ create: (options: Stripe.PaymentIntentCreateParams) => Promise<createPaymentResponse>;
22
+ confirm: (options: confirmPaymentOptions) => Promise<confirmPaymentResponse>;
23
+ createAndConfirm: (options: Stripe.PaymentIntentCreateParams) => Promise<confirmPaymentResponse>;
24
+ capture: (options: capturePaymentOptions) => Promise<boolean>;
25
+ };
26
+ customer: {
27
+ create: (options: Stripe.CustomerCreateParams) => Promise<string>;
28
+ hasPaymentMethod: (options: hasPaymentMethodOptions) => Promise<boolean>;
29
+ setupCard: (options: setupCardOptions) => Promise<setupCardResponse>;
30
+ connectToStripeConnect: (options: connectToStripeConnectOptions) => Promise<string>;
31
+ };
32
+ }