@kernelminds/scailo-sdk 0.0.116 → 0.1.0
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/README.md +4 -4
- package/lib/cjs/index.js +321 -321
- package/lib/cjs/src/components.scailo_pb.js +2 -2
- package/lib/cjs/src/credit_notes.scailo_connect.js +11 -0
- package/lib/cjs/src/credit_notes.scailo_pb.js +143 -1
- package/lib/cjs/src/debit_notes.scailo_connect.js +11 -0
- package/lib/cjs/src/debit_notes.scailo_pb.js +136 -1
- package/lib/cjs/src/equipments.scailo_pb.js +2 -2
- package/lib/cjs/src/feedstocks.scailo_pb.js +2 -2
- package/lib/cjs/src/goods_dispatches.scailo_connect.js +11 -0
- package/lib/cjs/src/goods_dispatches.scailo_pb.js +122 -1
- package/lib/cjs/src/goods_receipts.scailo_connect.js +11 -0
- package/lib/cjs/src/goods_receipts.scailo_pb.js +108 -1
- package/lib/cjs/src/infrastructures.scailo_pb.js +2 -2
- package/lib/cjs/src/inventory.scailo_pb.js +1 -1
- package/lib/cjs/src/merchandises.scailo_pb.js +2 -2
- package/lib/cjs/src/products.scailo_pb.js +2 -2
- package/lib/cjs/src/proforma_invoices.scailo_connect.js +11 -0
- package/lib/cjs/src/proforma_invoices.scailo_pb.js +143 -1
- package/lib/cjs/src/purchases_orders.scailo_connect.js +11 -0
- package/lib/cjs/src/purchases_orders.scailo_pb.js +143 -1
- package/lib/cjs/src/sales_invoices.scailo_connect.js +11 -0
- package/lib/cjs/src/sales_invoices.scailo_pb.js +143 -1
- package/lib/cjs/src/sales_orders.scailo_connect.js +11 -0
- package/lib/cjs/src/sales_orders.scailo_pb.js +157 -1
- package/lib/cjs/src/sales_quotations.scailo_connect.js +11 -0
- package/lib/cjs/src/sales_quotations.scailo_pb.js +150 -1
- package/lib/cjs/src/vendor_invoices.scailo_connect.js +11 -0
- package/lib/cjs/src/vendor_invoices.scailo_pb.js +136 -1
- package/lib/cjs/types/index.d.ts +108 -108
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/src/components.scailo_pb.d.ts +2 -2
- package/lib/cjs/types/src/credit_notes.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/credit_notes.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/credit_notes.scailo_pb.d.ts +104 -0
- package/lib/cjs/types/src/credit_notes.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/debit_notes.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/debit_notes.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/debit_notes.scailo_pb.d.ts +98 -0
- package/lib/cjs/types/src/debit_notes.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/equipments.scailo_pb.d.ts +2 -2
- package/lib/cjs/types/src/feedstocks.scailo_pb.d.ts +2 -2
- package/lib/cjs/types/src/goods_dispatches.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/goods_dispatches.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/goods_dispatches.scailo_pb.d.ts +86 -0
- package/lib/cjs/types/src/goods_dispatches.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/goods_receipts.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/goods_receipts.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/goods_receipts.scailo_pb.d.ts +74 -0
- package/lib/cjs/types/src/goods_receipts.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/infrastructures.scailo_pb.d.ts +2 -2
- package/lib/cjs/types/src/inventory.scailo_pb.d.ts +1 -1
- package/lib/cjs/types/src/merchandises.scailo_pb.d.ts +2 -2
- package/lib/cjs/types/src/products.scailo_pb.d.ts +2 -2
- package/lib/cjs/types/src/proforma_invoices.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/proforma_invoices.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/proforma_invoices.scailo_pb.d.ts +104 -0
- package/lib/cjs/types/src/proforma_invoices.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/purchases_orders.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/purchases_orders.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/purchases_orders.scailo_pb.d.ts +104 -0
- package/lib/cjs/types/src/purchases_orders.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/sales_invoices.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/sales_invoices.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/sales_invoices.scailo_pb.d.ts +104 -0
- package/lib/cjs/types/src/sales_invoices.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/sales_orders.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/sales_orders.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/sales_orders.scailo_pb.d.ts +116 -0
- package/lib/cjs/types/src/sales_orders.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/sales_quotations.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/sales_quotations.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/sales_quotations.scailo_pb.d.ts +110 -0
- package/lib/cjs/types/src/sales_quotations.scailo_pb.d.ts.map +1 -1
- package/lib/cjs/types/src/vendor_invoices.scailo_connect.d.ts +12 -1
- package/lib/cjs/types/src/vendor_invoices.scailo_connect.d.ts.map +1 -1
- package/lib/cjs/types/src/vendor_invoices.scailo_pb.d.ts +98 -0
- package/lib/cjs/types/src/vendor_invoices.scailo_pb.d.ts.map +1 -1
- package/lib/esm/index.js +321 -321
- package/lib/esm/src/components.scailo_pb.js +2 -2
- package/lib/esm/src/credit_notes.scailo_connect.js +11 -0
- package/lib/esm/src/credit_notes.scailo_pb.js +143 -1
- package/lib/esm/src/debit_notes.scailo_connect.js +11 -0
- package/lib/esm/src/debit_notes.scailo_pb.js +136 -1
- package/lib/esm/src/equipments.scailo_pb.js +2 -2
- package/lib/esm/src/feedstocks.scailo_pb.js +2 -2
- package/lib/esm/src/goods_dispatches.scailo_connect.js +11 -0
- package/lib/esm/src/goods_dispatches.scailo_pb.js +122 -1
- package/lib/esm/src/goods_receipts.scailo_connect.js +11 -0
- package/lib/esm/src/goods_receipts.scailo_pb.js +108 -1
- package/lib/esm/src/infrastructures.scailo_pb.js +2 -2
- package/lib/esm/src/inventory.scailo_pb.js +1 -1
- package/lib/esm/src/merchandises.scailo_pb.js +2 -2
- package/lib/esm/src/products.scailo_pb.js +2 -2
- package/lib/esm/src/proforma_invoices.scailo_connect.js +11 -0
- package/lib/esm/src/proforma_invoices.scailo_pb.js +143 -1
- package/lib/esm/src/purchases_orders.scailo_connect.js +11 -0
- package/lib/esm/src/purchases_orders.scailo_pb.js +143 -1
- package/lib/esm/src/sales_invoices.scailo_connect.js +11 -0
- package/lib/esm/src/sales_invoices.scailo_pb.js +143 -1
- package/lib/esm/src/sales_orders.scailo_connect.js +11 -0
- package/lib/esm/src/sales_orders.scailo_pb.js +157 -1
- package/lib/esm/src/sales_quotations.scailo_connect.js +11 -0
- package/lib/esm/src/sales_quotations.scailo_pb.js +150 -1
- package/lib/esm/src/vendor_invoices.scailo_connect.js +11 -0
- package/lib/esm/src/vendor_invoices.scailo_pb.js +136 -1
- package/lib/esm/types/index.d.ts +108 -108
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/src/components.scailo_pb.d.ts +2 -2
- package/lib/esm/types/src/credit_notes.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/credit_notes.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/credit_notes.scailo_pb.d.ts +104 -0
- package/lib/esm/types/src/credit_notes.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/debit_notes.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/debit_notes.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/debit_notes.scailo_pb.d.ts +98 -0
- package/lib/esm/types/src/debit_notes.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/equipments.scailo_pb.d.ts +2 -2
- package/lib/esm/types/src/feedstocks.scailo_pb.d.ts +2 -2
- package/lib/esm/types/src/goods_dispatches.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/goods_dispatches.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/goods_dispatches.scailo_pb.d.ts +86 -0
- package/lib/esm/types/src/goods_dispatches.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/goods_receipts.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/goods_receipts.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/goods_receipts.scailo_pb.d.ts +74 -0
- package/lib/esm/types/src/goods_receipts.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/infrastructures.scailo_pb.d.ts +2 -2
- package/lib/esm/types/src/inventory.scailo_pb.d.ts +1 -1
- package/lib/esm/types/src/merchandises.scailo_pb.d.ts +2 -2
- package/lib/esm/types/src/products.scailo_pb.d.ts +2 -2
- package/lib/esm/types/src/proforma_invoices.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/proforma_invoices.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/proforma_invoices.scailo_pb.d.ts +104 -0
- package/lib/esm/types/src/proforma_invoices.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/purchases_orders.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/purchases_orders.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/purchases_orders.scailo_pb.d.ts +104 -0
- package/lib/esm/types/src/purchases_orders.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/sales_invoices.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/sales_invoices.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/sales_invoices.scailo_pb.d.ts +104 -0
- package/lib/esm/types/src/sales_invoices.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/sales_orders.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/sales_orders.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/sales_orders.scailo_pb.d.ts +116 -0
- package/lib/esm/types/src/sales_orders.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/sales_quotations.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/sales_quotations.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/sales_quotations.scailo_pb.d.ts +110 -0
- package/lib/esm/types/src/sales_quotations.scailo_pb.d.ts.map +1 -1
- package/lib/esm/types/src/vendor_invoices.scailo_connect.d.ts +12 -1
- package/lib/esm/types/src/vendor_invoices.scailo_connect.d.ts.map +1 -1
- package/lib/esm/types/src/vendor_invoices.scailo_pb.d.ts +98 -0
- package/lib/esm/types/src/vendor_invoices.scailo_pb.d.ts.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ function getNodeTransport(apiEndPoint: string) {
|
|
|
64
64
|
Next, you need to call the login service to get an auth_token. This token is essential for authorizing other API requests.
|
|
65
65
|
|
|
66
66
|
```typescript
|
|
67
|
-
import {
|
|
67
|
+
import { getScailoClientForLoginService, UserLoginRequest } from "@kernelminds/scailo-sdk";
|
|
68
68
|
|
|
69
69
|
// The address of your Scailo instance
|
|
70
70
|
const upstreamAPI = "https://your-scailo-instance.com";
|
|
@@ -75,7 +75,7 @@ const transport = getWebTransport(upstreamAPI);
|
|
|
75
75
|
|
|
76
76
|
async function authenticate() {
|
|
77
77
|
try {
|
|
78
|
-
const client =
|
|
78
|
+
const client = getScailoClientForLoginService(transport)
|
|
79
79
|
const loginResp = await client.loginAsEmployeePrimary(new UserLoginRequest({
|
|
80
80
|
username: username,
|
|
81
81
|
plainTextPassword: password,
|
|
@@ -98,14 +98,14 @@ authenticate();
|
|
|
98
98
|
Once you have the authToken, you must include it in the metadata of your API calls. The following example demonstrates how to fetch purchase orders using the token you received.
|
|
99
99
|
|
|
100
100
|
```typescript
|
|
101
|
-
import {
|
|
101
|
+
import { getScailoClientForPurchasesOrdersService, PurchasesOrdersServiceFilterReq, BOOL_FILTER, SORT_ORDER } from "@kernelminds/scailo-sdk";
|
|
102
102
|
import { protoInt64 } from "@bufbuild/protobuf";
|
|
103
103
|
|
|
104
104
|
const transport = getWebTransport(upstreamAPI);
|
|
105
105
|
|
|
106
106
|
async function getPurchaseOrders(authToken: string) {
|
|
107
107
|
try {
|
|
108
|
-
const purchaseOrdersClient =
|
|
108
|
+
const purchaseOrdersClient = getScailoClientForPurchasesOrdersService(transport);
|
|
109
109
|
const resp = await purchaseOrdersClient.filter(new PurchasesOrdersServiceFilterReq({
|
|
110
110
|
isActive: BOOL_FILTER.BOOL_FILTER_TRUE,
|
|
111
111
|
count: protoInt64.parse(5),
|