@gr4vy/sdk 2.0.7 → 2.0.9

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 (166) hide show
  1. package/funcs/buyersDelete.js.map +1 -1
  2. package/funcs/buyersGet.js.map +1 -1
  3. package/funcs/buyersShippingDetailsCreate.js.map +1 -1
  4. package/funcs/buyersShippingDetailsDelete.js.map +1 -1
  5. package/funcs/buyersShippingDetailsGet.js.map +1 -1
  6. package/funcs/buyersShippingDetailsList.js.map +1 -1
  7. package/funcs/buyersShippingDetailsUpdate.js.map +1 -1
  8. package/funcs/buyersUpdate.js.map +1 -1
  9. package/funcs/checkoutSessionsDelete.js.map +1 -1
  10. package/funcs/checkoutSessionsGet.js.map +1 -1
  11. package/funcs/checkoutSessionsUpdate.js.map +1 -1
  12. package/funcs/digitalWalletsDelete.js.map +1 -1
  13. package/funcs/digitalWalletsDomainsCreate.js.map +1 -1
  14. package/funcs/digitalWalletsDomainsDelete.js.map +1 -1
  15. package/funcs/digitalWalletsGet.js.map +1 -1
  16. package/funcs/digitalWalletsUpdate.js.map +1 -1
  17. package/funcs/giftCardsDelete.js.map +1 -1
  18. package/funcs/giftCardsGet.js.map +1 -1
  19. package/funcs/merchantAccountsGet.js.map +1 -1
  20. package/funcs/merchantAccountsThreeDsConfigurationCreate.js.map +1 -1
  21. package/funcs/merchantAccountsThreeDsConfigurationDelete.js.map +1 -1
  22. package/funcs/merchantAccountsThreeDsConfigurationList.js.map +1 -1
  23. package/funcs/merchantAccountsThreeDsConfigurationUpdate.js.map +1 -1
  24. package/funcs/merchantAccountsUpdate.js.map +1 -1
  25. package/funcs/paymentLinksExpire.js.map +1 -1
  26. package/funcs/paymentLinksGet.js.map +1 -1
  27. package/funcs/paymentMethodsDelete.js.map +1 -1
  28. package/funcs/paymentMethodsGet.js.map +1 -1
  29. package/funcs/paymentMethodsNetworkTokensCreate.js.map +1 -1
  30. package/funcs/paymentMethodsNetworkTokensCryptogramCreate.js.map +1 -1
  31. package/funcs/paymentMethodsNetworkTokensDelete.js.map +1 -1
  32. package/funcs/paymentMethodsNetworkTokensList.js.map +1 -1
  33. package/funcs/paymentMethodsNetworkTokensResume.js.map +1 -1
  34. package/funcs/paymentMethodsNetworkTokensSuspend.js.map +1 -1
  35. package/funcs/paymentMethodsPaymentServiceTokensCreate.js.map +1 -1
  36. package/funcs/paymentMethodsPaymentServiceTokensDelete.js.map +1 -1
  37. package/funcs/paymentMethodsPaymentServiceTokensList.js.map +1 -1
  38. package/funcs/paymentServiceDefinitionsGet.js.map +1 -1
  39. package/funcs/paymentServiceDefinitionsSession.js.map +1 -1
  40. package/funcs/paymentServicesDelete.js.map +1 -1
  41. package/funcs/paymentServicesGet.js.map +1 -1
  42. package/funcs/paymentServicesSession.js.map +1 -1
  43. package/funcs/paymentServicesUpdate.js.map +1 -1
  44. package/funcs/payoutsGet.js.map +1 -1
  45. package/funcs/refundsGet.js.map +1 -1
  46. package/funcs/reportsExecutionsGet.js.map +1 -1
  47. package/funcs/reportsExecutionsList.js.map +1 -1
  48. package/funcs/reportsExecutionsUrl.js.map +1 -1
  49. package/funcs/reportsGet.js.map +1 -1
  50. package/funcs/reportsPut.js.map +1 -1
  51. package/funcs/threeDsScenariosDelete.js.map +1 -1
  52. package/funcs/threeDsScenariosUpdate.js.map +1 -1
  53. package/funcs/transactionsActionsList.js.map +1 -1
  54. package/funcs/transactionsCancel.js.map +1 -1
  55. package/funcs/transactionsCapture.js.map +1 -1
  56. package/funcs/transactionsEventsList.js.map +1 -1
  57. package/funcs/transactionsGet.js.map +1 -1
  58. package/funcs/transactionsRefundsAllCreate.js.map +1 -1
  59. package/funcs/transactionsRefundsCreate.js.map +1 -1
  60. package/funcs/transactionsRefundsGet.js.map +1 -1
  61. package/funcs/transactionsRefundsList.js.map +1 -1
  62. package/funcs/transactionsSettlementsGet.js.map +1 -1
  63. package/funcs/transactionsSettlementsList.js.map +1 -1
  64. package/funcs/transactionsSync.js.map +1 -1
  65. package/funcs/transactionsUpdate.js.map +1 -1
  66. package/funcs/transactionsVoid.js.map +1 -1
  67. package/jsr.json +1 -1
  68. package/lib/config.d.ts +3 -3
  69. package/lib/config.js +3 -3
  70. package/lib/config.js.map +1 -1
  71. package/lib/sdks.d.ts.map +1 -1
  72. package/lib/sdks.js +8 -4
  73. package/lib/sdks.js.map +1 -1
  74. package/lib/url.d.ts.map +1 -1
  75. package/lib/url.js +4 -2
  76. package/lib/url.js.map +1 -1
  77. package/models/components/method.d.ts +1 -0
  78. package/models/components/method.d.ts.map +1 -1
  79. package/models/components/method.js +1 -0
  80. package/models/components/method.js.map +1 -1
  81. package/models/components/redirectpaymentmethodcreate.d.ts +1 -0
  82. package/models/components/redirectpaymentmethodcreate.d.ts.map +1 -1
  83. package/models/components/redirectpaymentmethodcreate.js +1 -0
  84. package/models/components/redirectpaymentmethodcreate.js.map +1 -1
  85. package/models/components/transactionconnectionoptions.d.ts +5 -0
  86. package/models/components/transactionconnectionoptions.d.ts.map +1 -1
  87. package/models/components/transactionconnectionoptions.js +2 -0
  88. package/models/components/transactionconnectionoptions.js.map +1 -1
  89. package/models/errors/error409.d.ts +8 -0
  90. package/models/errors/error409.d.ts.map +1 -1
  91. package/models/errors/error409.js +8 -1
  92. package/models/errors/error409.js.map +1 -1
  93. package/package.json +1 -1
  94. package/src/funcs/buyersDelete.ts +0 -1
  95. package/src/funcs/buyersGet.ts +0 -1
  96. package/src/funcs/buyersShippingDetailsCreate.ts +0 -1
  97. package/src/funcs/buyersShippingDetailsDelete.ts +0 -1
  98. package/src/funcs/buyersShippingDetailsGet.ts +0 -1
  99. package/src/funcs/buyersShippingDetailsList.ts +0 -1
  100. package/src/funcs/buyersShippingDetailsUpdate.ts +0 -1
  101. package/src/funcs/buyersUpdate.ts +0 -1
  102. package/src/funcs/checkoutSessionsDelete.ts +0 -1
  103. package/src/funcs/checkoutSessionsGet.ts +0 -1
  104. package/src/funcs/checkoutSessionsUpdate.ts +0 -1
  105. package/src/funcs/digitalWalletsDelete.ts +0 -1
  106. package/src/funcs/digitalWalletsDomainsCreate.ts +0 -1
  107. package/src/funcs/digitalWalletsDomainsDelete.ts +0 -1
  108. package/src/funcs/digitalWalletsGet.ts +0 -1
  109. package/src/funcs/digitalWalletsUpdate.ts +0 -1
  110. package/src/funcs/giftCardsDelete.ts +0 -1
  111. package/src/funcs/giftCardsGet.ts +0 -1
  112. package/src/funcs/merchantAccountsGet.ts +0 -1
  113. package/src/funcs/merchantAccountsThreeDsConfigurationCreate.ts +0 -1
  114. package/src/funcs/merchantAccountsThreeDsConfigurationDelete.ts +0 -1
  115. package/src/funcs/merchantAccountsThreeDsConfigurationList.ts +0 -1
  116. package/src/funcs/merchantAccountsThreeDsConfigurationUpdate.ts +0 -1
  117. package/src/funcs/merchantAccountsUpdate.ts +0 -1
  118. package/src/funcs/paymentLinksExpire.ts +0 -1
  119. package/src/funcs/paymentLinksGet.ts +0 -1
  120. package/src/funcs/paymentMethodsDelete.ts +0 -1
  121. package/src/funcs/paymentMethodsGet.ts +0 -1
  122. package/src/funcs/paymentMethodsNetworkTokensCreate.ts +0 -1
  123. package/src/funcs/paymentMethodsNetworkTokensCryptogramCreate.ts +0 -1
  124. package/src/funcs/paymentMethodsNetworkTokensDelete.ts +0 -1
  125. package/src/funcs/paymentMethodsNetworkTokensList.ts +0 -1
  126. package/src/funcs/paymentMethodsNetworkTokensResume.ts +0 -1
  127. package/src/funcs/paymentMethodsNetworkTokensSuspend.ts +0 -1
  128. package/src/funcs/paymentMethodsPaymentServiceTokensCreate.ts +0 -1
  129. package/src/funcs/paymentMethodsPaymentServiceTokensDelete.ts +0 -1
  130. package/src/funcs/paymentMethodsPaymentServiceTokensList.ts +0 -1
  131. package/src/funcs/paymentServiceDefinitionsGet.ts +0 -1
  132. package/src/funcs/paymentServiceDefinitionsSession.ts +0 -1
  133. package/src/funcs/paymentServicesDelete.ts +0 -1
  134. package/src/funcs/paymentServicesGet.ts +0 -1
  135. package/src/funcs/paymentServicesSession.ts +0 -1
  136. package/src/funcs/paymentServicesUpdate.ts +0 -1
  137. package/src/funcs/payoutsGet.ts +0 -1
  138. package/src/funcs/refundsGet.ts +0 -1
  139. package/src/funcs/reportsExecutionsGet.ts +0 -1
  140. package/src/funcs/reportsExecutionsList.ts +0 -1
  141. package/src/funcs/reportsExecutionsUrl.ts +0 -1
  142. package/src/funcs/reportsGet.ts +0 -1
  143. package/src/funcs/reportsPut.ts +0 -1
  144. package/src/funcs/threeDsScenariosDelete.ts +0 -1
  145. package/src/funcs/threeDsScenariosUpdate.ts +0 -1
  146. package/src/funcs/transactionsActionsList.ts +0 -1
  147. package/src/funcs/transactionsCancel.ts +0 -1
  148. package/src/funcs/transactionsCapture.ts +0 -1
  149. package/src/funcs/transactionsEventsList.ts +0 -1
  150. package/src/funcs/transactionsGet.ts +0 -1
  151. package/src/funcs/transactionsRefundsAllCreate.ts +0 -1
  152. package/src/funcs/transactionsRefundsCreate.ts +0 -1
  153. package/src/funcs/transactionsRefundsGet.ts +0 -1
  154. package/src/funcs/transactionsRefundsList.ts +0 -1
  155. package/src/funcs/transactionsSettlementsGet.ts +0 -1
  156. package/src/funcs/transactionsSettlementsList.ts +0 -1
  157. package/src/funcs/transactionsSync.ts +0 -1
  158. package/src/funcs/transactionsUpdate.ts +0 -1
  159. package/src/funcs/transactionsVoid.ts +0 -1
  160. package/src/lib/config.ts +3 -3
  161. package/src/lib/sdks.ts +7 -5
  162. package/src/lib/url.ts +16 -14
  163. package/src/models/components/method.ts +1 -0
  164. package/src/models/components/redirectpaymentmethodcreate.ts +1 -0
  165. package/src/models/components/transactionconnectionoptions.ts +7 -0
  166. package/src/models/errors/error409.ts +16 -1
@@ -126,7 +126,6 @@ async function $do(
126
126
  { explode: false, charEncoding: "percent" },
127
127
  ),
128
128
  };
129
-
130
129
  const path = pathToFunc("/payment-methods/{payment_method_id}")(pathParams);
131
130
 
132
131
  const headers = new Headers(compactMap({
@@ -135,7 +135,6 @@ async function $do(
135
135
  { explode: false, charEncoding: "percent" },
136
136
  ),
137
137
  };
138
-
139
138
  const path = pathToFunc(
140
139
  "/payment-methods/{payment_method_id}/network-tokens",
141
140
  )(pathParams);
@@ -141,7 +141,6 @@ async function $do(
141
141
  { explode: false, charEncoding: "percent" },
142
142
  ),
143
143
  };
144
-
145
144
  const path = pathToFunc(
146
145
  "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/cryptogram",
147
146
  )(pathParams);
@@ -138,7 +138,6 @@ async function $do(
138
138
  { explode: false, charEncoding: "percent" },
139
139
  ),
140
140
  };
141
-
142
141
  const path = pathToFunc(
143
142
  "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}",
144
143
  )(pathParams);
@@ -129,7 +129,6 @@ async function $do(
129
129
  { explode: false, charEncoding: "percent" },
130
130
  ),
131
131
  };
132
-
133
132
  const path = pathToFunc(
134
133
  "/payment-methods/{payment_method_id}/network-tokens",
135
134
  )(pathParams);
@@ -138,7 +138,6 @@ async function $do(
138
138
  { explode: false, charEncoding: "percent" },
139
139
  ),
140
140
  };
141
-
142
141
  const path = pathToFunc(
143
142
  "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/resume",
144
143
  )(pathParams);
@@ -138,7 +138,6 @@ async function $do(
138
138
  { explode: false, charEncoding: "percent" },
139
139
  ),
140
140
  };
141
-
142
141
  const path = pathToFunc(
143
142
  "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/suspend",
144
143
  )(pathParams);
@@ -134,7 +134,6 @@ async function $do(
134
134
  { explode: false, charEncoding: "percent" },
135
135
  ),
136
136
  };
137
-
138
137
  const path = pathToFunc(
139
138
  "/payment-methods/{payment_method_id}/payment-service-tokens",
140
139
  )(pathParams);
@@ -137,7 +137,6 @@ async function $do(
137
137
  { explode: false, charEncoding: "percent" },
138
138
  ),
139
139
  };
140
-
141
140
  const path = pathToFunc(
142
141
  "/payment-methods/{payment_method_id}/payment-service-tokens/{payment_service_token_id}",
143
142
  )(pathParams);
@@ -132,7 +132,6 @@ async function $do(
132
132
  { explode: false, charEncoding: "percent" },
133
133
  ),
134
134
  };
135
-
136
135
  const path = pathToFunc(
137
136
  "/payment-methods/{payment_method_id}/payment-service-tokens",
138
137
  )(pathParams);
@@ -123,7 +123,6 @@ async function $do(
123
123
  { explode: false, charEncoding: "percent" },
124
124
  ),
125
125
  };
126
-
127
126
  const path = pathToFunc(
128
127
  "/payment-service-definitions/{payment_service_definition_id}",
129
128
  )(pathParams);
@@ -128,7 +128,6 @@ async function $do(
128
128
  { explode: false, charEncoding: "percent" },
129
129
  ),
130
130
  };
131
-
132
131
  const path = pathToFunc(
133
132
  "/payment-service-definitions/{payment_service_definition_id}/sessions",
134
133
  )(pathParams);
@@ -127,7 +127,6 @@ async function $do(
127
127
  { explode: false, charEncoding: "percent" },
128
128
  ),
129
129
  };
130
-
131
130
  const path = pathToFunc("/payment-services/{payment_service_id}")(pathParams);
132
131
 
133
132
  const headers = new Headers(compactMap({
@@ -126,7 +126,6 @@ async function $do(
126
126
  { explode: false, charEncoding: "percent" },
127
127
  ),
128
128
  };
129
-
130
129
  const path = pathToFunc("/payment-services/{payment_service_id}")(pathParams);
131
130
 
132
131
  const headers = new Headers(compactMap({
@@ -131,7 +131,6 @@ async function $do(
131
131
  { explode: false, charEncoding: "percent" },
132
132
  ),
133
133
  };
134
-
135
134
  const path = pathToFunc("/payment-services/{payment_service_id}/sessions")(
136
135
  pathParams,
137
136
  );
@@ -133,7 +133,6 @@ async function $do(
133
133
  { explode: false, charEncoding: "percent" },
134
134
  ),
135
135
  };
136
-
137
136
  const path = pathToFunc("/payment-services/{payment_service_id}")(pathParams);
138
137
 
139
138
  const headers = new Headers(compactMap({
@@ -125,7 +125,6 @@ async function $do(
125
125
  charEncoding: "percent",
126
126
  }),
127
127
  };
128
-
129
128
  const path = pathToFunc("/payouts/{payout_id}")(pathParams);
130
129
 
131
130
  const headers = new Headers(compactMap({
@@ -125,7 +125,6 @@ async function $do(
125
125
  charEncoding: "percent",
126
126
  }),
127
127
  };
128
-
129
128
  const path = pathToFunc("/refunds/{refund_id}")(pathParams);
130
129
 
131
130
  const headers = new Headers(compactMap({
@@ -126,7 +126,6 @@ async function $do(
126
126
  { explode: false, charEncoding: "percent" },
127
127
  ),
128
128
  };
129
-
130
129
  const path = pathToFunc("/report-executions/{report_execution_id}")(
131
130
  pathParams,
132
131
  );
@@ -146,7 +146,6 @@ async function $do(
146
146
  charEncoding: "percent",
147
147
  }),
148
148
  };
149
-
150
149
  const path = pathToFunc("/reports/{report_id}/executions")(pathParams);
151
150
 
152
151
  const query = encodeFormQuery({
@@ -145,7 +145,6 @@ async function $do(
145
145
  charEncoding: "percent",
146
146
  }),
147
147
  };
148
-
149
148
  const path = pathToFunc(
150
149
  "/reports/{report_id}/executions/{report_execution_id}/url",
151
150
  )(pathParams);
@@ -125,7 +125,6 @@ async function $do(
125
125
  charEncoding: "percent",
126
126
  }),
127
127
  };
128
-
129
128
  const path = pathToFunc("/reports/{report_id}")(pathParams);
130
129
 
131
130
  const headers = new Headers(compactMap({
@@ -129,7 +129,6 @@ async function $do(
129
129
  charEncoding: "percent",
130
130
  }),
131
131
  };
132
-
133
132
  const path = pathToFunc("/reports/{report_id}")(pathParams);
134
133
 
135
134
  const headers = new Headers(compactMap({
@@ -127,7 +127,6 @@ async function $do(
127
127
  { explode: false, charEncoding: "percent" },
128
128
  ),
129
129
  };
130
-
131
130
  const path = pathToFunc("/three-ds-scenarios/{three_ds_scenario_id}")(
132
131
  pathParams,
133
132
  );
@@ -133,7 +133,6 @@ async function $do(
133
133
  { explode: false, charEncoding: "percent" },
134
134
  ),
135
135
  };
136
-
137
136
  const path = pathToFunc("/three-ds-scenarios/{three_ds_scenario_id}")(
138
137
  pathParams,
139
138
  );
@@ -126,7 +126,6 @@ async function $do(
126
126
  charEncoding: "percent",
127
127
  }),
128
128
  };
129
-
130
129
  const path = pathToFunc("/transactions/{transaction_id}/actions")(pathParams);
131
130
 
132
131
  const headers = new Headers(compactMap({
@@ -125,7 +125,6 @@ async function $do(
125
125
  charEncoding: "percent",
126
126
  }),
127
127
  };
128
-
129
128
  const path = pathToFunc("/transactions/{transaction_id}/cancel")(pathParams);
130
129
 
131
130
  const headers = new Headers(compactMap({
@@ -118,7 +118,6 @@ async function $do(
118
118
  charEncoding: "percent",
119
119
  }),
120
120
  };
121
-
122
121
  const path = pathToFunc("/transactions/{transaction_id}/capture")(pathParams);
123
122
 
124
123
  const headers = new Headers(compactMap({
@@ -146,7 +146,6 @@ async function $do(
146
146
  charEncoding: "percent",
147
147
  }),
148
148
  };
149
-
150
149
  const path = pathToFunc("/transactions/{transaction_id}/events")(pathParams);
151
150
 
152
151
  const query = encodeFormQuery({
@@ -125,7 +125,6 @@ async function $do(
125
125
  charEncoding: "percent",
126
126
  }),
127
127
  };
128
-
129
128
  const path = pathToFunc("/transactions/{transaction_id}")(pathParams);
130
129
 
131
130
  const headers = new Headers(compactMap({
@@ -142,7 +142,6 @@ async function $do(
142
142
  charEncoding: "percent",
143
143
  }),
144
144
  };
145
-
146
145
  const path = pathToFunc("/transactions/{transaction_id}/refunds/all")(
147
146
  pathParams,
148
147
  );
@@ -136,7 +136,6 @@ async function $do(
136
136
  charEncoding: "percent",
137
137
  }),
138
138
  };
139
-
140
139
  const path = pathToFunc("/transactions/{transaction_id}/refunds")(pathParams);
141
140
 
142
141
  const headers = new Headers(compactMap({
@@ -134,7 +134,6 @@ async function $do(
134
134
  charEncoding: "percent",
135
135
  }),
136
136
  };
137
-
138
137
  const path = pathToFunc("/transactions/{transaction_id}/refunds/{refund_id}")(
139
138
  pathParams,
140
139
  );
@@ -126,7 +126,6 @@ async function $do(
126
126
  charEncoding: "percent",
127
127
  }),
128
128
  };
129
-
130
129
  const path = pathToFunc("/transactions/{transaction_id}/refunds")(pathParams);
131
130
 
132
131
  const headers = new Headers(compactMap({
@@ -134,7 +134,6 @@ async function $do(
134
134
  charEncoding: "percent",
135
135
  }),
136
136
  };
137
-
138
137
  const path = pathToFunc(
139
138
  "/transactions/{transaction_id}/settlements/{settlement_id}",
140
139
  )(pathParams);
@@ -126,7 +126,6 @@ async function $do(
126
126
  charEncoding: "percent",
127
127
  }),
128
128
  };
129
-
130
129
  const path = pathToFunc("/transactions/{transaction_id}/settlements")(
131
130
  pathParams,
132
131
  );
@@ -125,7 +125,6 @@ async function $do(
125
125
  charEncoding: "percent",
126
126
  }),
127
127
  };
128
-
129
128
  const path = pathToFunc("/transactions/{transaction_id}/sync")(pathParams);
130
129
 
131
130
  const headers = new Headers(compactMap({
@@ -129,7 +129,6 @@ async function $do(
129
129
  charEncoding: "percent",
130
130
  }),
131
131
  };
132
-
133
132
  const path = pathToFunc("/transactions/{transaction_id}")(pathParams);
134
133
 
135
134
  const headers = new Headers(compactMap({
@@ -132,7 +132,6 @@ async function $do(
132
132
  charEncoding: "percent",
133
133
  }),
134
134
  };
135
-
136
135
  const path = pathToFunc("/transactions/{transaction_id}/void")(pathParams);
137
136
 
138
137
  const headers = new Headers(compactMap({
package/src/lib/config.ts CHANGED
@@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
77
77
  export const SDK_METADATA = {
78
78
  language: "typescript",
79
79
  openapiDocVersion: "1.0.0",
80
- sdkVersion: "2.0.7",
81
- genVersion: "2.866.2",
82
- userAgent: "speakeasy-sdk/typescript 2.0.7 2.866.2 1.0.0 @gr4vy/sdk",
80
+ sdkVersion: "2.0.9",
81
+ genVersion: "2.869.10",
82
+ userAgent: "speakeasy-sdk/typescript 2.0.9 2.869.10 1.0.0 @gr4vy/sdk",
83
83
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -128,13 +128,15 @@ export class ClientSDK {
128
128
  if (!base) {
129
129
  return ERR(new InvalidRequestError("No base URL provided for operation"));
130
130
  }
131
- const reqURL = new URL(base);
132
- const inputURL = new URL(path, reqURL);
133
-
131
+ const baseURL = new URL(base);
132
+ let reqURL: URL;
134
133
  if (path) {
135
- reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
136
- reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
134
+ baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
135
+ reqURL = new URL(path, baseURL);
136
+ } else {
137
+ reqURL = baseURL;
137
138
  }
139
+ reqURL.hash = "";
138
140
 
139
141
  let finalQuery = query || "";
140
142
 
package/src/lib/url.ts CHANGED
@@ -13,21 +13,23 @@ export function pathToFunc(
13
13
  const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
14
14
 
15
15
  return function buildURLPath(params: Record<string, unknown> = {}): string {
16
- return pathPattern.replace(paramRE, function (_, placeholder) {
17
- if (!hasOwn.call(params, placeholder)) {
18
- throw new Error(`Parameter '${placeholder}' is required`);
19
- }
16
+ return pathPattern
17
+ .replace(paramRE, function (_, placeholder) {
18
+ if (!hasOwn.call(params, placeholder)) {
19
+ throw new Error(`Parameter '${placeholder}' is required`);
20
+ }
20
21
 
21
- const value = params[placeholder];
22
- if (typeof value !== "string" && typeof value !== "number") {
23
- throw new Error(
24
- `Parameter '${placeholder}' must be a string or number`,
25
- );
26
- }
22
+ const value = params[placeholder];
23
+ if (typeof value !== "string" && typeof value !== "number") {
24
+ throw new Error(
25
+ `Parameter '${placeholder}' must be a string or number`,
26
+ );
27
+ }
27
28
 
28
- return options?.charEncoding === "percent"
29
- ? encodeURIComponent(`${value}`)
30
- : `${value}`;
31
- });
29
+ return options?.charEncoding === "percent"
30
+ ? encodeURIComponent(`${value}`)
31
+ : `${value}`;
32
+ })
33
+ .replace(/^\/+/, "");
32
34
  };
33
35
  }
@@ -101,6 +101,7 @@ export const Method = {
101
101
  Sofort: "sofort",
102
102
  Spei: "spei",
103
103
  Stitch: "stitch",
104
+ Swish: "swish",
104
105
  Stripedd: "stripedd",
105
106
  Stripetoken: "stripetoken",
106
107
  Tapi: "tapi",
@@ -95,6 +95,7 @@ export const RedirectPaymentMethodCreateMethod = {
95
95
  Sofort: "sofort",
96
96
  Spei: "spei",
97
97
  Stitch: "stitch",
98
+ Swish: "swish",
98
99
  Stripedd: "stripedd",
99
100
  Stripetoken: "stripetoken",
100
101
  Tapi: "tapi",
@@ -211,6 +211,10 @@ export type TransactionConnectionOptions = {
211
211
  * Custom options to be passed to the `adyen-sofort` connector.
212
212
  */
213
213
  adyenSofort?: AdyenOptions | null | undefined;
214
+ /**
215
+ * Custom options to be passed to the `adyen-swish` connector.
216
+ */
217
+ adyenSwish?: AdyenOptions | null | undefined;
214
218
  /**
215
219
  * Custom options to be passed to the `adyen-vipps` connector.
216
220
  */
@@ -373,6 +377,7 @@ export type TransactionConnectionOptions$Outbound = {
373
377
  "adyen-pix"?: AdyenOptions$Outbound | null | undefined;
374
378
  "adyen-sepa"?: AdyenSepaOptions$Outbound | null | undefined;
375
379
  "adyen-sofort"?: AdyenOptions$Outbound | null | undefined;
380
+ "adyen-swish"?: AdyenOptions$Outbound | null | undefined;
376
381
  "adyen-vipps"?: AdyenOptions$Outbound | null | undefined;
377
382
  "affirm-affirm"?: AffirmOptions$Outbound | null | undefined;
378
383
  "braintree-card"?: BraintreeOptions$Outbound | null | undefined;
@@ -434,6 +439,7 @@ export const TransactionConnectionOptions$outboundSchema: z.ZodType<
434
439
  adyenPix: z.nullable(AdyenOptions$outboundSchema).optional(),
435
440
  adyenSepa: z.nullable(AdyenSepaOptions$outboundSchema).optional(),
436
441
  adyenSofort: z.nullable(AdyenOptions$outboundSchema).optional(),
442
+ adyenSwish: z.nullable(AdyenOptions$outboundSchema).optional(),
437
443
  adyenVipps: z.nullable(AdyenOptions$outboundSchema).optional(),
438
444
  affirmAffirm: z.nullable(AffirmOptions$outboundSchema).optional(),
439
445
  braintreeCard: z.nullable(BraintreeOptions$outboundSchema).optional(),
@@ -487,6 +493,7 @@ export const TransactionConnectionOptions$outboundSchema: z.ZodType<
487
493
  adyenPix: "adyen-pix",
488
494
  adyenSepa: "adyen-sepa",
489
495
  adyenSofort: "adyen-sofort",
496
+ adyenSwish: "adyen-swish",
490
497
  adyenVipps: "adyen-vipps",
491
498
  affirmAffirm: "affirm-affirm",
492
499
  braintreeCard: "braintree-card",
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import * as components from "../components/index.js";
7
8
  import { Gr4vyError } from "./gr4vyerror.js";
8
9
 
@@ -27,6 +28,10 @@ export type Error409Data = {
27
28
  * A list of details that further ellaborate on the error.
28
29
  */
29
30
  details?: Array<components.ErrorDetail> | undefined;
31
+ /**
32
+ * The ID of the conflicting resource.
33
+ */
34
+ resourceId?: string | null | undefined;
30
35
  };
31
36
 
32
37
  export class Error409 extends Gr4vyError {
@@ -46,6 +51,10 @@ export class Error409 extends Gr4vyError {
46
51
  * A list of details that further ellaborate on the error.
47
52
  */
48
53
  details?: Array<components.ErrorDetail> | undefined;
54
+ /**
55
+ * The ID of the conflicting resource.
56
+ */
57
+ resourceId?: string | null | undefined;
49
58
 
50
59
  /** The original data that was passed to this error instance. */
51
60
  data$: Error409Data;
@@ -61,6 +70,7 @@ export class Error409 extends Gr4vyError {
61
70
  if (err.code != null) this.code = err.code;
62
71
  if (err.status != null) this.status = err.status;
63
72
  if (err.details != null) this.details = err.details;
73
+ if (err.resourceId != null) this.resourceId = err.resourceId;
64
74
 
65
75
  this.name = "Error409";
66
76
  }
@@ -77,12 +87,17 @@ export const Error409$inboundSchema: z.ZodType<
77
87
  status: z.number().int().default(409),
78
88
  message: z.string().default("Generic error"),
79
89
  details: z.array(components.ErrorDetail$inboundSchema).optional(),
90
+ resource_id: z.nullable(z.string()).optional(),
80
91
  request$: z.instanceof(Request),
81
92
  response$: z.instanceof(Response),
82
93
  body$: z.string(),
83
94
  })
84
95
  .transform((v) => {
85
- return new Error409(v, {
96
+ const remapped = remap$(v, {
97
+ "resource_id": "resourceId",
98
+ });
99
+
100
+ return new Error409(remapped, {
86
101
  request: v.request$,
87
102
  response: v.response$,
88
103
  body: v.body$,