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

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,8 @@ type Transaction = {
407
407
  expenseId: string;
408
408
  narration: string;
409
409
  expenseReceiptUrl: string;
410
+ parentTransactionId: string;
411
+ returnedStockIds: string[];
410
412
  };
411
413
  type OrderStatus = "pending" | "processing" | "routing" | "delivered";
412
414
  type Order = {
@@ -1973,7 +1975,7 @@ declare const createTransactionService: (client: GraphQLClient) => {
1973
1975
  * @returns TransactionResponse
1974
1976
  */
1975
1977
  returnSales(input: {
1976
- transaction: SelectFields<Transaction, "amountPaid" | "sales", "customerId" | "narration">;
1978
+ transaction: SelectFields<Transaction, "createdById" | "parentTransactionId" | "amountPaid" | "sales", "customerId" | "narration">;
1977
1979
  }, fetchFields?: {
1978
1980
  root?: (keyof UpdateTransactionResponse)[];
1979
1981
  nestedFields?: UpdateTransactionResponseNestedFields;
package/dist/index.d.ts CHANGED
@@ -407,6 +407,8 @@ type Transaction = {
407
407
  expenseId: string;
408
408
  narration: string;
409
409
  expenseReceiptUrl: string;
410
+ parentTransactionId: string;
411
+ returnedStockIds: string[];
410
412
  };
411
413
  type OrderStatus = "pending" | "processing" | "routing" | "delivered";
412
414
  type Order = {
@@ -1973,7 +1975,7 @@ declare const createTransactionService: (client: GraphQLClient) => {
1973
1975
  * @returns TransactionResponse
1974
1976
  */
1975
1977
  returnSales(input: {
1976
- transaction: SelectFields<Transaction, "amountPaid" | "sales", "customerId" | "narration">;
1978
+ transaction: SelectFields<Transaction, "createdById" | "parentTransactionId" | "amountPaid" | "sales", "customerId" | "narration">;
1977
1979
  }, fetchFields?: {
1978
1980
  root?: (keyof UpdateTransactionResponse)[];
1979
1981
  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,9 @@ var transactionQuery = [
3334
3335
  "transactionType",
3335
3336
  "expenseId",
3336
3337
  "expenseReceiptUrl",
3337
- "narration"
3338
+ "narration",
3339
+ "parentTransactionId",
3340
+ "returnedStockIds"
3338
3341
  ];
3339
3342
  var orderQuery = [
3340
3343
  "_id",
@@ -3552,7 +3555,12 @@ var createTransactionService = (client) => {
3552
3555
  * @returns TransactionResponse
3553
3556
  */
3554
3557
  async returnSales(input, fetchFields, option) {
3555
- return addTransaction(input, fetchFields, option);
3558
+ return addTransaction({
3559
+ transaction: {
3560
+ ...input.transaction,
3561
+ transactionType: "saleReturn"
3562
+ }
3563
+ }, fetchFields, option);
3556
3564
  },
3557
3565
  /**
3558
3566
  * Uploads a transaction receipt