@salesforce/lds-adapters-revenue-usage-detail 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 (36) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/revenue-usage-detail.js +4359 -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/getAssetUsageDetails.d.ts +29 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getBindingObjectUsageDetails.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getOrderUsageDetails.d.ts +29 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getQuoteUsageDetails.d.ts +29 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +4 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +9 -0
  10. package/dist/es/es2018/types/src/generated/resources/getAssetManagementAssetsUsageDetailsByAssetId.d.ts +19 -0
  11. package/dist/es/es2018/types/src/generated/resources/getCommerceQuotesLineItemsUsageDetailsByQuoteLineItemId.d.ts +19 -0
  12. package/dist/es/es2018/types/src/generated/resources/getCommerceSalesOrdersLineItemsUsageDetailsByOrderItemId.d.ts +19 -0
  13. package/dist/es/es2018/types/src/generated/resources/getRevenueUsageManagementBindingObjectsActionsUsageDetailsByBindingObjectId.d.ts +18 -0
  14. package/dist/es/es2018/types/src/generated/types/BindingObjectDetailOutputRepresentation.d.ts +34 -0
  15. package/dist/es/es2018/types/src/generated/types/BindingObjectGrantDetailOutputRepresentation.d.ts +63 -0
  16. package/dist/es/es2018/types/src/generated/types/BindingObjectRateAdjustmentsOutputRepresentation.d.ts +46 -0
  17. package/dist/es/es2018/types/src/generated/types/BindingObjectRateOutputRepresentation.d.ts +44 -0
  18. package/dist/es/es2018/types/src/generated/types/BindingObjectResourceGrantAndPolicyDetailOutputRepresentation.d.ts +32 -0
  19. package/dist/es/es2018/types/src/generated/types/BindingObjectResourcePolicyDetailOutputRepresentation.d.ts +44 -0
  20. package/dist/es/es2018/types/src/generated/types/FieldsOutputRepresentation.d.ts +31 -0
  21. package/dist/es/es2018/types/src/generated/types/LookupDetailOutputRepresentation.d.ts +28 -0
  22. package/dist/es/es2018/types/src/generated/types/NegotiatedGrantDetailOutputRepresentation.d.ts +50 -0
  23. package/dist/es/es2018/types/src/generated/types/PolicyDetailOutputRepresentation.d.ts +31 -0
  24. package/dist/es/es2018/types/src/generated/types/RateAdjustmentsOutputRepresentation.d.ts +56 -0
  25. package/dist/es/es2018/types/src/generated/types/RateCardEntryOutputRepresentation.d.ts +84 -0
  26. package/dist/es/es2018/types/src/generated/types/ResourcePolicyDetailOutputRepresentation.d.ts +41 -0
  27. package/dist/es/es2018/types/src/generated/types/UsageDetailBindingObjectOutputRepresentation.d.ts +34 -0
  28. package/dist/es/es2018/types/src/generated/types/UsageDetailErrorResponseRepresentation.d.ts +34 -0
  29. package/dist/es/es2018/types/src/generated/types/UsageDetailOutputRepresentation.d.ts +34 -0
  30. package/dist/es/es2018/types/src/generated/types/UsageResourceGrantAndPolicyDetailOutputRepresentation.d.ts +39 -0
  31. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  32. package/package.json +67 -0
  33. package/sfdc/index.d.ts +1 -0
  34. package/sfdc/index.js +4433 -0
  35. package/src/raml/api.raml +520 -0
  36. package/src/raml/luvio.raml +32 -0
@@ -0,0 +1,520 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '65.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
+ BindingObjectDetailOutputRepresentation:
29
+ description: Usage Detail API output representation for Binding Object Detail
30
+ type: object
31
+ properties:
32
+ bindingObjectRate:
33
+ description: Binding Object Rate Detail.
34
+ type: BindingObjectRateOutputRepresentation
35
+ required: false
36
+ bindingObjectResourceGrantAndPolicyDetail:
37
+ description: Binding Object Resource Grant and Policy Detail.
38
+ type: BindingObjectResourceGrantAndPolicyDetailOutputRepresentation
39
+ required: false
40
+ usageResource:
41
+ description: Usage Resource Detail
42
+ type: LookupDetailOutputRepresentation
43
+ required: false
44
+ BindingObjectGrantDetailOutputRepresentation:
45
+ description: Usage Detail API output representation for Binding Object Usage Resource
46
+ Grant Detail
47
+ type: object
48
+ properties:
49
+ effectiveEndDate:
50
+ description: Effective End Date
51
+ type: string | nil
52
+ effectiveStartDate:
53
+ description: Effective Start Date
54
+ type: string | nil
55
+ grantType:
56
+ description: Grant Type
57
+ type: string | nil
58
+ id:
59
+ description: Transaction Usage Entitlement Id
60
+ type: string | nil
61
+ product:
62
+ description: Product Lookup Detail
63
+ type: LookupDetailOutputRepresentation | nil
64
+ quantity:
65
+ description: Quantity
66
+ type: number | nil
67
+ record:
68
+ description: Record Lookup Detail
69
+ type: LookupDetailOutputRepresentation | nil
70
+ unitOfMeasure:
71
+ description: Unit of Measure
72
+ type: LookupDetailOutputRepresentation | nil
73
+ usageRefreshPolicy:
74
+ description: Usage grant refresh policy ID
75
+ type: PolicyDetailOutputRepresentation | nil
76
+ usageRolloverPolicy:
77
+ description: Usage grant rollover policy ID
78
+ type: PolicyDetailOutputRepresentation | nil
79
+ validityPeriodTerm:
80
+ description: Validity period term
81
+ type: number | nil
82
+ validityPeriodUnit:
83
+ description: Validity period unit
84
+ type: string | nil
85
+ BindingObjectRateAdjustmentsOutputRepresentation:
86
+ description: Usage Detail API output representation for Binding Target Rate Adjustments
87
+ type: object
88
+ properties:
89
+ lowerBound:
90
+ description: Minimum quantity for the adjustment to be applicable.
91
+ type: number | nil
92
+ name:
93
+ description: Name of the tier.
94
+ type: string | nil
95
+ rateAdjustmentId:
96
+ description: ID of the Rate Adjustment.
97
+ type: string | nil
98
+ rateAdjustmentType:
99
+ description: Type of rate adjustment.
100
+ type: string | nil
101
+ rateAdjustmentValue:
102
+ description: Value of the adjustment.
103
+ type: number | nil
104
+ tierUnitOfMeasure:
105
+ description: The unit of measure representing the tier.
106
+ type: string | nil
107
+ upperBound:
108
+ description: Maximum quantity for the adjustment to be applicable.
109
+ type: number | nil
110
+ BindingObjectRateOutputRepresentation:
111
+ description: Usage Detail API output representation for Binding Object Rate
112
+ type: object
113
+ properties:
114
+ id:
115
+ description: Binding Object Rate card entry ID
116
+ type: string | nil
117
+ negotiatedRate:
118
+ description: Negotiated Rate value
119
+ type: number | nil
120
+ negotiatedRateAdjustments:
121
+ description: List of rate adjustments
122
+ type: array
123
+ items:
124
+ type: BindingObjectRateAdjustmentsOutputRepresentation | nil
125
+ rate:
126
+ description: Rate value
127
+ type: number | nil
128
+ rateCardEntryId:
129
+ description: Rate card entry ID
130
+ type: string | nil
131
+ rateUnitOfMeasureName:
132
+ description: Rate unit of measure name
133
+ type: string | nil
134
+ BindingObjectResourceGrantAndPolicyDetailOutputRepresentation:
135
+ description: Usage Detail API output representation for Binding Object Resource
136
+ Grant And Policy Detail
137
+ type: object
138
+ properties:
139
+ bindingObjectGrantDetail:
140
+ description: Binding Object Resource Negotiated Grant Detail.
141
+ type: array
142
+ required: false
143
+ items:
144
+ type: BindingObjectGrantDetailOutputRepresentation
145
+ bindingObjectResourcePolicyDetail:
146
+ description: Binding Object Resource Policy Detail.
147
+ type: BindingObjectResourcePolicyDetailOutputRepresentation
148
+ required: false
149
+ BindingObjectResourcePolicyDetailOutputRepresentation:
150
+ description: Usage Detail API output representation for Usage Resource Policy
151
+ Detail
152
+ type: object
153
+ properties:
154
+ drawdownOrder:
155
+ description: Drawdown Order
156
+ type: string | nil
157
+ id:
158
+ description: Binding Object Usage Resource Policy Id
159
+ type: string | nil
160
+ ratingFrequencyPolicy:
161
+ description: Rating frequency policy
162
+ type: PolicyDetailOutputRepresentation | nil
163
+ usageAggregationPolicy:
164
+ description: Usage aggregation policy
165
+ type: PolicyDetailOutputRepresentation | nil
166
+ usageCommitmentPolicy:
167
+ description: Usage commitment policy
168
+ type: PolicyDetailOutputRepresentation | nil
169
+ usageOveragePolicy:
170
+ description: Usage overage policy
171
+ type: PolicyDetailOutputRepresentation | nil
172
+ FieldsOutputRepresentation:
173
+ description: Usage Detail API output representation for optional fields in the QOCAL usage-based selling entities
174
+ type: object
175
+ properties:
176
+ displayValue:
177
+ description: The displayable value for a field.
178
+ type: string
179
+ value:
180
+ description: The value of a field in its raw data form.
181
+ type: any
182
+ LookupDetailOutputRepresentation:
183
+ description: Usage Detail API output representation for Record Detail
184
+ type: object
185
+ properties:
186
+ id:
187
+ description: Record ID
188
+ type: string | nil
189
+ NegotiatedGrantDetailOutputRepresentation:
190
+ description: Usage Detail API output representation for Negotiated Usage ResourceGrant
191
+ Detail
192
+ type: object
193
+ properties:
194
+ grantType:
195
+ description: Grant Type
196
+ type: string | nil
197
+ id:
198
+ description: Id
199
+ type: string | nil
200
+ required: false
201
+ quantity:
202
+ description: Quantity
203
+ type: number | nil
204
+ usageGrantNegotiable:
205
+ description: Usage grant negotiable
206
+ type: string | nil
207
+ usageRefreshPolicy:
208
+ description: Usage grant refresh policy ID
209
+ type: PolicyDetailOutputRepresentation | nil
210
+ usageRolloverPolicy:
211
+ description: Usage grant rollover policy ID
212
+ type: PolicyDetailOutputRepresentation | nil
213
+ validityPeriodTerm:
214
+ description: Validity period term
215
+ type: number | nil
216
+ validityPeriodUnit:
217
+ description: Validity period unit
218
+ type: string | nil
219
+ PolicyDetailOutputRepresentation:
220
+ description: Usage Detail API output representation for Policy Detail
221
+ type: object
222
+ properties:
223
+ id:
224
+ description: Policy ID
225
+ type: string | nil
226
+ negotiable:
227
+ description: Policy Negotiable Flag
228
+ type: string | nil
229
+ RateAdjustmentsOutputRepresentation:
230
+ description: Usage Detail API output representation for Rate Adjustments
231
+ type: object
232
+ properties:
233
+ fields:
234
+ description: List of optional fields and their values belonging to the QOCAL rate adjustment entity.
235
+ type: object
236
+ required: false
237
+ properties:
238
+ //:
239
+ type: any
240
+ lowerBound:
241
+ description: Minimum quantity for the adjustment to be applicable.
242
+ type: number | nil # TODO: hand rolled. W-16276582
243
+ name:
244
+ description: Name of the tier.
245
+ type: string | nil # TODO: hand rolled. W-16276582
246
+ negotiatedRateAdjustmentId:
247
+ description: ID of the Negotiated Rate Adjustment.
248
+ type: string | nil # TODO: hand rolled. W-16276582
249
+ rateAdjustmentId:
250
+ description: ID of the Rate Adjustment.
251
+ type: string
252
+ rateAdjustmentType:
253
+ description: Type of rate adjustment.
254
+ type: string | nil # TODO: hand rolled. W-16276582
255
+ rateAdjustmentValue:
256
+ description: Value of the adjustment.
257
+ type: number | nil # TODO: hand rolled. W-16276582
258
+ tierUnitOfMeasure:
259
+ description: The unit of measure representing the tier.
260
+ type: string | nil # TODO: hand rolled. W-16276582
261
+ upperBound:
262
+ description: Maximum quantity for the adjustment to be applicable.
263
+ type: number | nil # TODO: hand rolled. W-16276582
264
+ RateCardEntryOutputRepresentation:
265
+ description: Usage Detail API output representation for Rate Card Entry
266
+ type: object
267
+ properties:
268
+ bindingInstanceTargetType:
269
+ description: Type of the target entity which is binding with this transaction
270
+ type: string | nil # TODO: hand rolled. W-16835275
271
+ required: false
272
+ bindingInstanceType:
273
+ description: A static enum with values “Self” and “Target”.
274
+ type: string | nil # TODO: hand rolled. W-16835275
275
+ required: false
276
+ chargeForOverages:
277
+ description: 'Specifies whether overage is allowed. Valid values are: Yes,
278
+ No, NA'
279
+ type: string | nil # TODO: hand rolled. W-16276582
280
+ fields:
281
+ description: List of optional fields and their values belonging to the QOCAL rate card entry entity.
282
+ type: object
283
+ required: false
284
+ properties:
285
+ //:
286
+ type: any
287
+ isOptional:
288
+ description: Requirement flag for Commitment
289
+ type: boolean | nil
290
+ required: false
291
+ name:
292
+ description: Name of the resource.
293
+ type: string | nil # TODO: hand rolled. W-16276582
294
+ negotiable:
295
+ description: 'Specifies the negotiable type. Valid values are: Negotiable,
296
+ NonNegotiable'
297
+ type: string | nil # TODO: hand rolled. W-16276582
298
+ negotiatedRate:
299
+ description: User-overridden rate.
300
+ type: number | nil # TODO: hand rolled. W-16276582
301
+ negotiatedRateCardEntryId:
302
+ description: ID of the negotiated rate card entry.
303
+ type: string | nil # TODO: hand rolled. W-16276582
304
+ quantity:
305
+ description: Amount granted for the resource.
306
+ type: number | nil # TODO: hand rolled. W-16276582
307
+ rate:
308
+ description: Base rate.
309
+ type: number | nil # TODO: hand rolled. W-16276582
310
+ rateAdjustments:
311
+ description: List of tiers associated with the rate card entry, if applicable.
312
+ type: array
313
+ items:
314
+ type: RateAdjustmentsOutputRepresentation | nil
315
+ rateCardEntryId:
316
+ description: ID of the rate card entry.
317
+ type: string
318
+ rateUnitOfMeasureName:
319
+ description: Unit of measure name in which usage resource is rated.
320
+ type: string | nil
321
+ unitOfMeasure:
322
+ description: Unit of measure for the grant.
323
+ type: string | nil # TODO: hand rolled. W-16276582
324
+ unitOfMeasureCode:
325
+ description: The unit of measure code representing the overage rate.
326
+ type: string | nil # TODO: hand rolled. W-16276582
327
+ usageResourceGrantAndPolicyDetail:
328
+ description: Usage resource grant and policy detail.
329
+ type: UsageResourceGrantAndPolicyDetailOutputRepresentation
330
+ required: false
331
+ usageResourceId:
332
+ description: Usage Resource ID
333
+ type: string | nil
334
+ required: false
335
+ ResourcePolicyDetailOutputRepresentation:
336
+ description: Usage Detail API output representation for Usage Resource Policy
337
+ Detail
338
+ type: object
339
+ properties:
340
+ id:
341
+ description: Id
342
+ type: string | nil
343
+ required: false
344
+ ratingFrequencyPolicy:
345
+ description: Rating frequency policy
346
+ type: PolicyDetailOutputRepresentation | nil
347
+ usageAggregationPolicy:
348
+ description: Usage aggregation policy
349
+ type: PolicyDetailOutputRepresentation | nil
350
+ usageCommitmentPolicy:
351
+ description: Usage commitment policy
352
+ type: PolicyDetailOutputRepresentation | nil
353
+ usageOveragePolicy:
354
+ description: Usage overage policy
355
+ type: PolicyDetailOutputRepresentation | nil
356
+ UsageDetailBindingObjectOutputRepresentation:
357
+ description: Usage Detail API output representation for Binding Object
358
+ type: object
359
+ properties:
360
+ errors:
361
+ description: List of errors.
362
+ type: array
363
+ required: false
364
+ items:
365
+ type: UsageDetailErrorResponseRepresentation
366
+ records:
367
+ description: List of binding target detail records.
368
+ type: array
369
+ required: false
370
+ items:
371
+ type: BindingObjectDetailOutputRepresentation
372
+ UsageDetailErrorResponseRepresentation:
373
+ description: The output representation for an error for Usage Detail
374
+ type: object
375
+ properties:
376
+ errorCode:
377
+ description: Error Code
378
+ type: string
379
+ message:
380
+ description: Error Message
381
+ type: string
382
+ referenceId:
383
+ description: Reference ID
384
+ type: string
385
+ UsageDetailOutputRepresentation:
386
+ description: Usage Detail API output representation
387
+ type: object
388
+ properties:
389
+ errors:
390
+ description: List of errors.
391
+ type: array
392
+ required: false
393
+ items:
394
+ type: UsageDetailErrorResponseRepresentation
395
+ records:
396
+ description: List of rate card entry records.
397
+ type: array
398
+ required: false
399
+ items:
400
+ type: RateCardEntryOutputRepresentation
401
+ UsageResourceGrantAndPolicyDetailOutputRepresentation:
402
+ description: Usage Detail API output representation for Usage Resource Grant And
403
+ Policy Detail
404
+ type: object
405
+ properties:
406
+ grantDetail:
407
+ description: Usage resource grant detail.
408
+ type: NegotiatedGrantDetailOutputRepresentation
409
+ required: false
410
+ negotiatedGrantDetail:
411
+ description: Usage resource negotiated grant detail.
412
+ type: NegotiatedGrantDetailOutputRepresentation
413
+ required: false
414
+ negotiatedResourcePolicyDetail:
415
+ description: Usage resource negotiated policy detail.
416
+ type: ResourcePolicyDetailOutputRepresentation
417
+ required: false
418
+ resourcePolicyDetail:
419
+ description: Usage resource policy detail.
420
+ type: ResourcePolicyDetailOutputRepresentation
421
+ required: false
422
+ /asset-management/assets/{assetId}/usage-details:
423
+ get:
424
+ displayName: getUsageDetail
425
+ description: Gets Usage Details.
426
+ responses:
427
+ '200':
428
+ description: Success
429
+ body:
430
+ application/json:
431
+ type: UsageDetailOutputRepresentation
432
+ queryParameters:
433
+ effectiveDate:
434
+ type: string
435
+ required: false
436
+ default: ''
437
+ optionalFields:
438
+ type: array
439
+ required: false
440
+ default: []
441
+ items:
442
+ type: string
443
+ (oas-collectionFormat): csv
444
+ uriParameters:
445
+ assetId:
446
+ type: string
447
+ required: true
448
+ /commerce:
449
+ /quotes/line-items/{quoteLineItemId}/usage-details:
450
+ get:
451
+ displayName: getUsageDetail
452
+ description: Gets Usage Details.
453
+ responses:
454
+ '200':
455
+ description: Success
456
+ body:
457
+ application/json:
458
+ type: UsageDetailOutputRepresentation
459
+ queryParameters:
460
+ effectiveDate:
461
+ type: string
462
+ required: false
463
+ default: ''
464
+ optionalFields:
465
+ type: array
466
+ required: false
467
+ default: []
468
+ items:
469
+ type: string
470
+ (oas-collectionFormat): csv
471
+ uriParameters:
472
+ quoteLineItemId:
473
+ type: string
474
+ required: true
475
+ /sales-orders:
476
+ /line-items/{orderItemId}/usage-details:
477
+ get:
478
+ displayName: getUsageDetail
479
+ description: Gets Usage Details.
480
+ responses:
481
+ '200':
482
+ description: Success
483
+ body:
484
+ application/json:
485
+ type: UsageDetailOutputRepresentation
486
+ queryParameters:
487
+ effectiveDate:
488
+ type: string
489
+ required: false
490
+ default: ''
491
+ optionalFields:
492
+ type: array
493
+ required: false
494
+ default: []
495
+ items:
496
+ type: string
497
+ (oas-collectionFormat): csv
498
+ uriParameters:
499
+ orderItemId:
500
+ type: string
501
+ required: true
502
+ /revenue/usage-management/binding-objects/{bindingObjectId}/actions/usage-details:
503
+ get:
504
+ displayName: getBindingObjectUsageDetail
505
+ description: Gets Usage Details for Binding Object.
506
+ responses:
507
+ '200':
508
+ description: Success
509
+ body:
510
+ application/json:
511
+ type: UsageDetailBindingObjectOutputRepresentation
512
+ queryParameters:
513
+ effectiveDate:
514
+ type: string
515
+ required: false
516
+ default: ''
517
+ uriParameters:
518
+ bindingObjectId:
519
+ type: string
520
+ required: true
@@ -0,0 +1,32 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'usage-detail'
8
+
9
+ types:
10
+ UsageDetailOutputRepresentation:
11
+ (luvio.ttl): 1000
12
+ UsageDetailBindingObjectOutputRepresentation:
13
+ (luvio.ttl): 1000
14
+
15
+ /asset-management/assets/{assetId}/usage-details:
16
+ get:
17
+ (luvio.adapter):
18
+ name: getAssetUsageDetails
19
+ /commerce:
20
+ /quotes/line-items/{quoteLineItemId}/usage-details:
21
+ get:
22
+ (luvio.adapter):
23
+ name: getQuoteUsageDetails
24
+ /sales-orders:
25
+ /line-items/{orderItemId}/usage-details:
26
+ get:
27
+ (luvio.adapter):
28
+ name: getOrderUsageDetails
29
+ /revenue/usage-management/binding-objects/{bindingObjectId}/actions/usage-details:
30
+ get:
31
+ (luvio.adapter):
32
+ name: getBindingObjectUsageDetails