@doujins/payments-ui 0.1.2 → 0.1.3

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.
package/dist/index.js CHANGED
@@ -152,7 +152,7 @@ var createClient = (config) => {
152
152
  async listPaymentMethods(params) {
153
153
  const result = await request(
154
154
  "GET",
155
- "/me/payment-methods",
155
+ "/v1/me/payment-methods",
156
156
  {
157
157
  query: {
158
158
  limit: params?.limit,
@@ -165,7 +165,7 @@ var createClient = (config) => {
165
165
  return normalizeList(result);
166
166
  },
167
167
  createPaymentMethod(payload) {
168
- return request("POST", "/me/payment-methods", {
168
+ return request("POST", "/v1/me/payment-methods", {
169
169
  body: payload,
170
170
  target: "account"
171
171
  });
@@ -187,17 +187,17 @@ var createClient = (config) => {
187
187
  });
188
188
  },
189
189
  checkout(payload) {
190
- return request("POST", "/me/checkout", {
190
+ return request("POST", "/v1/me/checkout", {
191
191
  body: payload
192
192
  });
193
193
  },
194
194
  cancelSubscription(feedback) {
195
- return request("POST", "/me/subscriptions/cancel", {
195
+ return request("POST", "/v1/me/subscriptions/cancel", {
196
196
  body: feedback ? { feedback } : void 0
197
197
  });
198
198
  },
199
199
  async getPaymentHistory(params) {
200
- const result = await request("GET", "/me/payments", {
200
+ const result = await request("GET", "/v1/me/payments", {
201
201
  query: {
202
202
  limit: params?.limit,
203
203
  offset: params?.offset,
@@ -209,7 +209,7 @@ var createClient = (config) => {
209
209
  async getSolanaTokens() {
210
210
  const response = await request(
211
211
  "GET",
212
- "/solana/tokens"
212
+ "/v1/solana/tokens"
213
213
  );
214
214
  if (Array.isArray(response)) {
215
215
  return response;
@@ -217,7 +217,7 @@ var createClient = (config) => {
217
217
  return response.tokens ?? [];
218
218
  },
219
219
  async createSolanaPayIntent(payload) {
220
- const response = await request("POST", "/solana/pay", {
220
+ const response = await request("POST", "/v1/solana/pay", {
221
221
  body: {
222
222
  price_id: payload.priceId,
223
223
  token: payload.token,