@bunnyapp/components 1.0.58-beta.0.1 → 1.0.58-beta.0.2

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/cjs/index.js CHANGED
@@ -426,7 +426,7 @@ function InvoicePDF(_a) {
426
426
  }, title: "Invoice PDF", width: "100%" }));
427
427
  }
428
428
 
429
- var paymentMethodsQuery = function (filter) { return "query paymentMethods {\n paymentMethods ".concat(filter ? "(".concat(filter, ")") : '', " {\n nodes {\n id\n pluginId\n accountId\n expirationDate\n plugin {\n guid\n id\n }\n state\n metadata {\n issuer\n identifier\n kind\n description\n icon\n type\n }\n isDefault\n }\n }\n}"); };
429
+ var paymentMethodsQuery = function () { return "query PaymentMethods($accountId: ID) {\n paymentMethods (accountId: $accountId) {\n nodes {\n id\n pluginId\n accountId\n expirationDate\n plugin {\n guid\n id\n }\n state\n metadata {\n issuer\n identifier\n kind\n description\n icon\n type\n }\n isDefault\n }\n }\n}"; };
430
430
  var getPaymentMethods = function (_a) {
431
431
  var apiHost = _a.apiHost, token = _a.token, accountId = _a.accountId;
432
432
  return __awaiter(void 0, void 0, void 0, function () {
@@ -435,9 +435,10 @@ var getPaymentMethods = function (_a) {
435
435
  return __generator(this, function (_c) {
436
436
  switch (_c.label) {
437
437
  case 0: return [4 /*yield*/, common.gqlRequest({
438
- query: paymentMethodsQuery(accountId ? "filter: \"accountId is ".concat(accountId, "\"") : ''),
438
+ query: paymentMethodsQuery(),
439
439
  token: token,
440
440
  apiHost: apiHost,
441
+ vars: { accountId: accountId },
441
442
  })];
442
443
  case 1:
443
444
  response = _c.sent();
package/dist/esm/index.js CHANGED
@@ -397,7 +397,7 @@ function InvoicePDF(_a) {
397
397
  }, title: "Invoice PDF", width: "100%" }));
398
398
  }
399
399
 
400
- var paymentMethodsQuery = function (filter) { return "query paymentMethods {\n paymentMethods ".concat(filter ? "(".concat(filter, ")") : '', " {\n nodes {\n id\n pluginId\n accountId\n expirationDate\n plugin {\n guid\n id\n }\n state\n metadata {\n issuer\n identifier\n kind\n description\n icon\n type\n }\n isDefault\n }\n }\n}"); };
400
+ var paymentMethodsQuery = function () { return "query PaymentMethods($accountId: ID) {\n paymentMethods (accountId: $accountId) {\n nodes {\n id\n pluginId\n accountId\n expirationDate\n plugin {\n guid\n id\n }\n state\n metadata {\n issuer\n identifier\n kind\n description\n icon\n type\n }\n isDefault\n }\n }\n}"; };
401
401
  var getPaymentMethods = function (_a) {
402
402
  var apiHost = _a.apiHost, token = _a.token, accountId = _a.accountId;
403
403
  return __awaiter(void 0, void 0, void 0, function () {
@@ -406,9 +406,10 @@ var getPaymentMethods = function (_a) {
406
406
  return __generator(this, function (_c) {
407
407
  switch (_c.label) {
408
408
  case 0: return [4 /*yield*/, gqlRequest({
409
- query: paymentMethodsQuery(accountId ? "filter: \"accountId is ".concat(accountId, "\"") : ''),
409
+ query: paymentMethodsQuery(),
410
410
  token: token,
411
411
  apiHost: apiHost,
412
+ vars: { accountId: accountId },
412
413
  })];
413
414
  case 1:
414
415
  response = _c.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.0.58-beta.0.1",
3
+ "version": "1.0.58-beta.0.2",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",