@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
@@ -0,0 +1,373 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: easypost
4
+ contact: {}
5
+ version: '1.0'
6
+ servers:
7
+ - url: https://api.easypost.com/v2
8
+ variables: {}
9
+ paths:
10
+ /shipments:
11
+ get:
12
+ tags:
13
+ - Shipments
14
+ summary: RetrieveAllShipments
15
+ description: ''
16
+ operationId: RetrieveAllShipments
17
+ parameters:
18
+ - name: page_size
19
+ in: query
20
+ description: ''
21
+ style: form
22
+ explode: true
23
+ schema:
24
+ type: string
25
+ example: '5'
26
+ responses:
27
+ '200':
28
+ description: ''
29
+ headers: {}
30
+ content: {}
31
+ deprecated: false
32
+ post:
33
+ tags:
34
+ - Shipments
35
+ summary: OneCallBuyShipment
36
+ description: ''
37
+ operationId: OneCallBuyShipment
38
+ parameters: []
39
+ requestBody:
40
+ description: create address body
41
+ content:
42
+ application/json:
43
+ schema:
44
+ type: object
45
+ description: create address body
46
+ required: true
47
+ responses:
48
+ '200':
49
+ description: ''
50
+ headers: {}
51
+ content: {}
52
+ deprecated: false
53
+ /shipments/{shipmentId}:
54
+ get:
55
+ tags:
56
+ - Shipments
57
+ summary: RetrieveShipment
58
+ description: ''
59
+ operationId: RetrieveShipment
60
+ parameters:
61
+ - name: shipmentId
62
+ in: path
63
+ description: ''
64
+ required: true
65
+ style: simple
66
+ schema:
67
+ type: string
68
+ responses:
69
+ '200':
70
+ description: ''
71
+ headers: {}
72
+ content: {}
73
+ deprecated: false
74
+ /addresses:
75
+ post:
76
+ tags:
77
+ - Addressses
78
+ summary: CreateAddress
79
+ description: ''
80
+ operationId: CreateAddress
81
+ parameters: []
82
+ requestBody:
83
+ description: create address body
84
+ content:
85
+ application/json:
86
+ schema:
87
+ type: object
88
+ description: create address body
89
+ required: true
90
+ responses:
91
+ '200':
92
+ description: ''
93
+ headers: {}
94
+ content: {}
95
+ deprecated: false
96
+ get:
97
+ tags:
98
+ - Addressses
99
+ summary: GetAddresses
100
+ description: ''
101
+ operationId: GetAddresses
102
+ parameters:
103
+ - name: page_size
104
+ in: query
105
+ description: ''
106
+ style: form
107
+ explode: true
108
+ schema:
109
+ type: string
110
+ example: '5'
111
+ responses:
112
+ '200':
113
+ description: ''
114
+ headers: {}
115
+ content: {}
116
+ deprecated: false
117
+ components:
118
+ schemas:
119
+ OneCallBuyShipmentRequest:
120
+ title: OneCallBuyShipmentRequest
121
+ required:
122
+ - shipment
123
+ type: object
124
+ properties:
125
+ shipment:
126
+ allOf:
127
+ - $ref: '#/components/schemas/Shipment'
128
+ - example:
129
+ to_address:
130
+ name: Dr. Steve Brule
131
+ street1: 179 N Harbor Dr
132
+ city: Redondo Beach
133
+ state: CA
134
+ zip: '90277'
135
+ country: US
136
+ phone: '8573875756'
137
+ email: dr_steve_brule@gmail.com
138
+ from_address:
139
+ name: EasyPost
140
+ street1: 417 Montgomery Street
141
+ street2: 5th Floor
142
+ city: San Francisco
143
+ state: CA
144
+ zip: '94104'
145
+ country: US
146
+ phone: '4153334445'
147
+ email: support@easypost.com
148
+ parcel:
149
+ length: '20.2'
150
+ width: '10.9'
151
+ height: '5'
152
+ weight: '65.9'
153
+ service: NextDayAir
154
+ carrier_accounts:
155
+ - ca_...
156
+ example:
157
+ shipment:
158
+ to_address:
159
+ name: Dr. Steve Brule
160
+ street1: 179 N Harbor Dr
161
+ city: Redondo Beach
162
+ state: CA
163
+ zip: '90277'
164
+ country: US
165
+ phone: '8573875756'
166
+ email: dr_steve_brule@gmail.com
167
+ from_address:
168
+ name: EasyPost
169
+ street1: 417 Montgomery Street
170
+ street2: 5th Floor
171
+ city: San Francisco
172
+ state: CA
173
+ zip: '94104'
174
+ country: US
175
+ phone: '4153334445'
176
+ email: support@easypost.com
177
+ parcel:
178
+ length: '20.2'
179
+ width: '10.9'
180
+ height: '5'
181
+ weight: '65.9'
182
+ service: NextDayAir
183
+ carrier_accounts:
184
+ - ca_...
185
+ Shipment:
186
+ title: Shipment
187
+ required:
188
+ - to_address
189
+ - from_address
190
+ - parcel
191
+ - service
192
+ - carrier_accounts
193
+ type: object
194
+ properties:
195
+ to_address:
196
+ allOf:
197
+ - $ref: '#/components/schemas/ToAddress'
198
+ - example:
199
+ name: Dr. Steve Brule
200
+ street1: 179 N Harbor Dr
201
+ city: Redondo Beach
202
+ state: CA
203
+ zip: '90277'
204
+ country: US
205
+ phone: '8573875756'
206
+ email: dr_steve_brule@gmail.com
207
+ from_address:
208
+ allOf:
209
+ - $ref: '#/components/schemas/FromAddress'
210
+ - example:
211
+ name: EasyPost
212
+ street1: 417 Montgomery Street
213
+ street2: 5th Floor
214
+ city: San Francisco
215
+ state: CA
216
+ zip: '94104'
217
+ country: US
218
+ phone: '4153334445'
219
+ email: support@easypost.com
220
+ parcel:
221
+ allOf:
222
+ - $ref: '#/components/schemas/Parcel'
223
+ - example:
224
+ length: '20.2'
225
+ width: '10.9'
226
+ height: '5'
227
+ weight: '65.9'
228
+ service:
229
+ type: string
230
+ carrier_accounts:
231
+ type: array
232
+ items:
233
+ type: string
234
+ description: ''
235
+ example:
236
+ to_address:
237
+ name: Dr. Steve Brule
238
+ street1: 179 N Harbor Dr
239
+ city: Redondo Beach
240
+ state: CA
241
+ zip: '90277'
242
+ country: US
243
+ phone: '8573875756'
244
+ email: dr_steve_brule@gmail.com
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
+ parcel:
256
+ length: '20.2'
257
+ width: '10.9'
258
+ height: '5'
259
+ weight: '65.9'
260
+ service: NextDayAir
261
+ carrier_accounts:
262
+ - ca_...
263
+ ToAddress:
264
+ title: ToAddress
265
+ required:
266
+ - name
267
+ - street1
268
+ - city
269
+ - state
270
+ - zip
271
+ - country
272
+ - phone
273
+ - email
274
+ type: object
275
+ properties:
276
+ name:
277
+ type: string
278
+ street1:
279
+ type: string
280
+ city:
281
+ type: string
282
+ state:
283
+ type: string
284
+ zip:
285
+ type: string
286
+ country:
287
+ type: string
288
+ phone:
289
+ type: string
290
+ email:
291
+ type: string
292
+ example:
293
+ name: Dr. Steve Brule
294
+ street1: 179 N Harbor Dr
295
+ city: Redondo Beach
296
+ state: CA
297
+ zip: '90277'
298
+ country: US
299
+ phone: '8573875756'
300
+ email: dr_steve_brule@gmail.com
301
+ FromAddress:
302
+ title: FromAddress
303
+ required:
304
+ - name
305
+ - street1
306
+ - street2
307
+ - city
308
+ - state
309
+ - zip
310
+ - country
311
+ - phone
312
+ - email
313
+ type: object
314
+ properties:
315
+ name:
316
+ type: string
317
+ street1:
318
+ type: string
319
+ street2:
320
+ type: string
321
+ city:
322
+ type: string
323
+ state:
324
+ type: string
325
+ zip:
326
+ type: string
327
+ country:
328
+ type: string
329
+ phone:
330
+ type: string
331
+ email:
332
+ type: string
333
+ example:
334
+ name: EasyPost
335
+ street1: 417 Montgomery Street
336
+ street2: 5th Floor
337
+ city: San Francisco
338
+ state: CA
339
+ zip: '94104'
340
+ country: US
341
+ phone: '4153334445'
342
+ email: support@easypost.com
343
+ Parcel:
344
+ title: Parcel
345
+ required:
346
+ - length
347
+ - width
348
+ - height
349
+ - weight
350
+ type: object
351
+ properties:
352
+ length:
353
+ type: string
354
+ width:
355
+ type: string
356
+ height:
357
+ type: string
358
+ weight:
359
+ type: string
360
+ example:
361
+ length: '20.2'
362
+ width: '10.9'
363
+ height: '5'
364
+ weight: '65.9'
365
+ securitySchemes:
366
+ basic:
367
+ type: http
368
+ scheme: basic
369
+ security:
370
+ - basic: []
371
+ tags:
372
+ - name: Shipments
373
+ - name: Addressses
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.1.0",
3
- "configLines": 2307,
4
- "scriptLines": 1795,
5
- "codeLines": 3116,
6
- "testLines": 3081,
7
- "testCases": 134,
8
- "totalCodeLines": 7992,
9
- "wfTasks": 23
2
+ "version": "0.1.1",
3
+ "configLines": 3048,
4
+ "scriptLines": 1783,
5
+ "codeLines": 2610,
6
+ "testLines": 3530,
7
+ "testCases": 163,
8
+ "totalCodeLines": 7923,
9
+ "wfTasks": 31
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 642
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 1643
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 78
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 629
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 15
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1350
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 3622
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 93
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 642
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 1643
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 78
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 629
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 15
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1350
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 3622
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 93
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }