@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.js CHANGED
@@ -208,6 +208,23 @@ var HttpClient = class {
208
208
  var V1Beta1 = class extends HttpClient {
209
209
  constructor() {
210
210
  super(...arguments);
211
+ /**
212
+ * @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.
213
+ *
214
+ * @tags Authz
215
+ * @name AdminServiceCheckFederatedResourcePermission
216
+ * @summary Check
217
+ * @request POST:/v1beta1/admin/check
218
+ * @secure
219
+ */
220
+ this.adminServiceCheckFederatedResourcePermission = (body, params = {}) => this.request(__spreadValues({
221
+ path: `/v1beta1/admin/check`,
222
+ method: "POST",
223
+ body,
224
+ secure: true,
225
+ type: "application/json" /* Json */,
226
+ format: "json"
227
+ }, params));
211
228
  /**
212
229
  * @description Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
213
230
  *
@@ -240,6 +257,23 @@ var V1Beta1 = class extends HttpClient {
240
257
  secure: true,
241
258
  format: "json"
242
259
  }, params));
260
+ /**
261
+ * @description Adds a user to a platform.
262
+ *
263
+ * @tags Platform
264
+ * @name AdminServiceAddPlatformUser
265
+ * @summary Add platform user
266
+ * @request POST:/v1beta1/admin/platform/users
267
+ * @secure
268
+ */
269
+ this.adminServiceAddPlatformUser = (body, params = {}) => this.request(__spreadValues({
270
+ path: `/v1beta1/admin/platform/users`,
271
+ method: "POST",
272
+ body,
273
+ secure: true,
274
+ type: "application/json" /* Json */,
275
+ format: "json"
276
+ }, params));
243
277
  /**
244
278
  * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
245
279
  *
@@ -464,7 +498,151 @@ var V1Beta1 = class extends HttpClient {
464
498
  format: "json"
465
499
  }, params));
466
500
  /**
467
- * @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).
501
+ * @description List all transactions of a billing account.
502
+ *
503
+ * @tags Transaction
504
+ * @name FrontierServiceListBillingTransactions
505
+ * @summary List billing transactions
506
+ * @request GET:/v1beta1/billing/{billingId}/transactions
507
+ * @secure
508
+ */
509
+ this.frontierServiceListBillingTransactions = (billingId, query, params = {}) => this.request(__spreadValues({
510
+ path: `/v1beta1/billing/${billingId}/transactions`,
511
+ method: "GET",
512
+ query,
513
+ secure: true,
514
+ format: "json"
515
+ }, params));
516
+ /**
517
+ * @description List all features of a platform.
518
+ *
519
+ * @tags Feature
520
+ * @name FrontierServiceListFeatures
521
+ * @summary List features
522
+ * @request GET:/v1beta1/billing/features
523
+ * @secure
524
+ */
525
+ this.frontierServiceListFeatures = (params = {}) => this.request(__spreadValues({
526
+ path: `/v1beta1/billing/features`,
527
+ method: "GET",
528
+ secure: true,
529
+ format: "json"
530
+ }, params));
531
+ /**
532
+ * @description Create a new feature for platform.
533
+ *
534
+ * @tags Feature
535
+ * @name FrontierServiceCreateFeature
536
+ * @summary Create feature
537
+ * @request POST:/v1beta1/billing/features
538
+ * @secure
539
+ */
540
+ this.frontierServiceCreateFeature = (body, params = {}) => this.request(__spreadValues({
541
+ path: `/v1beta1/billing/features`,
542
+ method: "POST",
543
+ body,
544
+ secure: true,
545
+ type: "application/json" /* Json */,
546
+ format: "json"
547
+ }, params));
548
+ /**
549
+ * @description Get a feature by ID.
550
+ *
551
+ * @tags Feature
552
+ * @name FrontierServiceGetFeature
553
+ * @summary Get feature
554
+ * @request GET:/v1beta1/billing/features/{id}
555
+ * @secure
556
+ */
557
+ this.frontierServiceGetFeature = (id, params = {}) => this.request(__spreadValues({
558
+ path: `/v1beta1/billing/features/${id}`,
559
+ method: "GET",
560
+ secure: true,
561
+ format: "json"
562
+ }, params));
563
+ /**
564
+ * @description Update a feature by ID.
565
+ *
566
+ * @tags Feature
567
+ * @name FrontierServiceUpdateFeature
568
+ * @summary Update feature
569
+ * @request PUT:/v1beta1/billing/features/{id}
570
+ * @secure
571
+ */
572
+ this.frontierServiceUpdateFeature = (id, body, params = {}) => this.request(__spreadValues({
573
+ path: `/v1beta1/billing/features/${id}`,
574
+ method: "PUT",
575
+ body,
576
+ secure: true,
577
+ type: "application/json" /* Json */,
578
+ format: "json"
579
+ }, params));
580
+ /**
581
+ * @description List all plans.
582
+ *
583
+ * @tags Plan
584
+ * @name FrontierServiceListPlans
585
+ * @summary List plans
586
+ * @request GET:/v1beta1/billing/plans
587
+ * @secure
588
+ */
589
+ this.frontierServiceListPlans = (params = {}) => this.request(__spreadValues({
590
+ path: `/v1beta1/billing/plans`,
591
+ method: "GET",
592
+ secure: true,
593
+ format: "json"
594
+ }, params));
595
+ /**
596
+ * @description Create a new plan for platform.
597
+ *
598
+ * @tags Plan
599
+ * @name FrontierServiceCreatePlan
600
+ * @summary Create plan
601
+ * @request POST:/v1beta1/billing/plans
602
+ * @secure
603
+ */
604
+ this.frontierServiceCreatePlan = (body, params = {}) => this.request(__spreadValues({
605
+ path: `/v1beta1/billing/plans`,
606
+ method: "POST",
607
+ body,
608
+ secure: true,
609
+ type: "application/json" /* Json */,
610
+ format: "json"
611
+ }, params));
612
+ /**
613
+ * @description Get a plan by ID.
614
+ *
615
+ * @tags Plan
616
+ * @name FrontierServiceGetPlan
617
+ * @summary Get plan
618
+ * @request GET:/v1beta1/billing/plans/{id}
619
+ * @secure
620
+ */
621
+ this.frontierServiceGetPlan = (id, params = {}) => this.request(__spreadValues({
622
+ path: `/v1beta1/billing/plans/${id}`,
623
+ method: "GET",
624
+ secure: true,
625
+ format: "json"
626
+ }, params));
627
+ /**
628
+ * @description Update a plan by ID.
629
+ *
630
+ * @tags Plan
631
+ * @name FrontierServiceUpdatePlan
632
+ * @summary Update plan
633
+ * @request PUT:/v1beta1/billing/plans/{id}
634
+ * @secure
635
+ */
636
+ this.frontierServiceUpdatePlan = (id, body, params = {}) => this.request(__spreadValues({
637
+ path: `/v1beta1/billing/plans/${id}`,
638
+ method: "PUT",
639
+ body,
640
+ secure: true,
641
+ type: "application/json" /* Json */,
642
+ format: "json"
643
+ }, params));
644
+ /**
645
+ * @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.
468
646
  *
469
647
  * @tags Authz
470
648
  * @name FrontierServiceCheckResourcePermission
@@ -901,6 +1079,228 @@ var V1Beta1 = class extends HttpClient {
901
1079
  secure: true,
902
1080
  format: "json"
903
1081
  }, params));
1082
+ /**
1083
+ * @description List billing accounts of an organization.
1084
+ *
1085
+ * @tags Billing
1086
+ * @name FrontierServiceListBillingAccounts
1087
+ * @summary List billing accounts
1088
+ * @request GET:/v1beta1/organizations/{orgId}/billing
1089
+ * @secure
1090
+ */
1091
+ this.frontierServiceListBillingAccounts = (orgId, params = {}) => this.request(__spreadValues({
1092
+ path: `/v1beta1/organizations/${orgId}/billing`,
1093
+ method: "GET",
1094
+ secure: true,
1095
+ format: "json"
1096
+ }, params));
1097
+ /**
1098
+ * @description Create a new billing account for an organization.
1099
+ *
1100
+ * @tags Billing
1101
+ * @name FrontierServiceCreateBillingAccount
1102
+ * @summary Create billing account
1103
+ * @request POST:/v1beta1/organizations/{orgId}/billing
1104
+ * @secure
1105
+ */
1106
+ this.frontierServiceCreateBillingAccount = (orgId, body, params = {}) => this.request(__spreadValues({
1107
+ path: `/v1beta1/organizations/${orgId}/billing`,
1108
+ method: "POST",
1109
+ body,
1110
+ secure: true,
1111
+ type: "application/json" /* Json */,
1112
+ format: "json"
1113
+ }, params));
1114
+ /**
1115
+ * @description Check if a billing account is entitled to a feature.
1116
+ *
1117
+ * @tags Entitlement
1118
+ * @name FrontierServiceCheckFeatureEntitlement
1119
+ * @summary Check entitlement
1120
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/check
1121
+ * @secure
1122
+ */
1123
+ this.frontierServiceCheckFeatureEntitlement = (orgId, billingId, body, params = {}) => this.request(__spreadValues({
1124
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/check`,
1125
+ method: "POST",
1126
+ body,
1127
+ secure: true,
1128
+ type: "application/json" /* Json */,
1129
+ format: "json"
1130
+ }, params));
1131
+ /**
1132
+ * @description List all checkouts of a billing account.
1133
+ *
1134
+ * @tags Checkout
1135
+ * @name FrontierServiceListCheckouts
1136
+ * @summary List checkouts
1137
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts
1138
+ * @secure
1139
+ */
1140
+ this.frontierServiceListCheckouts = (orgId, billingId, params = {}) => this.request(__spreadValues({
1141
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/checkouts`,
1142
+ method: "GET",
1143
+ secure: true,
1144
+ format: "json"
1145
+ }, params));
1146
+ /**
1147
+ * @description Checkout a feature to buy it one time or start a subscription plan on a billing account.
1148
+ *
1149
+ * @tags Checkout
1150
+ * @name FrontierServiceCreateCheckout
1151
+ * @summary Checkout a feature or subscription
1152
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts
1153
+ * @secure
1154
+ */
1155
+ this.frontierServiceCreateCheckout = (orgId, billingId, body, params = {}) => this.request(__spreadValues({
1156
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/checkouts`,
1157
+ method: "POST",
1158
+ body,
1159
+ secure: true,
1160
+ type: "application/json" /* Json */,
1161
+ format: "json"
1162
+ }, params));
1163
+ /**
1164
+ * @description List subscriptions of a billing account.
1165
+ *
1166
+ * @tags Subscription
1167
+ * @name FrontierServiceListSubscriptions
1168
+ * @summary List subscriptions
1169
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions
1170
+ * @secure
1171
+ */
1172
+ this.frontierServiceListSubscriptions = (orgId, billingId, params = {}) => this.request(__spreadValues({
1173
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions`,
1174
+ method: "GET",
1175
+ secure: true,
1176
+ format: "json"
1177
+ }, params));
1178
+ /**
1179
+ * @description Get a subscription by ID.
1180
+ *
1181
+ * @tags Subscription
1182
+ * @name FrontierServiceGetSubscription
1183
+ * @summary Get subscription
1184
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}
1185
+ * @secure
1186
+ */
1187
+ this.frontierServiceGetSubscription = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1188
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}`,
1189
+ method: "GET",
1190
+ secure: true,
1191
+ format: "json"
1192
+ }, params));
1193
+ /**
1194
+ * @description Update a subscription by ID.
1195
+ *
1196
+ * @tags Subscription
1197
+ * @name FrontierServiceUpdateSubscription
1198
+ * @summary Update subscription
1199
+ * @request PUT:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}
1200
+ * @secure
1201
+ */
1202
+ this.frontierServiceUpdateSubscription = (orgId, billingId, id, body, params = {}) => this.request(__spreadValues({
1203
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}`,
1204
+ method: "PUT",
1205
+ body,
1206
+ secure: true,
1207
+ type: "application/json" /* Json */,
1208
+ format: "json"
1209
+ }, params));
1210
+ /**
1211
+ * @description Cancel a subscription by ID.
1212
+ *
1213
+ * @tags Subscription
1214
+ * @name FrontierServiceCancelSubscription
1215
+ * @summary Cancel subscription
1216
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}/cancel
1217
+ * @secure
1218
+ */
1219
+ this.frontierServiceCancelSubscription = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1220
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}/cancel`,
1221
+ method: "POST",
1222
+ secure: true,
1223
+ format: "json"
1224
+ }, params));
1225
+ /**
1226
+ * @description Report a new billing usage for a billing account.
1227
+ *
1228
+ * @tags Usage
1229
+ * @name FrontierServiceCreateBillingUsage
1230
+ * @summary Create billing usage
1231
+ * @request POST:/v1beta1/organizations/{orgId}/billing/{billingId}/usages
1232
+ * @secure
1233
+ */
1234
+ this.frontierServiceCreateBillingUsage = (orgId, billingId, body, params = {}) => this.request(__spreadValues({
1235
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/usages`,
1236
+ method: "POST",
1237
+ body,
1238
+ secure: true,
1239
+ type: "application/json" /* Json */,
1240
+ format: "json"
1241
+ }, params));
1242
+ /**
1243
+ * @description Get a billing account by ID.
1244
+ *
1245
+ * @tags Billing
1246
+ * @name FrontierServiceGetBillingAccount
1247
+ * @summary Get billing account
1248
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{id}
1249
+ * @secure
1250
+ */
1251
+ this.frontierServiceGetBillingAccount = (orgId, id, params = {}) => this.request(__spreadValues({
1252
+ path: `/v1beta1/organizations/${orgId}/billing/${id}`,
1253
+ method: "GET",
1254
+ secure: true,
1255
+ format: "json"
1256
+ }, params));
1257
+ /**
1258
+ * @description Delete a billing account by ID.
1259
+ *
1260
+ * @tags Billing
1261
+ * @name FrontierServiceDeleteBillingAccount
1262
+ * @summary Delete billing account
1263
+ * @request DELETE:/v1beta1/organizations/{orgId}/billing/{id}
1264
+ * @secure
1265
+ */
1266
+ this.frontierServiceDeleteBillingAccount = (orgId, id, params = {}) => this.request(__spreadValues({
1267
+ path: `/v1beta1/organizations/${orgId}/billing/${id}`,
1268
+ method: "DELETE",
1269
+ secure: true,
1270
+ format: "json"
1271
+ }, params));
1272
+ /**
1273
+ * @description Update a billing account by ID.
1274
+ *
1275
+ * @tags Billing
1276
+ * @name FrontierServiceUpdateBillingAccount
1277
+ * @summary Update billing account
1278
+ * @request PUT:/v1beta1/organizations/{orgId}/billing/{id}
1279
+ * @secure
1280
+ */
1281
+ this.frontierServiceUpdateBillingAccount = (orgId, id, body, params = {}) => this.request(__spreadValues({
1282
+ path: `/v1beta1/organizations/${orgId}/billing/${id}`,
1283
+ method: "PUT",
1284
+ body,
1285
+ secure: true,
1286
+ type: "application/json" /* Json */,
1287
+ format: "json"
1288
+ }, params));
1289
+ /**
1290
+ * @description Get the balance of a billing account by ID.
1291
+ *
1292
+ * @tags Billing
1293
+ * @name FrontierServiceGetBillingBalance
1294
+ * @summary Get billing balance
1295
+ * @request GET:/v1beta1/organizations/{orgId}/billing/{id}/balance
1296
+ * @secure
1297
+ */
1298
+ this.frontierServiceGetBillingBalance = (orgId, id, params = {}) => this.request(__spreadValues({
1299
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/balance`,
1300
+ method: "GET",
1301
+ secure: true,
1302
+ format: "json"
1303
+ }, params));
904
1304
  /**
905
1305
  * @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.
906
1306
  *
@@ -1021,9 +1421,10 @@ var V1Beta1 = class extends HttpClient {
1021
1421
  * @request GET:/v1beta1/organizations/{orgId}/groups/{id}
1022
1422
  * @secure
1023
1423
  */
1024
- this.frontierServiceGetGroup = (orgId, id, params = {}) => this.request(__spreadValues({
1424
+ this.frontierServiceGetGroup = (orgId, id, query, params = {}) => this.request(__spreadValues({
1025
1425
  path: `/v1beta1/organizations/${orgId}/groups/${id}`,
1026
1426
  method: "GET",
1427
+ query,
1027
1428
  secure: true,
1028
1429
  format: "json"
1029
1430
  }, params));
@@ -1392,12 +1793,12 @@ var V1Beta1 = class extends HttpClient {
1392
1793
  * @description Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
1393
1794
  *
1394
1795
  * @tags Policy
1395
- * @name AdminServiceListPolicies
1796
+ * @name FrontierServiceListPolicies
1396
1797
  * @summary List all policies
1397
1798
  * @request GET:/v1beta1/policies
1398
1799
  * @secure
1399
1800
  */
1400
- this.adminServiceListPolicies = (query, params = {}) => this.request(__spreadValues({
1801
+ this.frontierServiceListPolicies = (query, params = {}) => this.request(__spreadValues({
1401
1802
  path: `/v1beta1/policies`,
1402
1803
  method: "GET",
1403
1804
  query,
@@ -1631,9 +2032,10 @@ var V1Beta1 = class extends HttpClient {
1631
2032
  * @request GET:/v1beta1/projects/{id}/groups
1632
2033
  * @secure
1633
2034
  */
1634
- this.frontierServiceListProjectGroups = (id, params = {}) => this.request(__spreadValues({
2035
+ this.frontierServiceListProjectGroups = (id, query, params = {}) => this.request(__spreadValues({
1635
2036
  path: `/v1beta1/projects/${id}/groups`,
1636
2037
  method: "GET",
2038
+ query,
1637
2039
  secure: true,
1638
2040
  format: "json"
1639
2041
  }, params));