@raystack/frontier 0.8.3 → 0.8.5

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.
package/dist/index.mjs CHANGED
@@ -183,6 +183,23 @@ var HttpClient = class {
183
183
  var V1Beta1 = class extends HttpClient {
184
184
  constructor() {
185
185
  super(...arguments);
186
+ /**
187
+ * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user, group or a service account.
188
+ *
189
+ * @tags Authz
190
+ * @name AdminServiceCheckFederatedResourcePermission
191
+ * @summary Check
192
+ * @request POST:/v1beta1/admin/check
193
+ * @secure
194
+ */
195
+ this.adminServiceCheckFederatedResourcePermission = (body, params = {}) => this.request(__spreadValues({
196
+ path: `/v1beta1/admin/check`,
197
+ method: "POST",
198
+ body,
199
+ secure: true,
200
+ type: "application/json" /* Json */,
201
+ format: "json"
202
+ }, params));
186
203
  /**
187
204
  * @description Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
188
205
  *
@@ -215,6 +232,23 @@ var V1Beta1 = class extends HttpClient {
215
232
  secure: true,
216
233
  format: "json"
217
234
  }, params));
235
+ /**
236
+ * @description Adds a user to a platform.
237
+ *
238
+ * @tags Platform
239
+ * @name AdminServiceAddPlatformUser
240
+ * @summary Add platform user
241
+ * @request POST:/v1beta1/admin/platform/users
242
+ * @secure
243
+ */
244
+ this.adminServiceAddPlatformUser = (body, params = {}) => this.request(__spreadValues({
245
+ path: `/v1beta1/admin/platform/users`,
246
+ method: "POST",
247
+ body,
248
+ secure: true,
249
+ type: "application/json" /* Json */,
250
+ format: "json"
251
+ }, params));
218
252
  /**
219
253
  * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
220
254
  *
@@ -439,7 +473,151 @@ var V1Beta1 = class extends HttpClient {
439
473
  format: "json"
440
474
  }, params));
441
475
  /**
442
- * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts).
476
+ * @description List all transactions of a billing account.
477
+ *
478
+ * @tags Transaction
479
+ * @name FrontierServiceListBillingTransactions
480
+ * @summary List billing transactions
481
+ * @request GET:/v1beta1/billing/{billingId}/transactions
482
+ * @secure
483
+ */
484
+ this.frontierServiceListBillingTransactions = (billingId, query, params = {}) => this.request(__spreadValues({
485
+ path: `/v1beta1/billing/${billingId}/transactions`,
486
+ method: "GET",
487
+ query,
488
+ secure: true,
489
+ format: "json"
490
+ }, params));
491
+ /**
492
+ * @description List all features of a platform.
493
+ *
494
+ * @tags Feature
495
+ * @name FrontierServiceListFeatures
496
+ * @summary List features
497
+ * @request GET:/v1beta1/billing/features
498
+ * @secure
499
+ */
500
+ this.frontierServiceListFeatures = (params = {}) => this.request(__spreadValues({
501
+ path: `/v1beta1/billing/features`,
502
+ method: "GET",
503
+ secure: true,
504
+ format: "json"
505
+ }, params));
506
+ /**
507
+ * @description Create a new feature for platform.
508
+ *
509
+ * @tags Feature
510
+ * @name FrontierServiceCreateFeature
511
+ * @summary Create feature
512
+ * @request POST:/v1beta1/billing/features
513
+ * @secure
514
+ */
515
+ this.frontierServiceCreateFeature = (body, params = {}) => this.request(__spreadValues({
516
+ path: `/v1beta1/billing/features`,
517
+ method: "POST",
518
+ body,
519
+ secure: true,
520
+ type: "application/json" /* Json */,
521
+ format: "json"
522
+ }, params));
523
+ /**
524
+ * @description Get a feature by ID.
525
+ *
526
+ * @tags Feature
527
+ * @name FrontierServiceGetFeature
528
+ * @summary Get feature
529
+ * @request GET:/v1beta1/billing/features/{id}
530
+ * @secure
531
+ */
532
+ this.frontierServiceGetFeature = (id, params = {}) => this.request(__spreadValues({
533
+ path: `/v1beta1/billing/features/${id}`,
534
+ method: "GET",
535
+ secure: true,
536
+ format: "json"
537
+ }, params));
538
+ /**
539
+ * @description Update a feature by ID.
540
+ *
541
+ * @tags Feature
542
+ * @name FrontierServiceUpdateFeature
543
+ * @summary Update feature
544
+ * @request PUT:/v1beta1/billing/features/{id}
545
+ * @secure
546
+ */
547
+ this.frontierServiceUpdateFeature = (id, body, params = {}) => this.request(__spreadValues({
548
+ path: `/v1beta1/billing/features/${id}`,
549
+ method: "PUT",
550
+ body,
551
+ secure: true,
552
+ type: "application/json" /* Json */,
553
+ format: "json"
554
+ }, params));
555
+ /**
556
+ * @description List all plans.
557
+ *
558
+ * @tags Plan
559
+ * @name FrontierServiceListPlans
560
+ * @summary List plans
561
+ * @request GET:/v1beta1/billing/plans
562
+ * @secure
563
+ */
564
+ this.frontierServiceListPlans = (params = {}) => this.request(__spreadValues({
565
+ path: `/v1beta1/billing/plans`,
566
+ method: "GET",
567
+ secure: true,
568
+ format: "json"
569
+ }, params));
570
+ /**
571
+ * @description Create a new plan for platform.
572
+ *
573
+ * @tags Plan
574
+ * @name FrontierServiceCreatePlan
575
+ * @summary Create plan
576
+ * @request POST:/v1beta1/billing/plans
577
+ * @secure
578
+ */
579
+ this.frontierServiceCreatePlan = (body, params = {}) => this.request(__spreadValues({
580
+ path: `/v1beta1/billing/plans`,
581
+ method: "POST",
582
+ body,
583
+ secure: true,
584
+ type: "application/json" /* Json */,
585
+ format: "json"
586
+ }, params));
587
+ /**
588
+ * @description Get a plan by ID.
589
+ *
590
+ * @tags Plan
591
+ * @name FrontierServiceGetPlan
592
+ * @summary Get plan
593
+ * @request GET:/v1beta1/billing/plans/{id}
594
+ * @secure
595
+ */
596
+ this.frontierServiceGetPlan = (id, params = {}) => this.request(__spreadValues({
597
+ path: `/v1beta1/billing/plans/${id}`,
598
+ method: "GET",
599
+ secure: true,
600
+ format: "json"
601
+ }, params));
602
+ /**
603
+ * @description Update a plan by ID.
604
+ *
605
+ * @tags Plan
606
+ * @name FrontierServiceUpdatePlan
607
+ * @summary Update plan
608
+ * @request PUT:/v1beta1/billing/plans/{id}
609
+ * @secure
610
+ */
611
+ this.frontierServiceUpdatePlan = (id, body, params = {}) => this.request(__spreadValues({
612
+ path: `/v1beta1/billing/plans/${id}`,
613
+ method: "PUT",
614
+ body,
615
+ secure: true,
616
+ type: "application/json" /* Json */,
617
+ format: "json"
618
+ }, params));
619
+ /**
620
+ * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
443
621
  *
444
622
  * @tags Authz
445
623
  * @name FrontierServiceCheckResourcePermission
@@ -876,6 +1054,228 @@ var V1Beta1 = class extends HttpClient {
876
1054
  secure: true,
877
1055
  format: "json"
878
1056
  }, params));
1057
+ /**
1058
+ * @description List billing accounts of an organization.
1059
+ *
1060
+ * @tags Billing
1061
+ * @name FrontierServiceListBillingAccounts
1062
+ * @summary List billing accounts
1063
+ * @request GET:/v1beta1/organizations/{orgId}/billing
1064
+ * @secure
1065
+ */
1066
+ this.frontierServiceListBillingAccounts = (orgId, params = {}) => this.request(__spreadValues({
1067
+ path: `/v1beta1/organizations/${orgId}/billing`,
1068
+ method: "GET",
1069
+ secure: true,
1070
+ format: "json"
1071
+ }, params));
1072
+ /**
1073
+ * @description Create a new billing account for an organization.
1074
+ *
1075
+ * @tags Billing
1076
+ * @name FrontierServiceCreateBillingAccount
1077
+ * @summary Create billing account
1078
+ * @request POST:/v1beta1/organizations/{orgId}/billing
1079
+ * @secure
1080
+ */
1081
+ this.frontierServiceCreateBillingAccount = (orgId, body, params = {}) => this.request(__spreadValues({
1082
+ path: `/v1beta1/organizations/${orgId}/billing`,
1083
+ method: "POST",
1084
+ body,
1085
+ secure: true,
1086
+ type: "application/json" /* Json */,
1087
+ format: "json"
1088
+ }, params));
1089
+ /**
1090
+ * @description Check if a billing account is entitled to a feature.
1091
+ *
1092
+ * @tags Entitlement
1093
+ * @name FrontierServiceCheckFeatureEntitlement
1094
+ * @summary Check entitlement
1095
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/check
1096
+ * @secure
1097
+ */
1098
+ this.frontierServiceCheckFeatureEntitlement = (orgId, billingId, body, params = {}) => this.request(__spreadValues({
1099
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/check`,
1100
+ method: "POST",
1101
+ body,
1102
+ secure: true,
1103
+ type: "application/json" /* Json */,
1104
+ format: "json"
1105
+ }, params));
1106
+ /**
1107
+ * @description List all checkouts of a billing account.
1108
+ *
1109
+ * @tags Checkout
1110
+ * @name FrontierServiceListCheckouts
1111
+ * @summary List checkouts
1112
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts
1113
+ * @secure
1114
+ */
1115
+ this.frontierServiceListCheckouts = (orgId, billingId, params = {}) => this.request(__spreadValues({
1116
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/checkouts`,
1117
+ method: "GET",
1118
+ secure: true,
1119
+ format: "json"
1120
+ }, params));
1121
+ /**
1122
+ * @description Checkout a feature to buy it one time or start a subscription plan on a billing account.
1123
+ *
1124
+ * @tags Checkout
1125
+ * @name FrontierServiceCreateCheckout
1126
+ * @summary Checkout a feature or subscription
1127
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts
1128
+ * @secure
1129
+ */
1130
+ this.frontierServiceCreateCheckout = (orgId, billingId, body, params = {}) => this.request(__spreadValues({
1131
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/checkouts`,
1132
+ method: "POST",
1133
+ body,
1134
+ secure: true,
1135
+ type: "application/json" /* Json */,
1136
+ format: "json"
1137
+ }, params));
1138
+ /**
1139
+ * @description List subscriptions of a billing account.
1140
+ *
1141
+ * @tags Subscription
1142
+ * @name FrontierServiceListSubscriptions
1143
+ * @summary List subscriptions
1144
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions
1145
+ * @secure
1146
+ */
1147
+ this.frontierServiceListSubscriptions = (orgId, billingId, params = {}) => this.request(__spreadValues({
1148
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions`,
1149
+ method: "GET",
1150
+ secure: true,
1151
+ format: "json"
1152
+ }, params));
1153
+ /**
1154
+ * @description Get a subscription by ID.
1155
+ *
1156
+ * @tags Subscription
1157
+ * @name FrontierServiceGetSubscription
1158
+ * @summary Get subscription
1159
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}
1160
+ * @secure
1161
+ */
1162
+ this.frontierServiceGetSubscription = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1163
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}`,
1164
+ method: "GET",
1165
+ secure: true,
1166
+ format: "json"
1167
+ }, params));
1168
+ /**
1169
+ * @description Update a subscription by ID.
1170
+ *
1171
+ * @tags Subscription
1172
+ * @name FrontierServiceUpdateSubscription
1173
+ * @summary Update subscription
1174
+ * @request PUT:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}
1175
+ * @secure
1176
+ */
1177
+ this.frontierServiceUpdateSubscription = (orgId, billingId, id, body, params = {}) => this.request(__spreadValues({
1178
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}`,
1179
+ method: "PUT",
1180
+ body,
1181
+ secure: true,
1182
+ type: "application/json" /* Json */,
1183
+ format: "json"
1184
+ }, params));
1185
+ /**
1186
+ * @description Cancel a subscription by ID.
1187
+ *
1188
+ * @tags Subscription
1189
+ * @name FrontierServiceCancelSubscription
1190
+ * @summary Cancel subscription
1191
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}/cancel
1192
+ * @secure
1193
+ */
1194
+ this.frontierServiceCancelSubscription = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1195
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}/cancel`,
1196
+ method: "POST",
1197
+ secure: true,
1198
+ format: "json"
1199
+ }, params));
1200
+ /**
1201
+ * @description Report a new billing usage for a billing account.
1202
+ *
1203
+ * @tags Usage
1204
+ * @name FrontierServiceCreateBillingUsage
1205
+ * @summary Create billing usage
1206
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/usages
1207
+ * @secure
1208
+ */
1209
+ this.frontierServiceCreateBillingUsage = (orgId, billingId, body, params = {}) => this.request(__spreadValues({
1210
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/usages`,
1211
+ method: "POST",
1212
+ body,
1213
+ secure: true,
1214
+ type: "application/json" /* Json */,
1215
+ format: "json"
1216
+ }, params));
1217
+ /**
1218
+ * @description Get a billing account by ID.
1219
+ *
1220
+ * @tags Billing
1221
+ * @name FrontierServiceGetBillingAccount
1222
+ * @summary Get billing account
1223
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{id}
1224
+ * @secure
1225
+ */
1226
+ this.frontierServiceGetBillingAccount = (orgId, id, params = {}) => this.request(__spreadValues({
1227
+ path: `/v1beta1/organizations/${orgId}/billing/${id}`,
1228
+ method: "GET",
1229
+ secure: true,
1230
+ format: "json"
1231
+ }, params));
1232
+ /**
1233
+ * @description Delete a billing account by ID.
1234
+ *
1235
+ * @tags Billing
1236
+ * @name FrontierServiceDeleteBillingAccount
1237
+ * @summary Delete billing account
1238
+ * @request DELETE:/v1beta1/organizations/{orgId}/billing/{id}
1239
+ * @secure
1240
+ */
1241
+ this.frontierServiceDeleteBillingAccount = (orgId, id, params = {}) => this.request(__spreadValues({
1242
+ path: `/v1beta1/organizations/${orgId}/billing/${id}`,
1243
+ method: "DELETE",
1244
+ secure: true,
1245
+ format: "json"
1246
+ }, params));
1247
+ /**
1248
+ * @description Update a billing account by ID.
1249
+ *
1250
+ * @tags Billing
1251
+ * @name FrontierServiceUpdateBillingAccount
1252
+ * @summary Update billing account
1253
+ * @request PUT:/v1beta1/organizations/{orgId}/billing/{id}
1254
+ * @secure
1255
+ */
1256
+ this.frontierServiceUpdateBillingAccount = (orgId, id, body, params = {}) => this.request(__spreadValues({
1257
+ path: `/v1beta1/organizations/${orgId}/billing/${id}`,
1258
+ method: "PUT",
1259
+ body,
1260
+ secure: true,
1261
+ type: "application/json" /* Json */,
1262
+ format: "json"
1263
+ }, params));
1264
+ /**
1265
+ * @description Get the balance of a billing account by ID.
1266
+ *
1267
+ * @tags Billing
1268
+ * @name FrontierServiceGetBillingBalance
1269
+ * @summary Get billing balance
1270
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{id}/balance
1271
+ * @secure
1272
+ */
1273
+ this.frontierServiceGetBillingBalance = (orgId, id, params = {}) => this.request(__spreadValues({
1274
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/balance`,
1275
+ method: "GET",
1276
+ secure: true,
1277
+ format: "json"
1278
+ }, params));
879
1279
  /**
880
1280
  * @description Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation.
881
1281
  *
@@ -996,9 +1396,10 @@ var V1Beta1 = class extends HttpClient {
996
1396
  * @request GET:/v1beta1/organizations/{orgId}/groups/{id}
997
1397
  * @secure
998
1398
  */
999
- this.frontierServiceGetGroup = (orgId, id, params = {}) => this.request(__spreadValues({
1399
+ this.frontierServiceGetGroup = (orgId, id, query, params = {}) => this.request(__spreadValues({
1000
1400
  path: `/v1beta1/organizations/${orgId}/groups/${id}`,
1001
1401
  method: "GET",
1402
+ query,
1002
1403
  secure: true,
1003
1404
  format: "json"
1004
1405
  }, params));
@@ -1367,12 +1768,12 @@ var V1Beta1 = class extends HttpClient {
1367
1768
  * @description Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
1368
1769
  *
1369
1770
  * @tags Policy
1370
- * @name AdminServiceListPolicies
1771
+ * @name FrontierServiceListPolicies
1371
1772
  * @summary List all policies
1372
1773
  * @request GET:/v1beta1/policies
1373
1774
  * @secure
1374
1775
  */
1375
- this.adminServiceListPolicies = (query, params = {}) => this.request(__spreadValues({
1776
+ this.frontierServiceListPolicies = (query, params = {}) => this.request(__spreadValues({
1376
1777
  path: `/v1beta1/policies`,
1377
1778
  method: "GET",
1378
1779
  query,
@@ -1606,9 +2007,10 @@ var V1Beta1 = class extends HttpClient {
1606
2007
  * @request GET:/v1beta1/projects/{id}/groups
1607
2008
  * @secure
1608
2009
  */
1609
- this.frontierServiceListProjectGroups = (id, params = {}) => this.request(__spreadValues({
2010
+ this.frontierServiceListProjectGroups = (id, query, params = {}) => this.request(__spreadValues({
1610
2011
  path: `/v1beta1/projects/${id}/groups`,
1611
2012
  method: "GET",
2013
+ query,
1612
2014
  secure: true,
1613
2015
  format: "json"
1614
2016
  }, params));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raystack/frontier",
3
- "version": "v0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "A js library for frontier",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",