@artaio/node-api 0.32.3 → 1.0.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
@@ -20,24 +20,28 @@ $ npm install @artaio/node-api
20
20
 
21
21
  ### 2. Use it to interact with our API in pure JS
22
22
  ```js
23
+ // With top level async/await
23
24
  const { Arta } = require('@artaio/node-api');
24
25
  const arta = new Arta('<YOUR_API_TOKEN>');
25
26
 
26
- const { items } = arta.webhooks.list();
27
+ const { items } = await arta.webhooks.list();
27
28
  const myHook = items[0];
28
29
 
29
- myHook.ping().then(console.log);
30
+ const pingResult = await myHook.ping();
31
+ console.log(pingResult);
30
32
  ```
31
33
 
32
34
  ### 3. Use it to interact with our API in TS
33
35
  ```ts
34
- import { Arta, Webhook } from '@artaio/node-api';
36
+ // With top level async/await
37
+ import { Arta, type Webhook } from '@artaio/node-api';
35
38
  const arta: Arta = new Arta('<YOUR_API_TOKEN>');
36
39
 
37
- const { items } = arta.webhooks.list();
40
+ const { items } = await arta.webhooks.list();
38
41
  const myHook: Webhook = items[0];
39
42
 
40
- myHook.ping().then(console.log);
43
+ const pingResult = await myHook.ping();
44
+ console.log(pingResult);
41
45
  ```
42
46
 
43
47
  ## Environment
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/node-api",
3
- "version": "0.32.3",
3
+ "version": "1.0.1",
4
4
  "description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.",
5
5
  "scripts": {
6
6
  "build": "npm run build:types && tsc -p tsconfig-build.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/node-api",
3
- "version": "0.32.3",
3
+ "version": "1.0.1",
4
4
  "description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.",
5
5
  "scripts": {
6
6
  "build": "npm run build:types && tsc -p tsconfig-build.json",
@@ -1 +0,0 @@
1
- export {};
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var zod_to_ts_1 = require("zod-to-ts");
4
- var _1 = require(".");
5
- var generate = function (schema, identifier) {
6
- var node = (0, zod_to_ts_1.zodToTs)(schema, identifier).node;
7
- var typeAlias = (0, zod_to_ts_1.createTypeAlias)(node, identifier);
8
- console.log('export ' + (0, zod_to_ts_1.printNode)(typeAlias));
9
- };
10
- generate(_1.attatchmentSchema, 'Attachment');
11
- generate(_1.requestSchema, 'QuoteRequest');
12
- generate(_1.keySchema, 'Key');
13
- generate(_1.shipmentSchema, 'Shipment');
14
- generate(_1.emailRuleSchema, 'EmailRule');
15
- generate(_1.emailSubscriptionSchema, 'EmailSubscription');
16
- generate(_1.hostedSessionSchema, 'HostedSession');
17
- generate(_1.invoicePaymentSchema, 'InvoicePayment');
18
- generate(_1.invoiceSchema, 'Invoice');
19
- generate(_1.logSchema, 'Log');
20
- generate(_1.organizationSchema, 'Organization');
21
- generate(_1.paymentSchema, 'Payment');
22
- generate(_1.carrierSchema, 'Carrier');
23
- generate(_1.trackingEventSchema, 'TrackingEvent');
24
- generate(_1.trackingSchema, 'Tracking');
25
- generate(_1.uploadSchema, 'Upload');
26
- generate(_1.webhookDeliverySchema, 'WebhookDelivery');
27
- generate(_1.webhookSchema, 'Webhook');
28
- generate(_1.artaServiceSchema, 'ArtaService');
29
- generate(_1.disqualificationSchema, 'Disqualification');
30
- generate(_1.detailsSchema, 'Detail');
31
- generate(_1.additionalServiceSchema, 'AdditionalService');
32
- generate(_1.supportedCurrencySchema, 'SupportedCurrency');
33
- generate(_1.artaLocationSchema, 'ArtaLocation');
34
- generate(_1.insuranceSchema, 'Insurance');
35
- generate(_1.artaObjectSchema, 'ArtaObject');
36
- generate(_1.quoteTypeSchema, 'QuoteType');
37
- generate(_1.contactSchema, 'Contact');
38
- generate(_1.shipmentExceptionStatusSchema, 'ShipmentExceptionStatus');
39
- generate(_1.packageStatusSechema, 'PackageStatus');
40
- generate(_1.packageSchema, 'Package');
41
- generate(_1.shipmentExceptionTypeIdSchema, 'ShipmentExceptionTypeId');
42
- generate(_1.shipmentExceptionSchema, 'ShipmentException');
43
- generate(_1.shipmentScheduleSchema, 'ShipmentSchedule');
44
- generate(_1.shipmentTrackingSchema, 'ShipmentTracking');
45
- generate(_1.insurancePolicySchema, 'InsurancePolicy');
46
- generate(_1.quoteSchema, 'Quote');
47
- generate(_1.requestListItemSchema, 'QuoteRequestListItem');
48
- generate(_1.emailNotificationIdSchema, 'EmailNotificationId');
49
- generate(_1.recipientSchema, 'Recipient');
50
- generate(_1.mimeTypeSchema, 'ArtaMimeType');
51
- generate(_1.documentTypeSchema, 'ArtaDocumentType');