@salesforce/lds-adapters-sales-yukon 0.1.0-dev1

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 (25) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/sales-yukon.js +1150 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getYukonSurfaceNudges.d.ts +28 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getYukonSurfaceNudgesMock.d.ts +30 -0
  6. package/dist/es/es2018/types/src/generated/adapters/postYukonTelemetry.d.ts +16 -0
  7. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +8 -0
  9. package/dist/es/es2018/types/src/generated/resources/getYukonSurfacesNudgesBySurfaceId.d.ts +16 -0
  10. package/dist/es/es2018/types/src/generated/resources/getYukonSurfacesNudgesMockBySurfaceId.d.ts +20 -0
  11. package/dist/es/es2018/types/src/generated/resources/postYukonTelemetry.d.ts +13 -0
  12. package/dist/es/es2018/types/src/generated/types/YukonNudgeActionEngagementRepresentation.d.ts +31 -0
  13. package/dist/es/es2018/types/src/generated/types/YukonNudgeActionStateRepresentation.d.ts +37 -0
  14. package/dist/es/es2018/types/src/generated/types/YukonNudgeInputRepresentation.d.ts +61 -0
  15. package/dist/es/es2018/types/src/generated/types/YukonNudgeOutputRepresentation.d.ts +54 -0
  16. package/dist/es/es2018/types/src/generated/types/YukonSurfaceNudgesOutputRepresentation.d.ts +47 -0
  17. package/dist/es/es2018/types/src/generated/types/YukonTelemetryInputGroupRepresentation.d.ts +29 -0
  18. package/dist/es/es2018/types/src/generated/types/YukonTelemetryInputRepresentation.d.ts +34 -0
  19. package/dist/es/es2018/types/src/generated/types/YukonTelemetryOutputRepresentation.d.ts +40 -0
  20. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  21. package/package.json +66 -0
  22. package/sfdc/index.d.ts +1 -0
  23. package/sfdc/index.js +1278 -0
  24. package/src/raml/api.raml +247 -0
  25. package/src/raml/luvio.raml +33 -0
@@ -0,0 +1,247 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '63.0'
6
+ mediaType: application/json
7
+ protocols:
8
+ - https
9
+ baseUri: /services/data/v66.0
10
+ securitySchemes:
11
+ OAuth2:
12
+ type: OAuth 2.0
13
+ settings:
14
+ authorizationUri: https://example.com/oauth/authorize
15
+ accessTokenUri: ''
16
+ authorizationGrants:
17
+ - implicit
18
+ annotationTypes:
19
+ oas-readOnly:
20
+ type: boolean
21
+ allowedTargets: TypeDeclaration
22
+ oas-collectionFormat:
23
+ type: string
24
+ oas-body-name:
25
+ type: string
26
+ allowedTargets: TypeDeclaration
27
+ types:
28
+ YukonNudgeInputRepresentation:
29
+ description: Yukon Nudge Input Representation
30
+ type: object
31
+ properties:
32
+ campaignId:
33
+ description: Nudge CampaignId
34
+ type: string
35
+ checksum:
36
+ description: Nudge Checksum
37
+ type: string
38
+ content:
39
+ description: Nudge Content
40
+ type: string
41
+ contentId:
42
+ description: Nudge ContentId
43
+ type: string
44
+ endDate:
45
+ description: Nudge End Date
46
+ type: string
47
+ required: false
48
+ hubId:
49
+ description: Nudge HubId
50
+ type: string
51
+ id:
52
+ description: Nudge Id
53
+ type: string
54
+ startDate:
55
+ description: Nudge Start Date
56
+ type: string
57
+ status:
58
+ description: Nudge Status
59
+ type: string
60
+ type:
61
+ description: Nudge Type
62
+ type: string
63
+ version:
64
+ description: Nudge Version
65
+ type: string
66
+ metadata:
67
+ description: Nudge Metadata
68
+ type: string
69
+ YukonNudgeOutputRepresentation:
70
+ description: A Yukon Nudge to display in a surface
71
+ type: object
72
+ properties:
73
+ id:
74
+ description: Id of the Nudge
75
+ type: string
76
+ payload:
77
+ description: Payload of the Nudge in the surface
78
+ type: object
79
+ properties:
80
+ //:
81
+ type: any # TODO: Handrolled W-7107899
82
+ startDate:
83
+ description: Start Date of the Nudge
84
+ required: false
85
+ type: string
86
+ endDate:
87
+ description: End Date of the Nudge
88
+ required: false
89
+ type: string
90
+ metadata:
91
+ description: All metadata associated with this nudge. Could be any combo of
92
+ schedules, app or page type metadata currently. Purposefully generic to
93
+ ensure later flexibility
94
+ required: false
95
+ type: object
96
+ properties:
97
+ //:
98
+ type: any # TODO: Handrolled W-7107899
99
+ actionState:
100
+ description: The state of how this nudge has been engaged with already
101
+ required: false
102
+ type: YukonNudgeActionStateRepresentation
103
+ contentType:
104
+ description: Type of the content in a nudge
105
+ required: false
106
+ type: string
107
+
108
+ YukonNudgeActionStateRepresentation:
109
+ description: A Yukon Nudge's state of how it's been engaged with
110
+ type: object
111
+ properties:
112
+ engagement:
113
+ description: Engagement counts for the primary and secondary CTAs
114
+ required: false
115
+ type: YukonNudgeActionEngagementRepresentation
116
+ lastSeen:
117
+ description: The time this nudge was last seen
118
+ required: false
119
+ type: string
120
+ seenCount:
121
+ description: How many times this nudge has been seen
122
+ required: false
123
+ type: integer
124
+ stepCount:
125
+ description: prompt specific. what step of a walkthrough we'd be on
126
+ required: false
127
+ type: integer
128
+
129
+ YukonNudgeActionEngagementRepresentation:
130
+ description: counts of how the CTA actions have been engaged with by a user
131
+ type: object
132
+ properties:
133
+ primary:
134
+ description: Primary CTA click count
135
+ required: false
136
+ type: integer
137
+ secondary:
138
+ description: Secondary CTA click count
139
+ required: false
140
+ type: integer
141
+
142
+ YukonSurfaceNudgesOutputRepresentation:
143
+ description: A collection of Yukon Nudges to display in a surface
144
+ type: object
145
+ properties:
146
+ errorMessage:
147
+ description: Error message
148
+ required: false
149
+ type: string
150
+ nudges:
151
+ description: List of Nudges
152
+ type: array
153
+ items:
154
+ type: YukonNudgeOutputRepresentation
155
+ status:
156
+ description: Status
157
+ type: string
158
+ surface:
159
+ description: The surface nudges are for
160
+ type: string
161
+
162
+ YukonTelemetryInputGroupRepresentation:
163
+ description: Yukon Telemetry Input Representation
164
+ type: object
165
+ properties:
166
+ actions:
167
+ description: Telemetry Actions
168
+ type: array
169
+ items:
170
+ type: YukonTelemetryInputRepresentation
171
+ YukonTelemetryInputRepresentation:
172
+ description: Yukon Telemetry Input Representation
173
+ type: object
174
+ properties:
175
+ nudgeUniqueName:
176
+ description: Nudge Unique Name
177
+ type: string
178
+ timestamp:
179
+ description: Action Timestamp
180
+ # TODO: Hand-rolled from "format: int64, type: integer" due to W-8274943
181
+ format: double
182
+ type: number
183
+ actionType:
184
+ description: Action Type
185
+ type: string
186
+ YukonTelemetryOutputRepresentation:
187
+ description: The result of posting telemetry data to CAS
188
+ type: object
189
+ properties:
190
+ errorMessage:
191
+ description: Error message
192
+ required: false
193
+ type: string
194
+ status:
195
+ description: Status
196
+ type: string
197
+ /yukon:
198
+ /surfaces/{surfaceId}/nudges:
199
+ get:
200
+ displayName: getYukonSurfaceNudges
201
+ description: Get Yukon Nudges for surface
202
+ responses:
203
+ '200':
204
+ description: Success
205
+ body:
206
+ application/json:
207
+ type: YukonSurfaceNudgesOutputRepresentation
208
+ uriParameters:
209
+ surfaceId:
210
+ type: string
211
+ required: true
212
+ /surfaces/{surfaceId}/nudges/mock:
213
+ get:
214
+ displayName: getYukonSurfaceNudgesMock
215
+ description: Get Yukon mock Nudges for surface
216
+ responses:
217
+ '200':
218
+ description: Success
219
+ body:
220
+ application/json:
221
+ type: YukonSurfaceNudgesOutputRepresentation
222
+ queryParameters:
223
+ mockWith:
224
+ type: string
225
+ required: false
226
+ size:
227
+ type: integer
228
+ required: false
229
+ uriParameters:
230
+ surfaceId:
231
+ type: string
232
+ required: true
233
+ /telemetry:
234
+ post:
235
+ displayName: postYukonTelemetry
236
+ description: Post Telemetry to CAS
237
+ responses:
238
+ '200':
239
+ description: Success
240
+ body:
241
+ application/json:
242
+ type: YukonTelemetryOutputRepresentation
243
+ body:
244
+ application/json:
245
+ type: YukonTelemetryInputGroupRepresentation
246
+ # TODO hand-rolled W-9271732 (removed required: false)
247
+ (oas-body-name): YukonTelemetryActions
@@ -0,0 +1,33 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'Yukon'
8
+ (luvio.ttl): 30000
9
+
10
+ types:
11
+ YukonTelemetryOutputRepresentation:
12
+ (luvio.key):
13
+ id: status
14
+ YukonSurfaceNudgesOutputRepresentation:
15
+ (luvio.key):
16
+ surface: surface
17
+ /yukon:
18
+ /surfaces/{surfaceId}/nudges:
19
+ get:
20
+ (luvio.adapter):
21
+ name: getYukonSurfaceNudges
22
+ (luvio.key):
23
+ surface: urlParams.surfaceId
24
+ /surfaces/{surfaceId}/nudges/mock:
25
+ get:
26
+ (luvio.adapter):
27
+ name: getYukonSurfaceNudgesMock
28
+ (luvio.key):
29
+ surface: urlParams.surfaceId
30
+ /telemetry:
31
+ post:
32
+ (luvio.adapter):
33
+ name: postYukonTelemetry