@kanda-libs/ks-schema 1.0.93 → 1.0.94

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 (50) hide show
  1. package/dist/components/schemas/Company.d.ts +2 -0
  2. package/dist/components/schemas/Company.d.ts.map +1 -1
  3. package/dist/components/schemas/Company.js +11 -0
  4. package/dist/components/schemas/Event.d.ts +39 -0
  5. package/dist/components/schemas/Event.d.ts.map +1 -0
  6. package/dist/components/schemas/Event.js +50 -0
  7. package/dist/components/schemas/Subscription.d.ts +70 -0
  8. package/dist/components/schemas/Subscription.d.ts.map +1 -0
  9. package/dist/components/schemas/Subscription.js +48 -0
  10. package/dist/components/schemas/index.d.ts +2 -0
  11. package/dist/components/schemas/index.d.ts.map +1 -1
  12. package/dist/components/schemas/index.js +2 -0
  13. package/dist/operations/approveCompany.d.ts +1 -0
  14. package/dist/operations/approveCompany.d.ts.map +1 -1
  15. package/dist/operations/deleteCompany.d.ts +1 -0
  16. package/dist/operations/deleteCompany.d.ts.map +1 -1
  17. package/dist/operations/deleteSubscription.d.ts +82 -0
  18. package/dist/operations/deleteSubscription.d.ts.map +1 -0
  19. package/dist/operations/deleteSubscription.js +44 -0
  20. package/dist/operations/getCompanies.d.ts +1 -0
  21. package/dist/operations/getCompanies.d.ts.map +1 -1
  22. package/dist/operations/getCompany.d.ts +1 -0
  23. package/dist/operations/getCompany.d.ts.map +1 -1
  24. package/dist/operations/getSubscription.d.ts +82 -0
  25. package/dist/operations/getSubscription.d.ts.map +1 -0
  26. package/dist/operations/getSubscription.js +44 -0
  27. package/dist/operations/getSubscriptions.d.ts +73 -0
  28. package/dist/operations/getSubscriptions.d.ts.map +1 -0
  29. package/dist/operations/getSubscriptions.js +38 -0
  30. package/dist/operations/index.d.ts +386 -0
  31. package/dist/operations/index.d.ts.map +1 -1
  32. package/dist/operations/index.js +24 -1
  33. package/dist/operations/postCompany.d.ts +1 -0
  34. package/dist/operations/postCompany.d.ts.map +1 -1
  35. package/dist/operations/postSubscription.d.ts +78 -0
  36. package/dist/operations/postSubscription.d.ts.map +1 -0
  37. package/dist/operations/postSubscription.js +43 -0
  38. package/dist/operations/providerWebhook.d.ts +1 -1
  39. package/dist/operations/providerWebhook.d.ts.map +1 -1
  40. package/dist/operations/putCompany.d.ts +1 -0
  41. package/dist/operations/putCompany.d.ts.map +1 -1
  42. package/dist/operations/putSubscription.d.ts +87 -0
  43. package/dist/operations/putSubscription.d.ts.map +1 -0
  44. package/dist/operations/putSubscription.js +50 -0
  45. package/dist/schema.json +1 -1
  46. package/dist/widget/index.d.ts +2692 -2252
  47. package/dist/widget/index.d.ts.map +1 -1
  48. package/dist/widget/index.js +5499 -5030
  49. package/package.json +1 -1
  50. package/schema.yaml +293 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-schema",
3
- "version": "1.0.93",
3
+ "version": "1.0.94",
4
4
  "description": "Kanda Service OpenAPI Schema",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/schema.yaml CHANGED
@@ -1426,10 +1426,10 @@ paths:
1426
1426
  schema:
1427
1427
  type: string
1428
1428
  enum:
1429
+ - gocardless
1430
+ - omni
1429
1431
  - stripe
1430
1432
  - veriff
1431
- - omni
1432
- - duologi
1433
1433
  responses:
1434
1434
  200:
1435
1435
  description: provider webhook accepted
@@ -1479,6 +1479,143 @@ paths:
1479
1479
  schema:
1480
1480
  $ref: "#/components/schemas/Error"
1481
1481
 
1482
+ /api/subscription:
1483
+ get:
1484
+ operationId: getSubscriptions
1485
+ summary: get all subscriptions
1486
+ tags:
1487
+ - Subscription
1488
+ responses:
1489
+ 200:
1490
+ description: got all subscriptions
1491
+ content:
1492
+ application/json:
1493
+ schema:
1494
+ type: array
1495
+ items:
1496
+ $ref: "#/components/schemas/Subscription"
1497
+ default:
1498
+ description: unexpected error
1499
+ content:
1500
+ application/json:
1501
+ schema:
1502
+ $ref: "#/components/schemas/Error"
1503
+
1504
+ post:
1505
+ operationId: postSubscription
1506
+ summary: post new subscription
1507
+ tags:
1508
+ - Subscription
1509
+ requestBody:
1510
+ description: post new subscription
1511
+ required: true
1512
+ content:
1513
+ application/json:
1514
+ schema:
1515
+ $ref: "#/components/schemas/Subscription"
1516
+ responses:
1517
+ 200:
1518
+ description: posted new subscription
1519
+ content:
1520
+ application/json:
1521
+ schema:
1522
+ $ref: "#/components/schemas/Subscription"
1523
+ default:
1524
+ description: unexpected error
1525
+ content:
1526
+ application/json:
1527
+ schema:
1528
+ $ref: "#/components/schemas/Error"
1529
+
1530
+ /api/subscription/{id}:
1531
+ get:
1532
+ operationId: getSubscription
1533
+ summary: get existing subscription
1534
+ tags:
1535
+ - Subscription
1536
+ parameters:
1537
+ - name: id
1538
+ in: path
1539
+ description: subscription id
1540
+ required: true
1541
+ schema:
1542
+ type: string
1543
+ minLength: 1
1544
+ responses:
1545
+ 200:
1546
+ description: got existing subscription
1547
+ content:
1548
+ application/json:
1549
+ schema:
1550
+ $ref: "#/components/schemas/Subscription"
1551
+ default:
1552
+ description: unexpected error
1553
+ content:
1554
+ application/json:
1555
+ schema:
1556
+ $ref: "#/components/schemas/Error"
1557
+
1558
+ put:
1559
+ operationId: putSubscription
1560
+ summary: put existing subscription
1561
+ tags:
1562
+ - Subscription
1563
+ parameters:
1564
+ - name: id
1565
+ in: path
1566
+ description: subscription id
1567
+ required: true
1568
+ schema:
1569
+ type: string
1570
+ minLength: 1
1571
+ requestBody:
1572
+ description: put existing subscription
1573
+ required: true
1574
+ content:
1575
+ application/json:
1576
+ schema:
1577
+ $ref: "#/components/schemas/Subscription"
1578
+ responses:
1579
+ 200:
1580
+ description: put existing subscription
1581
+ content:
1582
+ application/json:
1583
+ schema:
1584
+ $ref: "#/components/schemas/Subscription"
1585
+ default:
1586
+ description: unexpected error
1587
+ content:
1588
+ application/json:
1589
+ schema:
1590
+ $ref: "#/components/schemas/Error"
1591
+
1592
+ delete:
1593
+ operationId: deleteSubscription
1594
+ summary: delete existing subscription
1595
+ tags:
1596
+ - Subscription
1597
+ parameters:
1598
+ - name: id
1599
+ in: path
1600
+ description: subscription id
1601
+ required: true
1602
+ schema:
1603
+ type: string
1604
+ minLength: 1
1605
+ responses:
1606
+ 200:
1607
+ description: deleted existing subscription
1608
+ content:
1609
+ application/json:
1610
+ schema:
1611
+ $ref: "#/components/schemas/Subscription"
1612
+ default:
1613
+ description: unexpected error
1614
+ content:
1615
+ application/json:
1616
+ schema:
1617
+ $ref: "#/components/schemas/Error"
1618
+
1482
1619
  security:
1483
1620
  - BearerAuth: []
1484
1621
 
@@ -1793,6 +1930,21 @@ components:
1793
1930
  - verified
1794
1931
  default: registered
1795
1932
  readOnly: true
1933
+ billing:
1934
+ type: string
1935
+ title: company billing
1936
+ enum:
1937
+ - legacy
1938
+ - trial
1939
+ - pending
1940
+ - subscribed
1941
+ - recurring_payment_failed_1
1942
+ - recurring_payment_failed_2
1943
+ - recurring_payment_failed_3
1944
+ - suspended
1945
+ - cancelled
1946
+ default: legacy
1947
+ readOnly: true
1796
1948
  company_logo:
1797
1949
  type: object
1798
1950
  title: company logo document
@@ -2882,6 +3034,145 @@ components:
2882
3034
  type: string
2883
3035
  title: fingerprint reference such as IP
2884
3036
 
3037
+ Subscription:
3038
+ type: object
3039
+ properties:
3040
+ id:
3041
+ type: string
3042
+ title: subscription id
3043
+ readOnly: true
3044
+ cid:
3045
+ type: string
3046
+ title: company id
3047
+ readOnly: true
3048
+ oid:
3049
+ type: string
3050
+ title: owner id
3051
+ readOnly: true
3052
+ aid:
3053
+ type: string
3054
+ title: author id
3055
+ readOnly: true
3056
+ billing:
3057
+ type: string
3058
+ title: billing reference
3059
+ readOnly: true
3060
+ billing_status:
3061
+ type: string
3062
+ title: billing status
3063
+ readOnly: true
3064
+ mandate:
3065
+ type: string
3066
+ title: mandate reference
3067
+ readOnly: true
3068
+ mandate_status:
3069
+ type: string
3070
+ title: mandate status
3071
+ readOnly: true
3072
+ authorisation_url:
3073
+ type: string
3074
+ title: authorisation url to submit a mandate agreement
3075
+ readOnly: true
3076
+ interval:
3077
+ type: string
3078
+ title: subscription interval
3079
+ enum:
3080
+ - monthly
3081
+ - yearly
3082
+ default: monthly
3083
+ day_of_month:
3084
+ type: integer
3085
+ title: day of month for collection
3086
+ format: int32
3087
+ minimum: -1
3088
+ maximum: 28
3089
+ amount:
3090
+ type: object
3091
+ title: subscription amount
3092
+ $ref: "#/components/schemas/Money"
3093
+ readOnly: true
3094
+ events:
3095
+ type: array
3096
+ title: subscription events
3097
+ items:
3098
+ $ref: "#/components/schemas/Event"
3099
+ readOnly: true
3100
+ xid:
3101
+ type: string
3102
+ title: external reference id
3103
+ readOnly: true
3104
+ xref:
3105
+ type: string
3106
+ title: external reference
3107
+ readOnly: true
3108
+ metadata:
3109
+ type: object
3110
+ $ref: "#/components/schemas/Metadata"
3111
+ title: metadata
3112
+ readOnly: true
3113
+
3114
+ Event:
3115
+ type: object
3116
+ title: event
3117
+ required:
3118
+ - id
3119
+ - cid
3120
+ - oid
3121
+ - resource
3122
+ - action
3123
+ - source
3124
+ - result
3125
+ properties:
3126
+ id:
3127
+ type: string
3128
+ title: event id
3129
+ readOnly: true
3130
+ cid:
3131
+ type: string
3132
+ title: company id
3133
+ readOnly: true
3134
+ oid:
3135
+ type: string
3136
+ title: owner id
3137
+ readOnly: true
3138
+ aid:
3139
+ type: string
3140
+ title: author id
3141
+ readOnly: true
3142
+ resource:
3143
+ type: string
3144
+ title: event resource
3145
+ readOnly: true
3146
+ resource_id:
3147
+ type: string
3148
+ title: event resource id
3149
+ readOnly: true
3150
+ action:
3151
+ type: string
3152
+ title: event action
3153
+ readOnly: true
3154
+ source:
3155
+ type: string
3156
+ title: event source
3157
+ enum:
3158
+ - api
3159
+ - kanda
3160
+ - webhook
3161
+ readOnly: true
3162
+ result:
3163
+ type: string
3164
+ title: event result
3165
+ readOnly: true
3166
+ error:
3167
+ type: object
3168
+ title: event error
3169
+ $ref: "#/components/schemas/Error"
3170
+ metadata:
3171
+ type: object
3172
+ $ref: "#/components/schemas/Metadata"
3173
+ title: metadata
3174
+ readOnly: true
3175
+
2885
3176
  Error:
2886
3177
  type: object
2887
3178
  required: