@connect-plus-online/ogabai-integrations 0.0.106 → 0.0.107

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.d.mts CHANGED
@@ -407,6 +407,7 @@ type Transaction = {
407
407
  expenseId: string;
408
408
  narration: string;
409
409
  expenseReceiptUrl: string;
410
+ parentTransactionId: string;
410
411
  };
411
412
  type OrderStatus = "pending" | "processing" | "routing" | "delivered";
412
413
  type Order = {
@@ -1973,7 +1974,7 @@ declare const createTransactionService: (client: GraphQLClient) => {
1973
1974
  * @returns TransactionResponse
1974
1975
  */
1975
1976
  returnSales(input: {
1976
- transaction: SelectFields<Transaction, "amountPaid" | "sales", "customerId" | "narration">;
1977
+ transaction: SelectFields<Transaction, "createdById" | "parentTransactionId" | "amountPaid" | "sales", "customerId" | "narration">;
1977
1978
  }, fetchFields?: {
1978
1979
  root?: (keyof UpdateTransactionResponse)[];
1979
1980
  nestedFields?: UpdateTransactionResponseNestedFields;
package/dist/index.d.ts CHANGED
@@ -407,6 +407,7 @@ type Transaction = {
407
407
  expenseId: string;
408
408
  narration: string;
409
409
  expenseReceiptUrl: string;
410
+ parentTransactionId: string;
410
411
  };
411
412
  type OrderStatus = "pending" | "processing" | "routing" | "delivered";
412
413
  type Order = {
@@ -1973,7 +1974,7 @@ declare const createTransactionService: (client: GraphQLClient) => {
1973
1974
  * @returns TransactionResponse
1974
1975
  */
1975
1976
  returnSales(input: {
1976
- transaction: SelectFields<Transaction, "amountPaid" | "sales", "customerId" | "narration">;
1977
+ transaction: SelectFields<Transaction, "createdById" | "parentTransactionId" | "amountPaid" | "sales", "customerId" | "narration">;
1977
1978
  }, fetchFields?: {
1978
1979
  root?: (keyof UpdateTransactionResponse)[];
1979
1980
  nestedFields?: UpdateTransactionResponseNestedFields;
package/dist/index.esm.js CHANGED
@@ -438,7 +438,7 @@ var userSettingQuery = [
438
438
  "userId"
439
439
  ];
440
440
 
441
- // src/services/inventory/entities.ts
441
+ // src/services/inventory/inventory.entities.ts
442
442
  var customersProductCountQuery = [
443
443
  "count",
444
444
  "storeId",
@@ -479,7 +479,8 @@ var stockQuery = [
479
479
  "deduction",
480
480
  "storeId",
481
481
  "createdAt",
482
- "expirationDate"
482
+ "expirationDate",
483
+ "stockType"
483
484
  ];
484
485
  var storeQuery = [
485
486
  "_id",
@@ -3334,7 +3335,8 @@ var transactionQuery = [
3334
3335
  "transactionType",
3335
3336
  "expenseId",
3336
3337
  "expenseReceiptUrl",
3337
- "narration"
3338
+ "narration",
3339
+ "parentTransactionId"
3338
3340
  ];
3339
3341
  var orderQuery = [
3340
3342
  "_id",
@@ -3552,7 +3554,12 @@ var createTransactionService = (client) => {
3552
3554
  * @returns TransactionResponse
3553
3555
  */
3554
3556
  async returnSales(input, fetchFields, option) {
3555
- return addTransaction(input, fetchFields, option);
3557
+ return addTransaction({
3558
+ transaction: {
3559
+ ...input.transaction,
3560
+ transactionType: "saleReturn"
3561
+ }
3562
+ }, fetchFields, option);
3556
3563
  },
3557
3564
  /**
3558
3565
  * Uploads a transaction receipt