@itentialopensource/adapter-salesforce_cases 0.3.0 → 0.4.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 (42) hide show
  1. package/CALLS.md +30 -0
  2. package/CHANGELOG.md +8 -0
  3. package/CONTRIBUTING.md +1 -160
  4. package/ENHANCE.md +2 -2
  5. package/README.md +32 -23
  6. package/adapter.js +157 -329
  7. package/adapterBase.js +549 -879
  8. package/changelogs/changelog.md +24 -0
  9. package/metadata.json +49 -0
  10. package/package.json +24 -25
  11. package/pronghorn.json +981 -642
  12. package/propertiesSchema.json +431 -31
  13. package/refs?service=git-upload-pack +0 -0
  14. package/report/adapter-openapi.json +325 -0
  15. package/report/adapter-openapi.yaml +274 -0
  16. package/report/adapterInfo.json +8 -8
  17. package/report/updateReport1691511318578.json +120 -0
  18. package/report/updateReport1692202807394.json +120 -0
  19. package/report/updateReport1694463822665.json +120 -0
  20. package/report/updateReport1698421579684.json +120 -0
  21. package/sampleProperties.json +63 -2
  22. package/test/integration/adapterTestBasicGet.js +2 -4
  23. package/test/integration/adapterTestConnectivity.js +91 -42
  24. package/test/integration/adapterTestIntegration.js +130 -2
  25. package/test/unit/adapterBaseTestUnit.js +388 -313
  26. package/test/unit/adapterTestUnit.js +338 -112
  27. package/utils/adapterInfo.js +1 -1
  28. package/utils/addAuth.js +1 -1
  29. package/utils/artifactize.js +1 -1
  30. package/utils/checkMigrate.js +1 -1
  31. package/utils/entitiesToDB.js +2 -2
  32. package/utils/findPath.js +1 -1
  33. package/utils/methodDocumentor.js +273 -0
  34. package/utils/modify.js +13 -15
  35. package/utils/packModificationScript.js +1 -1
  36. package/utils/pre-commit.sh +2 -0
  37. package/utils/taskMover.js +309 -0
  38. package/utils/tbScript.js +89 -34
  39. package/utils/tbUtils.js +41 -21
  40. package/utils/testRunner.js +1 -1
  41. package/utils/troubleshootingAdapter.js +9 -6
  42. package/workflows/README.md +0 -3
Binary file
@@ -0,0 +1,325 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "SFDC - VYVE",
5
+ "contact": {},
6
+ "version": "1.0"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://northland--vyveuat.my.salesforce.com/services",
11
+ "variables": {}
12
+ }
13
+ ],
14
+ "paths": {
15
+ "/data/v41.0/sobjects/Case.json": {
16
+ "post": {
17
+ "tags": [
18
+ "Misc"
19
+ ],
20
+ "summary": "Get Token",
21
+ "operationId": "GetToken",
22
+ "parameters": [],
23
+ "requestBody": {
24
+ "description": "",
25
+ "content": {
26
+ "application/json": {
27
+ "schema": {
28
+ "$ref": "#/components/schemas/GetTokenRequest"
29
+ },
30
+ "example": {
31
+ "CaseNumber": "00014706",
32
+ "ContactId": "",
33
+ "AccountId": "",
34
+ "BusinessHoursId": "01mi00000008PhMAAU",
35
+ "Type": null,
36
+ "RecordTypeId": "012i0000001AOvJAAW",
37
+ "Status": "Resolved",
38
+ "Reason": null,
39
+ "Origin": "Email- Asia",
40
+ "Subject": "test from Postman",
41
+ "Priority": "P3- Medium"
42
+ }
43
+ }
44
+ },
45
+ "required": true
46
+ },
47
+ "responses": {
48
+ "200": {
49
+ "description": "",
50
+ "headers": {}
51
+ }
52
+ },
53
+ "deprecated": false
54
+ }
55
+ },
56
+ "/data/v52.0/sobjects/Case.json": {
57
+ "post": {
58
+ "tags": [
59
+ "Misc"
60
+ ],
61
+ "summary": "Create Ticket",
62
+ "operationId": "CreateTicket",
63
+ "parameters": [],
64
+ "requestBody": {
65
+ "description": "",
66
+ "content": {
67
+ "application/json": {
68
+ "schema": {
69
+ "$ref": "#/components/schemas/CreateTicketRequest"
70
+ },
71
+ "example": {
72
+ "Subject": "Hello world",
73
+ "Description": "Lorem ipsum dolor sit amet...",
74
+ "Origin": "Web",
75
+ "AccountId": null,
76
+ "Case_Type__c": "Technical Support"
77
+ }
78
+ }
79
+ },
80
+ "required": true
81
+ },
82
+ "responses": {
83
+ "200": {
84
+ "description": "",
85
+ "headers": {}
86
+ }
87
+ },
88
+ "deprecated": false
89
+ }
90
+ },
91
+ "/oauth2/token": {
92
+ "post": {
93
+ "tags": [
94
+ "Misc"
95
+ ],
96
+ "summary": "Get Token",
97
+ "operationId": "PostGetToken",
98
+ "parameters": [],
99
+ "requestBody": {
100
+ "content": {
101
+ "application/x-www-form-urlencoded": {
102
+ "encoding": {},
103
+ "schema": {
104
+ "required": [
105
+ "grant_type",
106
+ "client_id",
107
+ "client_secret",
108
+ "username",
109
+ "password"
110
+ ],
111
+ "type": "object",
112
+ "properties": {
113
+ "grant_type": {
114
+ "type": "string",
115
+ "example": "password"
116
+ },
117
+ "client_id": {
118
+ "type": "string",
119
+ "example": "3MVG9c1ghSpUbLl.oNsuXVru.QliQMrR_8CmJU3qlQts.GjhajdjtEflM6F.NAlDXi7N6kgBwh5vOzviyuzt9"
120
+ },
121
+ "client_secret": {
122
+ "type": "string",
123
+ "example": "B2E5E0AAB5B4B4F458561542D640FA9F135C9DCA5F6BF62D9E67EED63E73CBEC"
124
+ },
125
+ "username": {
126
+ "type": "string",
127
+ "example": "noc-c@vyvebb.com.uat"
128
+ },
129
+ "password": {
130
+ "type": "string",
131
+ "example": "Tnoc2021!NQZGJFWozdqejpnXpWmq2VqHt"
132
+ }
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "required": false
138
+ },
139
+ "responses": {
140
+ "200": {
141
+ "description": "",
142
+ "headers": {}
143
+ }
144
+ },
145
+ "deprecated": false
146
+ }
147
+ },
148
+ "/data/v52.0/limits.json": {
149
+ "get": {
150
+ "tags": [
151
+ "Misc"
152
+ ],
153
+ "summary": "Get Limits",
154
+ "operationId": "GetLimits",
155
+ "parameters": [],
156
+ "responses": {
157
+ "200": {
158
+ "description": "",
159
+ "headers": {}
160
+ }
161
+ },
162
+ "deprecated": false
163
+ }
164
+ },
165
+ "/data.json": {
166
+ "get": {
167
+ "tags": [
168
+ "Misc"
169
+ ],
170
+ "summary": "Get API Versions",
171
+ "operationId": "GetAPIVersions",
172
+ "parameters": [],
173
+ "responses": {
174
+ "200": {
175
+ "description": "",
176
+ "headers": {}
177
+ }
178
+ },
179
+ "deprecated": false,
180
+ "security": []
181
+ }
182
+ },
183
+ "/data/v52.0/sobjects/Case/50003000003JNroAAG.json": {
184
+ "get": {
185
+ "tags": [
186
+ "Misc"
187
+ ],
188
+ "summary": "Get Ticket",
189
+ "operationId": "GetTicket",
190
+ "parameters": [],
191
+ "responses": {
192
+ "200": {
193
+ "description": "",
194
+ "headers": {}
195
+ }
196
+ },
197
+ "deprecated": false
198
+ }
199
+ }
200
+ },
201
+ "components": {
202
+ "schemas": {
203
+ "GetTokenRequest": {
204
+ "title": "GetTokenRequest",
205
+ "required": [
206
+ "CaseNumber",
207
+ "ContactId",
208
+ "AccountId",
209
+ "BusinessHoursId",
210
+ "Type",
211
+ "RecordTypeId",
212
+ "Status",
213
+ "Reason",
214
+ "Origin",
215
+ "Subject",
216
+ "Priority"
217
+ ],
218
+ "type": "object",
219
+ "properties": {
220
+ "CaseNumber": {
221
+ "type": "string"
222
+ },
223
+ "ContactId": {
224
+ "type": "string"
225
+ },
226
+ "AccountId": {
227
+ "type": "string"
228
+ },
229
+ "BusinessHoursId": {
230
+ "type": "string"
231
+ },
232
+ "Type": {
233
+ "type": "string",
234
+ "nullable": true
235
+ },
236
+ "RecordTypeId": {
237
+ "type": "string"
238
+ },
239
+ "Status": {
240
+ "type": "string"
241
+ },
242
+ "Reason": {
243
+ "type": "string",
244
+ "nullable": true
245
+ },
246
+ "Origin": {
247
+ "type": "string"
248
+ },
249
+ "Subject": {
250
+ "type": "string"
251
+ },
252
+ "Priority": {
253
+ "type": "string"
254
+ }
255
+ },
256
+ "example": {
257
+ "CaseNumber": "00014706",
258
+ "ContactId": "",
259
+ "AccountId": "",
260
+ "BusinessHoursId": "01mi00000008PhMAAU",
261
+ "Type": null,
262
+ "RecordTypeId": "012i0000001AOvJAAW",
263
+ "Status": "Resolved",
264
+ "Reason": null,
265
+ "Origin": "Email- Asia",
266
+ "Subject": "test from Postman",
267
+ "Priority": "P3- Medium"
268
+ }
269
+ },
270
+ "CreateTicketRequest": {
271
+ "title": "CreateTicketRequest",
272
+ "required": [
273
+ "Subject",
274
+ "Description",
275
+ "Origin",
276
+ "AccountId",
277
+ "Case_Type__c"
278
+ ],
279
+ "type": "object",
280
+ "properties": {
281
+ "Subject": {
282
+ "type": "string"
283
+ },
284
+ "Description": {
285
+ "type": "string"
286
+ },
287
+ "Origin": {
288
+ "type": "string"
289
+ },
290
+ "AccountId": {
291
+ "type": "string",
292
+ "nullable": true
293
+ },
294
+ "Case_Type__c": {
295
+ "type": "string"
296
+ }
297
+ },
298
+ "example": {
299
+ "Subject": "Hello world",
300
+ "Description": "Lorem ipsum dolor sit amet...",
301
+ "Origin": "Web",
302
+ "AccountId": null,
303
+ "Case_Type__c": "Technical Support"
304
+ }
305
+ }
306
+ },
307
+ "securitySchemes": {
308
+ "httpBearer": {
309
+ "type": "http",
310
+ "scheme": "bearer"
311
+ }
312
+ }
313
+ },
314
+ "security": [
315
+ {
316
+ "httpBearer": []
317
+ }
318
+ ],
319
+ "tags": [
320
+ {
321
+ "name": "Misc",
322
+ "description": ""
323
+ }
324
+ ]
325
+ }
@@ -0,0 +1,274 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: SFDC - VYVE
4
+ contact: {}
5
+ version: '1.0'
6
+ servers:
7
+ - url: https://northland--vyveuat.my.salesforce.com/services
8
+ variables: {}
9
+ paths:
10
+ /data/v41.0/sobjects/Case.json:
11
+ post:
12
+ tags:
13
+ - Misc
14
+ summary: GetToken
15
+ description: ''
16
+ operationId: GetToken
17
+ parameters: []
18
+ requestBody:
19
+ description: ''
20
+ content:
21
+ application/json:
22
+ schema:
23
+ allOf:
24
+ - $ref: '#/components/schemas/GetTokenRequest'
25
+ - example:
26
+ CaseNumber: '00014706'
27
+ ContactId: ''
28
+ AccountId: ''
29
+ BusinessHoursId: 01mi00000008PhMAAU
30
+ Type: null
31
+ RecordTypeId: 012i0000001AOvJAAW
32
+ Status: Resolved
33
+ Reason: null
34
+ Origin: Email- Asia
35
+ Subject: test from Postman
36
+ Priority: P3- Medium
37
+ example:
38
+ CaseNumber: '00014706'
39
+ ContactId: ''
40
+ AccountId: ''
41
+ BusinessHoursId: 01mi00000008PhMAAU
42
+ Type: null
43
+ RecordTypeId: 012i0000001AOvJAAW
44
+ Status: Resolved
45
+ Reason: null
46
+ Origin: Email- Asia
47
+ Subject: test from Postman
48
+ Priority: P3- Medium
49
+ required: true
50
+ responses:
51
+ '200':
52
+ description: ''
53
+ headers: {}
54
+ content: {}
55
+ deprecated: false
56
+ /data/v52.0/sobjects/Case.json:
57
+ post:
58
+ tags:
59
+ - Misc
60
+ summary: CreateTicket
61
+ description: ''
62
+ operationId: CreateTicket
63
+ parameters: []
64
+ requestBody:
65
+ description: ''
66
+ content:
67
+ application/json:
68
+ schema:
69
+ allOf:
70
+ - $ref: '#/components/schemas/CreateTicketRequest'
71
+ - example:
72
+ Subject: Hello world
73
+ Description: Lorem ipsum dolor sit amet...
74
+ Origin: Web
75
+ AccountId: null
76
+ Case_Type__c: Technical Support
77
+ example:
78
+ Subject: Hello world
79
+ Description: Lorem ipsum dolor sit amet...
80
+ Origin: Web
81
+ AccountId: null
82
+ Case_Type__c: Technical Support
83
+ required: true
84
+ responses:
85
+ '200':
86
+ description: ''
87
+ headers: {}
88
+ content: {}
89
+ deprecated: false
90
+ /oauth2/token:
91
+ post:
92
+ tags:
93
+ - Misc
94
+ summary: PostGetToken
95
+ description: ''
96
+ operationId: PostGetToken
97
+ parameters:
98
+ - name: Content-Type
99
+ in: header
100
+ description: ''
101
+ required: true
102
+ style: simple
103
+ schema:
104
+ enum:
105
+ - application/x-www-form-urlencoded
106
+ type: string
107
+ requestBody:
108
+ content:
109
+ application/x-www-form-urlencoded:
110
+ encoding: {}
111
+ schema:
112
+ required:
113
+ - grant_type
114
+ - client_id
115
+ - client_secret
116
+ - username
117
+ - password
118
+ type: object
119
+ properties:
120
+ grant_type:
121
+ type: string
122
+ example: password
123
+ client_id:
124
+ type: string
125
+ example: 3MVG9c1ghSpUbLl.oNsuXVru.QliQMrR_8CmJU3qlQts.GjhajdjtEflM6F.NAlDXi7N6kgBwh5vOzviyuzt9
126
+ client_secret:
127
+ type: string
128
+ example: B2E5E0AAB5B4B4F458561542D640FA9F135C9DCA5F6BF62D9E67EED63E73CBEC
129
+ username:
130
+ type: string
131
+ example: noc-c@vyvebb.com.uat
132
+ password:
133
+ type: string
134
+ example: Tnoc2021!NQZGJFWozdqejpnXpWmq2VqHt
135
+ required: false
136
+ responses:
137
+ '200':
138
+ description: ''
139
+ headers: {}
140
+ content: {}
141
+ deprecated: false
142
+ /data/v52.0/limits.json:
143
+ get:
144
+ tags:
145
+ - Misc
146
+ summary: GetLimits
147
+ description: ''
148
+ operationId: GetLimits
149
+ parameters: []
150
+ responses:
151
+ '200':
152
+ description: ''
153
+ headers: {}
154
+ content: {}
155
+ deprecated: false
156
+ /data.json:
157
+ get:
158
+ tags:
159
+ - Misc
160
+ summary: GetAPIVersions
161
+ description: ''
162
+ operationId: GetAPIVersions
163
+ parameters: []
164
+ responses:
165
+ '200':
166
+ description: ''
167
+ headers: {}
168
+ content: {}
169
+ deprecated: false
170
+ security: []
171
+ /data/v52.0/sobjects/Case/50003000003JNroAAG.json:
172
+ get:
173
+ tags:
174
+ - Misc
175
+ summary: GetTicket
176
+ description: ''
177
+ operationId: GetTicket
178
+ parameters: []
179
+ responses:
180
+ '200':
181
+ description: ''
182
+ headers: {}
183
+ content: {}
184
+ deprecated: false
185
+ components:
186
+ schemas:
187
+ GetTokenRequest:
188
+ title: GetTokenRequest
189
+ required:
190
+ - CaseNumber
191
+ - ContactId
192
+ - AccountId
193
+ - BusinessHoursId
194
+ - Type
195
+ - RecordTypeId
196
+ - Status
197
+ - Reason
198
+ - Origin
199
+ - Subject
200
+ - Priority
201
+ type: object
202
+ properties:
203
+ CaseNumber:
204
+ type: string
205
+ ContactId:
206
+ type: string
207
+ AccountId:
208
+ type: string
209
+ BusinessHoursId:
210
+ type: string
211
+ Type:
212
+ type: string
213
+ nullable: true
214
+ RecordTypeId:
215
+ type: string
216
+ Status:
217
+ type: string
218
+ Reason:
219
+ type: string
220
+ nullable: true
221
+ Origin:
222
+ type: string
223
+ Subject:
224
+ type: string
225
+ Priority:
226
+ type: string
227
+ example:
228
+ CaseNumber: '00014706'
229
+ ContactId: ''
230
+ AccountId: ''
231
+ BusinessHoursId: 01mi00000008PhMAAU
232
+ Type: null
233
+ RecordTypeId: 012i0000001AOvJAAW
234
+ Status: Resolved
235
+ Reason: null
236
+ Origin: Email- Asia
237
+ Subject: test from Postman
238
+ Priority: P3- Medium
239
+ CreateTicketRequest:
240
+ title: CreateTicketRequest
241
+ required:
242
+ - Subject
243
+ - Description
244
+ - Origin
245
+ - AccountId
246
+ - Case_Type__c
247
+ type: object
248
+ properties:
249
+ Subject:
250
+ type: string
251
+ Description:
252
+ type: string
253
+ Origin:
254
+ type: string
255
+ AccountId:
256
+ type: string
257
+ nullable: true
258
+ Case_Type__c:
259
+ type: string
260
+ example:
261
+ Subject: Hello world
262
+ Description: Lorem ipsum dolor sit amet...
263
+ Origin: Web
264
+ AccountId: null
265
+ Case_Type__c: Technical Support
266
+ securitySchemes:
267
+ httpBearer:
268
+ type: http
269
+ scheme: bearer
270
+ security:
271
+ - httpBearer: []
272
+ tags:
273
+ - name: Misc
274
+ description: ''
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.0",
3
- "configLines": 2295,
4
- "scriptLines": 1707,
5
- "codeLines": 3034,
6
- "testLines": 3021,
7
- "testCases": 131,
8
- "totalCodeLines": 7762,
9
- "wfTasks": 22
2
+ "version": "0.3.0",
3
+ "configLines": 3034,
4
+ "scriptLines": 1783,
5
+ "codeLines": 2532,
6
+ "testLines": 3497,
7
+ "testCases": 161,
8
+ "totalCodeLines": 7812,
9
+ "wfTasks": 30
10
10
  }