@spritz-finance/service-client 0.3.123 → 0.3.125

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.
@@ -65,7 +65,8 @@ export type PayableAccountInstitution = GraphInstitution & {
65
65
  identificationNumber: string;
66
66
  };
67
67
  export declare enum VirtualCardType {
68
- USVirtualDebitCard = "USVirtualDebitCard"
68
+ USVirtualDebitCard = "USVirtualDebitCard",
69
+ USPhysicalDebitCard = "USPhysicalDebitCard"
69
70
  }
70
71
  export declare enum VirtualCardStatus {
71
72
  Active = "Active",
@@ -103,6 +104,17 @@ export type UpsertVirtualCardInput = {
103
104
  countryCode: string;
104
105
  };
105
106
  };
107
+ shippingInfo?: {
108
+ address: {
109
+ street: string;
110
+ street2?: string;
111
+ city: string;
112
+ subdivision: string;
113
+ postalCode: string;
114
+ countryCode: string;
115
+ };
116
+ method?: string | undefined;
117
+ } | undefined;
106
118
  };
107
119
  export type SimpleCardTransaction = {
108
120
  id: string;
@@ -13,6 +13,7 @@ var BankAccountSubType;
13
13
  var VirtualCardType;
14
14
  (function (VirtualCardType) {
15
15
  VirtualCardType["USVirtualDebitCard"] = "USVirtualDebitCard";
16
+ VirtualCardType["USPhysicalDebitCard"] = "USPhysicalDebitCard";
16
17
  })(VirtualCardType || (exports.VirtualCardType = VirtualCardType = {}));
17
18
  var VirtualCardStatus;
18
19
  (function (VirtualCardStatus) {
@@ -1,6 +1,6 @@
1
1
  export * as RainClient from './rainServiceClient';
2
2
  import { VirtualCardStatus } from '../payableAccounts/types';
3
- import { ApplicationStatus, CreateRainApplicationInput, RainCard, RainContract, RainUser, WithdrawalSignature } from './types';
3
+ import { ApplicationStatus, CardType, CreateRainApplicationInput, RainCard, RainContract, RainUser, ShippingDetails, WithdrawalSignature } from './types';
4
4
  export declare function createCardApplication(userId: string, input: CreateRainApplicationInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<RainUser>>;
5
5
  export declare function getUserDepositAddress({ userId, network, }: {
6
6
  userId: string;
@@ -15,9 +15,11 @@ export declare function getApplicationStatus(userId: string): Promise<import("..
15
15
  status: ApplicationStatus;
16
16
  applicationCompletionLink: string | undefined;
17
17
  }>>;
18
- export declare function createRainCard({ userId, nickname, }: {
18
+ export declare function createRainCard({ userId, nickname, type, shipping, }: {
19
19
  userId: string;
20
20
  nickname?: string;
21
+ type?: CardType;
22
+ shipping?: ShippingDetails;
21
23
  }): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<RainCard>>;
22
24
  export declare function updateCardStatus({ userId, status, cardExternalId, }: {
23
25
  userId: string;
@@ -51,9 +51,14 @@ async function getApplicationStatus(userId) {
51
51
  .then((res) => res.data);
52
52
  }
53
53
  exports.getApplicationStatus = getApplicationStatus;
54
- async function createRainCard({ userId, nickname, }) {
54
+ async function createRainCard({ userId, nickname, type, shipping, }) {
55
55
  return serviceClient_1.baseClient
56
- .post(`${RAIN_ENDPOINT}/card`, { userId, nickname })
56
+ .post(`${RAIN_ENDPOINT}/card`, {
57
+ userId,
58
+ nickname,
59
+ type,
60
+ shipping,
61
+ })
57
62
  .then((res) => res.data);
58
63
  }
59
64
  exports.createRainCard = createRainCard;
@@ -39,6 +39,18 @@ export declare const CardStatus: {
39
39
  readonly Canceled: "canceled";
40
40
  };
41
41
  export type CardStatus = typeof CardStatus[keyof typeof CardStatus];
42
+ export type ShippingDetails = {
43
+ address: {
44
+ street: string;
45
+ street2?: string;
46
+ city: string;
47
+ subdivision: string;
48
+ postalCode: string;
49
+ countryCode: string;
50
+ };
51
+ phoneNumber?: string;
52
+ method?: string;
53
+ };
42
54
  export declare const ApplicationStatus: {
43
55
  readonly Approved: "approved";
44
56
  readonly Pending: "pending";
@@ -51,12 +63,17 @@ export declare const ApplicationStatus: {
51
63
  readonly NotStarted: "notStarted";
52
64
  };
53
65
  export type ApplicationStatus = typeof ApplicationStatus[keyof typeof ApplicationStatus];
66
+ export declare const CardType: {
67
+ readonly Physical: "physical";
68
+ readonly Virtual: "virtual";
69
+ };
70
+ export type CardType = typeof CardType[keyof typeof CardType];
54
71
  export type RainCard = {
55
72
  id: string;
56
73
  externalId: string;
57
74
  accountId: string;
58
75
  userId: string;
59
- type: 'virtual' | 'physical';
76
+ type: CardType;
60
77
  status: CardStatus;
61
78
  expirationMonth: number;
62
79
  expirationYear: number;
package/lib/rain/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApplicationStatus = exports.CardStatus = void 0;
3
+ exports.CardType = exports.ApplicationStatus = exports.CardStatus = void 0;
4
4
  exports.CardStatus = {
5
5
  NotActivated: 'notActivated',
6
6
  Active: 'active',
@@ -19,3 +19,7 @@ exports.ApplicationStatus = {
19
19
  // internal status
20
20
  NotStarted: 'notStarted',
21
21
  };
22
+ exports.CardType = {
23
+ Physical: 'physical',
24
+ Virtual: 'virtual',
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.3.123",
3
+ "version": "0.3.125",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",