@connect-plus-online/ogabai-integrations 0.0.82 → 0.0.83

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.cjs.js CHANGED
@@ -1906,12 +1906,6 @@ var customerSchema = {
1906
1906
  variables: "($customer: CustomerInput!)",
1907
1907
  field: "(customer: $customer)"
1908
1908
  },
1909
- list: {
1910
- operation: "query",
1911
- name: "getCustomers",
1912
- variables: "($limit: Int!, $skip: Int!, $search: String, $customer: CustomerInput, $customerIds: [String])",
1913
- field: "(limit: $limit, skip: $skip, search: $search, customer: $customer, customerIds: $customerIds)"
1914
- },
1915
1909
  create: {
1916
1910
  operation: "mutation",
1917
1911
  name: "createCustomer",
@@ -1985,15 +1979,20 @@ var createCustomerService = (client) => ({
1985
1979
  }
1986
1980
  ),
1987
1981
  // only admin
1988
- getCustomers: createOperationExecutor(
1989
- client,
1990
- "getCustomers",
1991
- {
1992
- schema: buildSchema(customerSchema.list),
1993
- defaultRootFields: [...customerListIntegration.responseFields],
1994
- defaultNestedFields: customerListIntegration.nestedFields
1995
- }
1996
- ),
1982
+ // getCustomers: createOperationExecutor<
1983
+ // "getCustomers",
1984
+ // CustomerCRUD["ListRequest"],
1985
+ // CustomerCRUD["ListResponse"],
1986
+ // typeof customerListIntegration.nestedFields
1987
+ // >(
1988
+ // client,
1989
+ // "getCustomers",
1990
+ // {
1991
+ // schema: buildSchema(customerSchema.list),
1992
+ // defaultRootFields: [...customerListIntegration.responseFields],
1993
+ // defaultNestedFields: customerListIntegration.nestedFields,
1994
+ // }
1995
+ // ),
1997
1996
  getCustomersByStoreId: createOperationExecutor(
1998
1997
  client,
1999
1998
  "getCustomersByStoreId",
@@ -3222,6 +3221,7 @@ var transactionQuery = [
3222
3221
  "to",
3223
3222
  "toWallet",
3224
3223
  "txStatus",
3224
+ "customerId",
3225
3225
  "transactionType"
3226
3226
  ];
3227
3227
  var orderQuery = [
@@ -3445,6 +3445,32 @@ var createTransactionService = (client) => ({
3445
3445
  );
3446
3446
  return (_d = (_c = res.data) == null ? void 0 : _c.addTransaction) != null ? _d : null;
3447
3447
  },
3448
+ async addCustomerDeposit(input, fetchFields, option) {
3449
+ return this.addTransaction(
3450
+ {
3451
+ transaction: {
3452
+ ...input,
3453
+ transactionType: "customerDeposit",
3454
+ platform: "pos"
3455
+ }
3456
+ },
3457
+ fetchFields,
3458
+ option
3459
+ );
3460
+ },
3461
+ async addCustomerRefund(input, fetchFields, option) {
3462
+ return this.addTransaction(
3463
+ {
3464
+ transaction: {
3465
+ ...input,
3466
+ transactionType: "customerRefund",
3467
+ platform: "pos"
3468
+ }
3469
+ },
3470
+ fetchFields,
3471
+ option
3472
+ );
3473
+ },
3448
3474
  async getTransaction(input, fetchFields, option) {
3449
3475
  var _a, _b, _c, _d;
3450
3476
  const res = await client.request(