@kernelminds/scailo-sdk 0.0.117 → 0.1.1

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 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 { getClientForLoginService, UserLoginRequest } from "@kernelminds/scailo-sdk";
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 = getClientForLoginService(transport)
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 { getClientForPurchasesOrdersService, PurchasesOrdersServiceFilterReq, BOOL_FILTER, SORT_ORDER } from "@kernelminds/scailo-sdk";
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 = getClientForPurchasesOrdersService(transport);
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),