-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapi-spec.yaml
More file actions
88 lines (88 loc) · 2.86 KB
/
api-spec.yaml
File metadata and controls
88 lines (88 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
openapi: 3.0.0
info:
version: 1.0.0
title: Heroku AppLink Node.js App Template
description: Sample Heroku App exposing APIs in Node.js with Fastify to connected Salesforce and Data Cloud orgs.
servers:
- url: http://127.0.0.1:3000
paths:
/accounts:
get:
operationId: GetAccounts
description: Returns a list of Accounts
x-sfdc:
heroku:
authorization:
externalClientApp: 'MyAppLinkExternalClientApp'
permissionSet: 'MyAppLinkPermSet'
responses:
'200':
description: Successfully returned a list of Accounts
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
/unitofwork:
post:
operationId: UnitOfWork
description:
Receives a payload containing Account, Contact, and Case details and uses the
Unit of Work pattern to assign the corresponding values to to its Record
while maintaining the relationships. It then commits the unit of work and
returns the Record Id's for each object.
x-sfdc:
heroku:
authorization:
externalClientApp: 'MyAppLinkExternalClientApp'
permissionSet: 'MyAppLinkPermSet'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
accountName:
type: string
lastName:
type: string
subject:
type: string
callbackUrl:
type: string
responses:
'201':
description: Received UnitOfWork API request
callbacks:
unitOfWorkResponse:
'{$request.body#/callbackUrl}':
post:
description: Response from /unitofwork API
operationId: unitOfWorkResponseCallback
requestBody:
content:
application/json:
schema:
type: object
properties:
accountId:
type: string
contactId:
type: string
cases:
type: object
properties:
serviceCaseId:
type: string
followupCaseId:
type: string
responses: # Expected responses to the callback message
'200':
description: Your server returns this code if it accepts the callback