@shipengine/react-api 0.7.0 → 0.8.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.
@@ -2,4 +2,4 @@ import { SE } from "@shipengine/js-api";
2
2
  /**
3
3
  * @category ShipEngine API Hooks
4
4
  * */
5
- export declare const useCreateFundingSource: () => import("react-query").UseMutationResult<string, SE.CodedError[], SE.FundingSource, unknown>;
5
+ export declare const useCreateFundingSource: () => import("react-query").UseMutationResult<SE.CreateFundingSourceResponse, SE.CodedError[], SE.FundingSource, unknown>;
@@ -2,7 +2,7 @@
2
2
  * @category ShipEngine API Hooks
3
3
  */
4
4
  export declare const useListFundingSources: () => import("react-query").UseQueryResult<[{
5
- billingInfo: import("@shipengine/js-api").BillingInfo;
5
+ billingInfo: import("@shipengine/js-api").FundingSourceAddress;
6
6
  currencyCode: string;
7
7
  fundingSourceId: string;
8
8
  paymentMethod: import("@shipengine/js-api").PaymentMethod | {
@@ -1,6 +1,6 @@
1
1
  import { SE } from "@shipengine/js-api";
2
2
  export type UpdateFundingSourceData = {
3
- billingInfo: SE.BillingInfo;
3
+ billingInfo: SE.FundingSourceAddress;
4
4
  creditCardInfo: SE.CreditCardInfo;
5
5
  fundingSourceId: string;
6
6
  };
package/index.js CHANGED
@@ -235,7 +235,7 @@ const useCreateFundingSource = () => {
235
235
  return reactQuery.useMutation({
236
236
  mutationFn: (fundingSource) => __async$f(void 0, null, function* () {
237
237
  const result = yield client.fundingSources.create(fundingSource);
238
- return result.data.fundingSource.fundingSourceId;
238
+ return result.data;
239
239
  }),
240
240
  mutationKey: ["useCreateFundingSource"],
241
241
  onError
package/index.mjs CHANGED
@@ -232,7 +232,7 @@ const useCreateFundingSource = () => {
232
232
  return useMutation({
233
233
  mutationFn: (fundingSource) => __async$f(void 0, null, function* () {
234
234
  const result = yield client.fundingSources.create(fundingSource);
235
- return result.data.fundingSource.fundingSourceId;
235
+ return result.data;
236
236
  }),
237
237
  mutationKey: ["useCreateFundingSource"],
238
238
  onError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/react-api",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {