@itentialopensource/adapter-easypost 0.1.1 → 0.2.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.
Files changed (43) hide show
  1. package/AUTH.md +9 -14
  2. package/CALLS.md +60 -24
  3. package/CHANGELOG.md +8 -1
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +31 -22
  7. package/SYSTEMINFO.md +19 -6
  8. package/adapter.js +159 -330
  9. package/adapterBase.js +538 -873
  10. package/changelogs/CHANGELOG.md +9 -0
  11. package/metadata.json +55 -0
  12. package/package.json +22 -25
  13. package/pronghorn.json +484 -155
  14. package/propertiesSchema.json +453 -40
  15. package/refs?service=git-upload-pack +0 -0
  16. package/report/adapter-openapi.json +424 -0
  17. package/report/adapter-openapi.yaml +373 -0
  18. package/report/adapterInfo.json +8 -8
  19. package/report/updateReport1691508403162.json +120 -0
  20. package/report/updateReport1692202885261.json +120 -0
  21. package/report/updateReport1694464805959.json +120 -0
  22. package/report/updateReport1698421757641.json +120 -0
  23. package/sampleProperties.json +63 -2
  24. package/test/integration/adapterTestBasicGet.js +1 -1
  25. package/test/integration/adapterTestConnectivity.js +91 -42
  26. package/test/integration/adapterTestIntegration.js +130 -2
  27. package/test/unit/adapterBaseTestUnit.js +388 -313
  28. package/test/unit/adapterTestUnit.js +306 -109
  29. package/utils/adapterInfo.js +1 -1
  30. package/utils/addAuth.js +1 -1
  31. package/utils/artifactize.js +1 -1
  32. package/utils/checkMigrate.js +1 -1
  33. package/utils/entitiesToDB.js +1 -0
  34. package/utils/findPath.js +1 -1
  35. package/utils/methodDocumentor.js +71 -23
  36. package/utils/modify.js +13 -15
  37. package/utils/packModificationScript.js +1 -1
  38. package/utils/taskMover.js +309 -0
  39. package/utils/tbScript.js +3 -10
  40. package/utils/tbUtils.js +2 -3
  41. package/utils/testRunner.js +1 -1
  42. package/utils/troubleshootingAdapter.js +1 -3
  43. package/workflows/README.md +0 -3
Binary file
@@ -0,0 +1,424 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "easypost",
5
+ "contact": {},
6
+ "version": "1.0"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://api.easypost.com/v2",
11
+ "variables": {}
12
+ }
13
+ ],
14
+ "paths": {
15
+ "/shipments": {
16
+ "get": {
17
+ "tags": [
18
+ "Shipments"
19
+ ],
20
+ "summary": "RetrieveAllShipments",
21
+ "operationId": "RetrieveAllShipments",
22
+ "parameters": [
23
+ {
24
+ "name": "page_size",
25
+ "in": "query",
26
+ "description": "",
27
+ "required": false,
28
+ "schema": {
29
+ "type": "string",
30
+ "example": "5"
31
+ }
32
+ }
33
+ ],
34
+ "responses": {
35
+ "200": {
36
+ "description": "",
37
+ "headers": {}
38
+ }
39
+ },
40
+ "deprecated": false
41
+ },
42
+ "post": {
43
+ "tags": [
44
+ "Shipments"
45
+ ],
46
+ "summary": "OneCallBuyShipment",
47
+ "operationId": "OneCallBuyShipment",
48
+ "parameters": [],
49
+ "requestBody": {
50
+ "description": "create address body",
51
+ "content": {
52
+ "application/json": {
53
+ "schema": {
54
+ "title": "body",
55
+ "type" : "object"
56
+ }
57
+ }
58
+ },
59
+ "required": true
60
+ },
61
+ "responses": {
62
+ "200": {
63
+ "description": "",
64
+ "headers": {}
65
+ }
66
+ },
67
+ "deprecated": false
68
+ }
69
+ },
70
+ "/shipments/{shipmentId}": {
71
+ "get": {
72
+ "tags": [
73
+ "Shipments"
74
+ ],
75
+ "summary": "RetrieveShipment",
76
+ "operationId": "RetrieveShipment",
77
+ "parameters": [
78
+ {
79
+ "name": "shipmentId",
80
+ "in": "path",
81
+ "description": "",
82
+ "required": true,
83
+ "style": "simple",
84
+ "schema": {
85
+ "type": "string"
86
+ }
87
+ }
88
+ ],
89
+ "responses": {
90
+ "200": {
91
+ "description": "",
92
+ "headers": {}
93
+ }
94
+ },
95
+ "deprecated": false
96
+ }
97
+ },
98
+ "/addresses": {
99
+ "post": {
100
+ "tags": [
101
+ "Addressses"
102
+ ],
103
+ "summary": "CreateAddress",
104
+ "operationId": "CreateAddress",
105
+ "parameters": [],
106
+ "requestBody": {
107
+ "description": "create address body",
108
+ "content": {
109
+ "application/json": {
110
+ "schema": {
111
+ "title": "body",
112
+ "type" : "object"
113
+ }
114
+ }
115
+ },
116
+ "required": true
117
+ },
118
+ "responses": {
119
+ "200": {
120
+ "description": "",
121
+ "headers": {}
122
+ }
123
+ },
124
+ "deprecated": false
125
+ },
126
+ "get": {
127
+ "tags": [
128
+ "Addressses"
129
+ ],
130
+ "summary": "GetAddresses",
131
+ "operationId": "GetAddresses",
132
+ "parameters": [
133
+ {
134
+ "name": "page_size",
135
+ "in": "query",
136
+ "description": "",
137
+ "required": false,
138
+ "schema": {
139
+ "type": "string",
140
+ "example": "5"
141
+ }
142
+ }
143
+ ],
144
+ "responses": {
145
+ "200": {
146
+ "description": "",
147
+ "headers": {}
148
+ }
149
+ },
150
+ "deprecated": false
151
+ }
152
+ }
153
+ },
154
+ "components": {
155
+ "schemas": {
156
+ "OneCallBuyShipmentRequest": {
157
+ "title": "OneCallBuyShipmentRequest",
158
+ "required": [
159
+ "shipment"
160
+ ],
161
+ "type": "object",
162
+ "properties": {
163
+ "shipment": {
164
+ "$ref": "#/components/schemas/Shipment"
165
+ }
166
+ },
167
+ "example": {
168
+ "shipment": {
169
+ "to_address": {
170
+ "name": "Dr. Steve Brule",
171
+ "street1": "179 N Harbor Dr",
172
+ "city": "Redondo Beach",
173
+ "state": "CA",
174
+ "zip": "90277",
175
+ "country": "US",
176
+ "phone": "8573875756",
177
+ "email": "dr_steve_brule@gmail.com"
178
+ },
179
+ "from_address": {
180
+ "name": "EasyPost",
181
+ "street1": "417 Montgomery Street",
182
+ "street2": "5th Floor",
183
+ "city": "San Francisco",
184
+ "state": "CA",
185
+ "zip": "94104",
186
+ "country": "US",
187
+ "phone": "4153334445",
188
+ "email": "support@easypost.com"
189
+ },
190
+ "parcel": {
191
+ "length": "20.2",
192
+ "width": "10.9",
193
+ "height": "5",
194
+ "weight": "65.9"
195
+ },
196
+ "service": "NextDayAir",
197
+ "carrier_accounts": [
198
+ "ca_..."
199
+ ]
200
+ }
201
+ }
202
+ },
203
+ "Shipment": {
204
+ "title": "Shipment",
205
+ "required": [
206
+ "to_address",
207
+ "from_address",
208
+ "parcel",
209
+ "service",
210
+ "carrier_accounts"
211
+ ],
212
+ "type": "object",
213
+ "properties": {
214
+ "to_address": {
215
+ "$ref": "#/components/schemas/ToAddress"
216
+ },
217
+ "from_address": {
218
+ "$ref": "#/components/schemas/FromAddress"
219
+ },
220
+ "parcel": {
221
+ "$ref": "#/components/schemas/Parcel"
222
+ },
223
+ "service": {
224
+ "type": "string"
225
+ },
226
+ "carrier_accounts": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "string"
230
+ },
231
+ "description": ""
232
+ }
233
+ },
234
+ "example": {
235
+ "to_address": {
236
+ "name": "Dr. Steve Brule",
237
+ "street1": "179 N Harbor Dr",
238
+ "city": "Redondo Beach",
239
+ "state": "CA",
240
+ "zip": "90277",
241
+ "country": "US",
242
+ "phone": "8573875756",
243
+ "email": "dr_steve_brule@gmail.com"
244
+ },
245
+ "from_address": {
246
+ "name": "EasyPost",
247
+ "street1": "417 Montgomery Street",
248
+ "street2": "5th Floor",
249
+ "city": "San Francisco",
250
+ "state": "CA",
251
+ "zip": "94104",
252
+ "country": "US",
253
+ "phone": "4153334445",
254
+ "email": "support@easypost.com"
255
+ },
256
+ "parcel": {
257
+ "length": "20.2",
258
+ "width": "10.9",
259
+ "height": "5",
260
+ "weight": "65.9"
261
+ },
262
+ "service": "NextDayAir",
263
+ "carrier_accounts": [
264
+ "ca_..."
265
+ ]
266
+ }
267
+ },
268
+ "ToAddress": {
269
+ "title": "ToAddress",
270
+ "required": [
271
+ "name",
272
+ "street1",
273
+ "city",
274
+ "state",
275
+ "zip",
276
+ "country",
277
+ "phone",
278
+ "email"
279
+ ],
280
+ "type": "object",
281
+ "properties": {
282
+ "name": {
283
+ "type": "string"
284
+ },
285
+ "street1": {
286
+ "type": "string"
287
+ },
288
+ "city": {
289
+ "type": "string"
290
+ },
291
+ "state": {
292
+ "type": "string"
293
+ },
294
+ "zip": {
295
+ "type": "string"
296
+ },
297
+ "country": {
298
+ "type": "string"
299
+ },
300
+ "phone": {
301
+ "type": "string"
302
+ },
303
+ "email": {
304
+ "type": "string"
305
+ }
306
+ },
307
+ "example": {
308
+ "name": "Dr. Steve Brule",
309
+ "street1": "179 N Harbor Dr",
310
+ "city": "Redondo Beach",
311
+ "state": "CA",
312
+ "zip": "90277",
313
+ "country": "US",
314
+ "phone": "8573875756",
315
+ "email": "dr_steve_brule@gmail.com"
316
+ }
317
+ },
318
+ "FromAddress": {
319
+ "title": "FromAddress",
320
+ "required": [
321
+ "name",
322
+ "street1",
323
+ "street2",
324
+ "city",
325
+ "state",
326
+ "zip",
327
+ "country",
328
+ "phone",
329
+ "email"
330
+ ],
331
+ "type": "object",
332
+ "properties": {
333
+ "name": {
334
+ "type": "string"
335
+ },
336
+ "street1": {
337
+ "type": "string"
338
+ },
339
+ "street2": {
340
+ "type": "string"
341
+ },
342
+ "city": {
343
+ "type": "string"
344
+ },
345
+ "state": {
346
+ "type": "string"
347
+ },
348
+ "zip": {
349
+ "type": "string"
350
+ },
351
+ "country": {
352
+ "type": "string"
353
+ },
354
+ "phone": {
355
+ "type": "string"
356
+ },
357
+ "email": {
358
+ "type": "string"
359
+ }
360
+ },
361
+ "example": {
362
+ "name": "EasyPost",
363
+ "street1": "417 Montgomery Street",
364
+ "street2": "5th Floor",
365
+ "city": "San Francisco",
366
+ "state": "CA",
367
+ "zip": "94104",
368
+ "country": "US",
369
+ "phone": "4153334445",
370
+ "email": "support@easypost.com"
371
+ }
372
+ },
373
+ "Parcel": {
374
+ "title": "Parcel",
375
+ "required": [
376
+ "length",
377
+ "width",
378
+ "height",
379
+ "weight"
380
+ ],
381
+ "type": "object",
382
+ "properties": {
383
+ "length": {
384
+ "type": "string"
385
+ },
386
+ "width": {
387
+ "type": "string"
388
+ },
389
+ "height": {
390
+ "type": "string"
391
+ },
392
+ "weight": {
393
+ "type": "string"
394
+ }
395
+ },
396
+ "example": {
397
+ "length": "20.2",
398
+ "width": "10.9",
399
+ "height": "5",
400
+ "weight": "65.9"
401
+ }
402
+ }
403
+ },
404
+ "securitySchemes": {
405
+ "basic": {
406
+ "type": "http",
407
+ "scheme": "basic"
408
+ }
409
+ }
410
+ },
411
+ "security": [
412
+ {
413
+ "basic": []
414
+ }
415
+ ],
416
+ "tags": [
417
+ {
418
+ "name": "Shipments"
419
+ },
420
+ {
421
+ "name": "Addressses"
422
+ }
423
+ ]
424
+ }