academe-kit 0.3.8 → 0.3.9
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.d.ts +372 -362
- package/dist/index.esm.js +47 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -1
- package/dist/types/services/InstitutionService.d.ts +1 -0
- package/dist/types/services/ProductService.d.ts +225 -0
- package/dist/types/services/UserService.d.ts +2 -0
- package/dist/types/services/index.d.ts +3 -0
- package/dist/types/types/academe-api.d.ts +145 -362
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4797,7 +4797,7 @@ interface paths {
|
|
|
4797
4797
|
};
|
|
4798
4798
|
trace?: never;
|
|
4799
4799
|
};
|
|
4800
|
-
"/
|
|
4800
|
+
"/products": {
|
|
4801
4801
|
parameters: {
|
|
4802
4802
|
query?: never;
|
|
4803
4803
|
header?: never;
|
|
@@ -4805,14 +4805,20 @@ interface paths {
|
|
|
4805
4805
|
cookie?: never;
|
|
4806
4806
|
};
|
|
4807
4807
|
/**
|
|
4808
|
-
*
|
|
4809
|
-
* @description Retrieve a list of all
|
|
4808
|
+
* List all products
|
|
4809
|
+
* @description Retrieve a paginated list of all products
|
|
4810
4810
|
*/
|
|
4811
4811
|
get: {
|
|
4812
4812
|
parameters: {
|
|
4813
4813
|
query?: {
|
|
4814
|
-
/** @description
|
|
4814
|
+
/** @description Filter by product name (partial match) */
|
|
4815
|
+
name?: string;
|
|
4816
|
+
/** @description Search products by name */
|
|
4815
4817
|
search?: string;
|
|
4818
|
+
/** @description Page number */
|
|
4819
|
+
page?: number;
|
|
4820
|
+
/** @description Number of items per page */
|
|
4821
|
+
limit?: number;
|
|
4816
4822
|
};
|
|
4817
4823
|
header?: never;
|
|
4818
4824
|
path?: never;
|
|
@@ -4820,21 +4826,33 @@ interface paths {
|
|
|
4820
4826
|
};
|
|
4821
4827
|
requestBody?: never;
|
|
4822
4828
|
responses: {
|
|
4823
|
-
/** @description List of
|
|
4829
|
+
/** @description List of products */
|
|
4824
4830
|
200: {
|
|
4825
4831
|
headers: {
|
|
4826
4832
|
[name: string]: unknown;
|
|
4827
4833
|
};
|
|
4828
4834
|
content: {
|
|
4829
|
-
"application/json":
|
|
4835
|
+
"application/json": {
|
|
4836
|
+
/** @example success */
|
|
4837
|
+
status?: string;
|
|
4838
|
+
data?: components["schemas"]["Product"][];
|
|
4839
|
+
meta?: {
|
|
4840
|
+
total?: number;
|
|
4841
|
+
page?: number;
|
|
4842
|
+
limit?: number;
|
|
4843
|
+
totalPages?: number;
|
|
4844
|
+
};
|
|
4845
|
+
};
|
|
4830
4846
|
};
|
|
4831
4847
|
};
|
|
4848
|
+
401: components["responses"]["Unauthorized"];
|
|
4849
|
+
500: components["responses"]["ServerError"];
|
|
4832
4850
|
};
|
|
4833
4851
|
};
|
|
4834
4852
|
put?: never;
|
|
4835
4853
|
/**
|
|
4836
|
-
* Create a new
|
|
4837
|
-
* @description Create a new
|
|
4854
|
+
* Create a new product
|
|
4855
|
+
* @description Create a new product in the system
|
|
4838
4856
|
*/
|
|
4839
4857
|
post: {
|
|
4840
4858
|
parameters: {
|
|
@@ -4845,26 +4863,40 @@ interface paths {
|
|
|
4845
4863
|
};
|
|
4846
4864
|
requestBody: {
|
|
4847
4865
|
content: {
|
|
4848
|
-
"application/json": components["schemas"]["
|
|
4866
|
+
"application/json": components["schemas"]["CreateProductDto"];
|
|
4849
4867
|
};
|
|
4850
4868
|
};
|
|
4851
4869
|
responses: {
|
|
4852
|
-
/** @description
|
|
4870
|
+
/** @description Product created successfully */
|
|
4853
4871
|
201: {
|
|
4854
4872
|
headers: {
|
|
4855
4873
|
[name: string]: unknown;
|
|
4856
4874
|
};
|
|
4857
4875
|
content: {
|
|
4858
|
-
"application/json":
|
|
4876
|
+
"application/json": {
|
|
4877
|
+
/** @example success */
|
|
4878
|
+
status?: string;
|
|
4879
|
+
data?: components["schemas"]["Product"];
|
|
4880
|
+
};
|
|
4859
4881
|
};
|
|
4860
4882
|
};
|
|
4861
|
-
|
|
4883
|
+
400: components["responses"]["BadRequest"];
|
|
4884
|
+
401: components["responses"]["Unauthorized"];
|
|
4885
|
+
/** @description Product with this name already exists */
|
|
4862
4886
|
409: {
|
|
4863
4887
|
headers: {
|
|
4864
4888
|
[name: string]: unknown;
|
|
4865
4889
|
};
|
|
4866
|
-
content
|
|
4890
|
+
content: {
|
|
4891
|
+
"application/json": {
|
|
4892
|
+
/** @example error */
|
|
4893
|
+
status?: string;
|
|
4894
|
+
/** @example Product with this name already exists */
|
|
4895
|
+
message?: string;
|
|
4896
|
+
};
|
|
4897
|
+
};
|
|
4867
4898
|
};
|
|
4899
|
+
500: components["responses"]["ServerError"];
|
|
4868
4900
|
};
|
|
4869
4901
|
};
|
|
4870
4902
|
delete?: never;
|
|
@@ -4873,7 +4905,7 @@ interface paths {
|
|
|
4873
4905
|
patch?: never;
|
|
4874
4906
|
trace?: never;
|
|
4875
4907
|
};
|
|
4876
|
-
"/
|
|
4908
|
+
"/products/{id}": {
|
|
4877
4909
|
parameters: {
|
|
4878
4910
|
query?: never;
|
|
4879
4911
|
header?: never;
|
|
@@ -4881,111 +4913,117 @@ interface paths {
|
|
|
4881
4913
|
cookie?: never;
|
|
4882
4914
|
};
|
|
4883
4915
|
/**
|
|
4884
|
-
* Get
|
|
4885
|
-
* @description Retrieve
|
|
4916
|
+
* Get product by ID
|
|
4917
|
+
* @description Retrieve detailed information about a specific product including associated seats
|
|
4886
4918
|
*/
|
|
4887
4919
|
get: {
|
|
4888
4920
|
parameters: {
|
|
4889
4921
|
query?: never;
|
|
4890
4922
|
header?: never;
|
|
4891
4923
|
path: {
|
|
4892
|
-
/** @description
|
|
4924
|
+
/** @description Product ID */
|
|
4893
4925
|
id: string;
|
|
4894
4926
|
};
|
|
4895
4927
|
cookie?: never;
|
|
4896
4928
|
};
|
|
4897
4929
|
requestBody?: never;
|
|
4898
4930
|
responses: {
|
|
4899
|
-
/** @description
|
|
4931
|
+
/** @description Product information */
|
|
4900
4932
|
200: {
|
|
4901
4933
|
headers: {
|
|
4902
4934
|
[name: string]: unknown;
|
|
4903
4935
|
};
|
|
4904
4936
|
content: {
|
|
4905
|
-
"application/json":
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
headers: {
|
|
4911
|
-
[name: string]: unknown;
|
|
4937
|
+
"application/json": {
|
|
4938
|
+
/** @example success */
|
|
4939
|
+
status?: string;
|
|
4940
|
+
data?: components["schemas"]["Product"];
|
|
4941
|
+
};
|
|
4912
4942
|
};
|
|
4913
|
-
content?: never;
|
|
4914
4943
|
};
|
|
4944
|
+
400: components["responses"]["BadRequest"];
|
|
4945
|
+
401: components["responses"]["Unauthorized"];
|
|
4946
|
+
404: components["responses"]["NotFound"];
|
|
4947
|
+
500: components["responses"]["ServerError"];
|
|
4915
4948
|
};
|
|
4916
4949
|
};
|
|
4917
4950
|
put?: never;
|
|
4918
4951
|
post?: never;
|
|
4919
4952
|
/**
|
|
4920
|
-
* Delete
|
|
4921
|
-
* @description
|
|
4953
|
+
* Delete product
|
|
4954
|
+
* @description Remove a product from the system
|
|
4922
4955
|
*/
|
|
4923
4956
|
delete: {
|
|
4924
4957
|
parameters: {
|
|
4925
4958
|
query?: never;
|
|
4926
4959
|
header?: never;
|
|
4927
4960
|
path: {
|
|
4928
|
-
/** @description
|
|
4961
|
+
/** @description Product ID */
|
|
4929
4962
|
id: string;
|
|
4930
4963
|
};
|
|
4931
4964
|
cookie?: never;
|
|
4932
4965
|
};
|
|
4933
4966
|
requestBody?: never;
|
|
4934
4967
|
responses: {
|
|
4935
|
-
/** @description
|
|
4968
|
+
/** @description Product deleted successfully */
|
|
4936
4969
|
204: {
|
|
4937
4970
|
headers: {
|
|
4938
4971
|
[name: string]: unknown;
|
|
4939
4972
|
};
|
|
4940
4973
|
content?: never;
|
|
4941
4974
|
};
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
};
|
|
4947
|
-
content?: never;
|
|
4948
|
-
};
|
|
4975
|
+
400: components["responses"]["BadRequest"];
|
|
4976
|
+
401: components["responses"]["Unauthorized"];
|
|
4977
|
+
404: components["responses"]["NotFound"];
|
|
4978
|
+
500: components["responses"]["ServerError"];
|
|
4949
4979
|
};
|
|
4950
4980
|
};
|
|
4951
4981
|
options?: never;
|
|
4952
4982
|
head?: never;
|
|
4953
4983
|
/**
|
|
4954
|
-
* Update
|
|
4955
|
-
* @description Update
|
|
4984
|
+
* Update product
|
|
4985
|
+
* @description Update product information
|
|
4956
4986
|
*/
|
|
4957
4987
|
patch: {
|
|
4958
4988
|
parameters: {
|
|
4959
4989
|
query?: never;
|
|
4960
4990
|
header?: never;
|
|
4961
4991
|
path: {
|
|
4962
|
-
/** @description
|
|
4992
|
+
/** @description Product ID */
|
|
4963
4993
|
id: string;
|
|
4964
4994
|
};
|
|
4965
4995
|
cookie?: never;
|
|
4966
4996
|
};
|
|
4967
4997
|
requestBody: {
|
|
4968
4998
|
content: {
|
|
4969
|
-
"application/json": components["schemas"]["
|
|
4999
|
+
"application/json": components["schemas"]["UpdateProductDto"];
|
|
4970
5000
|
};
|
|
4971
5001
|
};
|
|
4972
5002
|
responses: {
|
|
4973
|
-
/** @description
|
|
5003
|
+
/** @description Product updated successfully */
|
|
4974
5004
|
200: {
|
|
4975
5005
|
headers: {
|
|
4976
5006
|
[name: string]: unknown;
|
|
4977
5007
|
};
|
|
4978
5008
|
content: {
|
|
4979
|
-
"application/json":
|
|
5009
|
+
"application/json": {
|
|
5010
|
+
/** @example success */
|
|
5011
|
+
status?: string;
|
|
5012
|
+
data?: components["schemas"]["Product"];
|
|
5013
|
+
};
|
|
4980
5014
|
};
|
|
4981
5015
|
};
|
|
4982
|
-
|
|
4983
|
-
|
|
5016
|
+
400: components["responses"]["BadRequest"];
|
|
5017
|
+
401: components["responses"]["Unauthorized"];
|
|
5018
|
+
404: components["responses"]["NotFound"];
|
|
5019
|
+
/** @description Product with this name already exists */
|
|
5020
|
+
409: {
|
|
4984
5021
|
headers: {
|
|
4985
5022
|
[name: string]: unknown;
|
|
4986
5023
|
};
|
|
4987
5024
|
content?: never;
|
|
4988
5025
|
};
|
|
5026
|
+
500: components["responses"]["ServerError"];
|
|
4989
5027
|
};
|
|
4990
5028
|
};
|
|
4991
5029
|
trace?: never;
|
|
@@ -7382,203 +7420,6 @@ interface paths {
|
|
|
7382
7420
|
};
|
|
7383
7421
|
trace?: never;
|
|
7384
7422
|
};
|
|
7385
|
-
"/subscriptions": {
|
|
7386
|
-
parameters: {
|
|
7387
|
-
query?: never;
|
|
7388
|
-
header?: never;
|
|
7389
|
-
path?: never;
|
|
7390
|
-
cookie?: never;
|
|
7391
|
-
};
|
|
7392
|
-
/**
|
|
7393
|
-
* Get all subscriptions
|
|
7394
|
-
* @description Retrieve a list of all subscriptions with optional filters
|
|
7395
|
-
*/
|
|
7396
|
-
get: {
|
|
7397
|
-
parameters: {
|
|
7398
|
-
query?: {
|
|
7399
|
-
/** @description Filter by plan ID */
|
|
7400
|
-
planId?: string;
|
|
7401
|
-
/** @description Filter by institution ID */
|
|
7402
|
-
institutionId?: string;
|
|
7403
|
-
/** @description Filter by group ID */
|
|
7404
|
-
groupId?: string;
|
|
7405
|
-
};
|
|
7406
|
-
header?: never;
|
|
7407
|
-
path?: never;
|
|
7408
|
-
cookie?: never;
|
|
7409
|
-
};
|
|
7410
|
-
requestBody?: never;
|
|
7411
|
-
responses: {
|
|
7412
|
-
/** @description List of subscriptions */
|
|
7413
|
-
200: {
|
|
7414
|
-
headers: {
|
|
7415
|
-
[name: string]: unknown;
|
|
7416
|
-
};
|
|
7417
|
-
content: {
|
|
7418
|
-
"application/json": components["schemas"]["Subscription"][];
|
|
7419
|
-
};
|
|
7420
|
-
};
|
|
7421
|
-
};
|
|
7422
|
-
};
|
|
7423
|
-
put?: never;
|
|
7424
|
-
/**
|
|
7425
|
-
* Create a new subscription
|
|
7426
|
-
* @description Create a subscription linking a plan to an institution or group
|
|
7427
|
-
*/
|
|
7428
|
-
post: {
|
|
7429
|
-
parameters: {
|
|
7430
|
-
query?: never;
|
|
7431
|
-
header?: never;
|
|
7432
|
-
path?: never;
|
|
7433
|
-
cookie?: never;
|
|
7434
|
-
};
|
|
7435
|
-
requestBody: {
|
|
7436
|
-
content: {
|
|
7437
|
-
"application/json": components["schemas"]["CreateSubscriptionDto"];
|
|
7438
|
-
};
|
|
7439
|
-
};
|
|
7440
|
-
responses: {
|
|
7441
|
-
/** @description Subscription created successfully */
|
|
7442
|
-
201: {
|
|
7443
|
-
headers: {
|
|
7444
|
-
[name: string]: unknown;
|
|
7445
|
-
};
|
|
7446
|
-
content: {
|
|
7447
|
-
"application/json": components["schemas"]["Subscription"];
|
|
7448
|
-
};
|
|
7449
|
-
};
|
|
7450
|
-
/** @description Invalid request (missing required fields) */
|
|
7451
|
-
400: {
|
|
7452
|
-
headers: {
|
|
7453
|
-
[name: string]: unknown;
|
|
7454
|
-
};
|
|
7455
|
-
content?: never;
|
|
7456
|
-
};
|
|
7457
|
-
};
|
|
7458
|
-
};
|
|
7459
|
-
delete?: never;
|
|
7460
|
-
options?: never;
|
|
7461
|
-
head?: never;
|
|
7462
|
-
patch?: never;
|
|
7463
|
-
trace?: never;
|
|
7464
|
-
};
|
|
7465
|
-
"/subscriptions/{id}": {
|
|
7466
|
-
parameters: {
|
|
7467
|
-
query?: never;
|
|
7468
|
-
header?: never;
|
|
7469
|
-
path?: never;
|
|
7470
|
-
cookie?: never;
|
|
7471
|
-
};
|
|
7472
|
-
/**
|
|
7473
|
-
* Get a subscription by ID
|
|
7474
|
-
* @description Retrieve details of a specific subscription
|
|
7475
|
-
*/
|
|
7476
|
-
get: {
|
|
7477
|
-
parameters: {
|
|
7478
|
-
query?: never;
|
|
7479
|
-
header?: never;
|
|
7480
|
-
path: {
|
|
7481
|
-
/** @description Subscription ID */
|
|
7482
|
-
id: string;
|
|
7483
|
-
};
|
|
7484
|
-
cookie?: never;
|
|
7485
|
-
};
|
|
7486
|
-
requestBody?: never;
|
|
7487
|
-
responses: {
|
|
7488
|
-
/** @description Subscription found */
|
|
7489
|
-
200: {
|
|
7490
|
-
headers: {
|
|
7491
|
-
[name: string]: unknown;
|
|
7492
|
-
};
|
|
7493
|
-
content: {
|
|
7494
|
-
"application/json": components["schemas"]["Subscription"];
|
|
7495
|
-
};
|
|
7496
|
-
};
|
|
7497
|
-
/** @description Subscription not found */
|
|
7498
|
-
404: {
|
|
7499
|
-
headers: {
|
|
7500
|
-
[name: string]: unknown;
|
|
7501
|
-
};
|
|
7502
|
-
content?: never;
|
|
7503
|
-
};
|
|
7504
|
-
};
|
|
7505
|
-
};
|
|
7506
|
-
put?: never;
|
|
7507
|
-
post?: never;
|
|
7508
|
-
/**
|
|
7509
|
-
* Delete a subscription
|
|
7510
|
-
* @description Delete an existing subscription
|
|
7511
|
-
*/
|
|
7512
|
-
delete: {
|
|
7513
|
-
parameters: {
|
|
7514
|
-
query?: never;
|
|
7515
|
-
header?: never;
|
|
7516
|
-
path: {
|
|
7517
|
-
/** @description Subscription ID */
|
|
7518
|
-
id: string;
|
|
7519
|
-
};
|
|
7520
|
-
cookie?: never;
|
|
7521
|
-
};
|
|
7522
|
-
requestBody?: never;
|
|
7523
|
-
responses: {
|
|
7524
|
-
/** @description Subscription deleted successfully */
|
|
7525
|
-
204: {
|
|
7526
|
-
headers: {
|
|
7527
|
-
[name: string]: unknown;
|
|
7528
|
-
};
|
|
7529
|
-
content?: never;
|
|
7530
|
-
};
|
|
7531
|
-
/** @description Subscription not found */
|
|
7532
|
-
404: {
|
|
7533
|
-
headers: {
|
|
7534
|
-
[name: string]: unknown;
|
|
7535
|
-
};
|
|
7536
|
-
content?: never;
|
|
7537
|
-
};
|
|
7538
|
-
};
|
|
7539
|
-
};
|
|
7540
|
-
options?: never;
|
|
7541
|
-
head?: never;
|
|
7542
|
-
/**
|
|
7543
|
-
* Update a subscription
|
|
7544
|
-
* @description Update an existing subscription
|
|
7545
|
-
*/
|
|
7546
|
-
patch: {
|
|
7547
|
-
parameters: {
|
|
7548
|
-
query?: never;
|
|
7549
|
-
header?: never;
|
|
7550
|
-
path: {
|
|
7551
|
-
/** @description Subscription ID */
|
|
7552
|
-
id: string;
|
|
7553
|
-
};
|
|
7554
|
-
cookie?: never;
|
|
7555
|
-
};
|
|
7556
|
-
requestBody: {
|
|
7557
|
-
content: {
|
|
7558
|
-
"application/json": components["schemas"]["UpdateSubscriptionDto"];
|
|
7559
|
-
};
|
|
7560
|
-
};
|
|
7561
|
-
responses: {
|
|
7562
|
-
/** @description Subscription updated successfully */
|
|
7563
|
-
200: {
|
|
7564
|
-
headers: {
|
|
7565
|
-
[name: string]: unknown;
|
|
7566
|
-
};
|
|
7567
|
-
content: {
|
|
7568
|
-
"application/json": components["schemas"]["Subscription"];
|
|
7569
|
-
};
|
|
7570
|
-
};
|
|
7571
|
-
/** @description Subscription not found */
|
|
7572
|
-
404: {
|
|
7573
|
-
headers: {
|
|
7574
|
-
[name: string]: unknown;
|
|
7575
|
-
};
|
|
7576
|
-
content?: never;
|
|
7577
|
-
};
|
|
7578
|
-
};
|
|
7579
|
-
};
|
|
7580
|
-
trace?: never;
|
|
7581
|
-
};
|
|
7582
7423
|
"/superset/dashboard/{dash_id}": {
|
|
7583
7424
|
parameters: {
|
|
7584
7425
|
query?: never;
|
|
@@ -9300,6 +9141,11 @@ interface components {
|
|
|
9300
9141
|
* @description Group ID
|
|
9301
9142
|
*/
|
|
9302
9143
|
groupId?: string;
|
|
9144
|
+
/**
|
|
9145
|
+
* Format: uuid
|
|
9146
|
+
* @description Product ID associated with this seat
|
|
9147
|
+
*/
|
|
9148
|
+
productId?: string;
|
|
9303
9149
|
/** @description Available quantity for this group in the institution */
|
|
9304
9150
|
availableQuantity?: number;
|
|
9305
9151
|
/** @description Number of users currently assigned to this group in the institution */
|
|
@@ -9309,6 +9155,7 @@ interface components {
|
|
|
9309
9155
|
/** Format: date-time */
|
|
9310
9156
|
updatedAt?: string;
|
|
9311
9157
|
group?: components["schemas"]["Group"];
|
|
9158
|
+
product?: components["schemas"]["Product"];
|
|
9312
9159
|
};
|
|
9313
9160
|
CreateSeatsDto: {
|
|
9314
9161
|
/**
|
|
@@ -9316,6 +9163,11 @@ interface components {
|
|
|
9316
9163
|
* @description Group ID to associate with the institution
|
|
9317
9164
|
*/
|
|
9318
9165
|
groupId: string;
|
|
9166
|
+
/**
|
|
9167
|
+
* Format: uuid
|
|
9168
|
+
* @description Product ID to associate with the seat
|
|
9169
|
+
*/
|
|
9170
|
+
productId: string;
|
|
9319
9171
|
/**
|
|
9320
9172
|
* @description Available quantity for this group
|
|
9321
9173
|
* @default 0
|
|
@@ -9326,75 +9178,65 @@ interface components {
|
|
|
9326
9178
|
/** @description New available quantity for this group */
|
|
9327
9179
|
availableQuantity: number;
|
|
9328
9180
|
};
|
|
9329
|
-
|
|
9181
|
+
/**
|
|
9182
|
+
* @example {
|
|
9183
|
+
* "id": "550e8400-e29b-41d4-a716-446655440000",
|
|
9184
|
+
* "name": "Premium Plan",
|
|
9185
|
+
* "description": "Full access to all platform features",
|
|
9186
|
+
* "createdAt": "2024-01-15T10:30:00Z",
|
|
9187
|
+
* "updatedAt": "2024-01-15T10:30:00Z"
|
|
9188
|
+
* }
|
|
9189
|
+
*/
|
|
9190
|
+
Product: {
|
|
9330
9191
|
/**
|
|
9331
9192
|
* Format: uuid
|
|
9332
|
-
* @description Unique identifier
|
|
9333
|
-
*/
|
|
9334
|
-
id: string;
|
|
9335
|
-
/**
|
|
9336
|
-
* @description Unique code for the plan (e.g., gold_plan, free_tier)
|
|
9337
|
-
* @example gold_plan
|
|
9338
|
-
*/
|
|
9339
|
-
code: string;
|
|
9340
|
-
/**
|
|
9341
|
-
* @description Display name of the plan
|
|
9342
|
-
* @example Plano Gold
|
|
9343
|
-
*/
|
|
9344
|
-
name: string;
|
|
9345
|
-
/**
|
|
9346
|
-
* @description JSON object with plan settings and configurations
|
|
9347
|
-
* @example {
|
|
9348
|
-
* "maxUsers": 100,
|
|
9349
|
-
* "features": [
|
|
9350
|
-
* "analytics",
|
|
9351
|
-
* "support"
|
|
9352
|
-
* ]
|
|
9353
|
-
* }
|
|
9193
|
+
* @description Unique identifier of the product
|
|
9354
9194
|
*/
|
|
9355
|
-
|
|
9356
|
-
/**
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
isActive: boolean;
|
|
9195
|
+
id?: string;
|
|
9196
|
+
/** @description Name of the product */
|
|
9197
|
+
name?: string;
|
|
9198
|
+
/** @description Description of the product */
|
|
9199
|
+
description?: string | null;
|
|
9361
9200
|
/**
|
|
9362
9201
|
* Format: date-time
|
|
9363
|
-
* @description
|
|
9202
|
+
* @description Creation timestamp
|
|
9364
9203
|
*/
|
|
9365
9204
|
createdAt?: string;
|
|
9366
|
-
};
|
|
9367
|
-
CreatePlanDto: {
|
|
9368
9205
|
/**
|
|
9369
|
-
*
|
|
9370
|
-
* @
|
|
9206
|
+
* Format: date-time
|
|
9207
|
+
* @description Last update timestamp
|
|
9371
9208
|
*/
|
|
9372
|
-
|
|
9209
|
+
updatedAt?: string;
|
|
9210
|
+
};
|
|
9211
|
+
/**
|
|
9212
|
+
* @example {
|
|
9213
|
+
* "id": "550e8400-e29b-41d4-a716-446655440000",
|
|
9214
|
+
* "name": "Premium Plan",
|
|
9215
|
+
* "description": "Full access to all platform features"
|
|
9216
|
+
* }
|
|
9217
|
+
*/
|
|
9218
|
+
CreateProductDto: {
|
|
9373
9219
|
/**
|
|
9374
|
-
*
|
|
9375
|
-
* @
|
|
9220
|
+
* Format: uuid
|
|
9221
|
+
* @description Optional custom UUID for the product (auto-generated if not provided)
|
|
9376
9222
|
*/
|
|
9223
|
+
id?: string;
|
|
9224
|
+
/** @description Name of the product */
|
|
9377
9225
|
name: string;
|
|
9378
|
-
/**
|
|
9379
|
-
|
|
9380
|
-
* @example {
|
|
9381
|
-
* "maxUsers": 100
|
|
9382
|
-
* }
|
|
9383
|
-
*/
|
|
9384
|
-
settings?: Record<string, never>;
|
|
9385
|
-
/**
|
|
9386
|
-
* @description Whether the plan is active
|
|
9387
|
-
* @default true
|
|
9388
|
-
*/
|
|
9389
|
-
isActive: boolean;
|
|
9226
|
+
/** @description Description of the product */
|
|
9227
|
+
description?: string;
|
|
9390
9228
|
};
|
|
9391
|
-
|
|
9392
|
-
|
|
9229
|
+
/**
|
|
9230
|
+
* @example {
|
|
9231
|
+
* "name": "Premium Plan Updated",
|
|
9232
|
+
* "description": "Updated description"
|
|
9233
|
+
* }
|
|
9234
|
+
*/
|
|
9235
|
+
UpdateProductDto: {
|
|
9236
|
+
/** @description Name of the product */
|
|
9393
9237
|
name?: string;
|
|
9394
|
-
/** @description
|
|
9395
|
-
|
|
9396
|
-
/** @description Whether the plan is active */
|
|
9397
|
-
isActive?: boolean;
|
|
9238
|
+
/** @description Description of the product */
|
|
9239
|
+
description?: string;
|
|
9398
9240
|
};
|
|
9399
9241
|
StudentWithClass: {
|
|
9400
9242
|
/** Format: uuid */
|
|
@@ -9479,71 +9321,6 @@ interface components {
|
|
|
9479
9321
|
totalStudents?: number;
|
|
9480
9322
|
year?: number;
|
|
9481
9323
|
};
|
|
9482
|
-
Subscription: {
|
|
9483
|
-
/**
|
|
9484
|
-
* Format: uuid
|
|
9485
|
-
* @description Unique identifier for the subscription
|
|
9486
|
-
*/
|
|
9487
|
-
id: string;
|
|
9488
|
-
/**
|
|
9489
|
-
* Format: uuid
|
|
9490
|
-
* @description ID of the associated plan
|
|
9491
|
-
*/
|
|
9492
|
-
planId: string;
|
|
9493
|
-
/**
|
|
9494
|
-
* Format: uuid
|
|
9495
|
-
* @description ID of the associated institution (optional)
|
|
9496
|
-
*/
|
|
9497
|
-
institutionId?: string | null;
|
|
9498
|
-
/**
|
|
9499
|
-
* Format: uuid
|
|
9500
|
-
* @description ID of the associated group (optional)
|
|
9501
|
-
*/
|
|
9502
|
-
groupId?: string | null;
|
|
9503
|
-
/**
|
|
9504
|
-
* Format: date-time
|
|
9505
|
-
* @description Timestamp when the subscription was created
|
|
9506
|
-
*/
|
|
9507
|
-
createdAt?: string;
|
|
9508
|
-
plan?: components["schemas"]["Plan"];
|
|
9509
|
-
institution?: components["schemas"]["Institution"];
|
|
9510
|
-
group?: components["schemas"]["Group"];
|
|
9511
|
-
};
|
|
9512
|
-
/** @description At least one of institutionId or groupId must be provided */
|
|
9513
|
-
CreateSubscriptionDto: {
|
|
9514
|
-
/**
|
|
9515
|
-
* Format: uuid
|
|
9516
|
-
* @description ID of the plan to subscribe to
|
|
9517
|
-
*/
|
|
9518
|
-
planId: string;
|
|
9519
|
-
/**
|
|
9520
|
-
* Format: uuid
|
|
9521
|
-
* @description ID of the institution (required if groupId is not provided)
|
|
9522
|
-
*/
|
|
9523
|
-
institutionId?: string | null;
|
|
9524
|
-
/**
|
|
9525
|
-
* Format: uuid
|
|
9526
|
-
* @description ID of the group (required if institutionId is not provided)
|
|
9527
|
-
*/
|
|
9528
|
-
groupId?: string | null;
|
|
9529
|
-
};
|
|
9530
|
-
UpdateSubscriptionDto: {
|
|
9531
|
-
/**
|
|
9532
|
-
* Format: uuid
|
|
9533
|
-
* @description ID of the plan
|
|
9534
|
-
*/
|
|
9535
|
-
planId?: string;
|
|
9536
|
-
/**
|
|
9537
|
-
* Format: uuid
|
|
9538
|
-
* @description ID of the institution
|
|
9539
|
-
*/
|
|
9540
|
-
institutionId?: string | null;
|
|
9541
|
-
/**
|
|
9542
|
-
* Format: uuid
|
|
9543
|
-
* @description ID of the group
|
|
9544
|
-
*/
|
|
9545
|
-
groupId?: string | null;
|
|
9546
|
-
};
|
|
9547
9324
|
CreateUserDto: {
|
|
9548
9325
|
/** @example John */
|
|
9549
9326
|
firstName: string;
|
|
@@ -9585,6 +9362,12 @@ interface components {
|
|
|
9585
9362
|
* @example 550e8400-e29b-41d4-a716-446655440001
|
|
9586
9363
|
*/
|
|
9587
9364
|
institutionId?: string;
|
|
9365
|
+
/**
|
|
9366
|
+
* Format: uuid
|
|
9367
|
+
* @description Optional guardian ID to associate the user with a guardian
|
|
9368
|
+
* @example 550e8400-e29b-41d4-a716-446655440002
|
|
9369
|
+
*/
|
|
9370
|
+
guardianId?: string;
|
|
9588
9371
|
};
|
|
9589
9372
|
UserResponse: components["schemas"]["User"];
|
|
9590
9373
|
CreateInstitutionDto: {
|
|
@@ -10414,6 +10197,7 @@ declare function createUserService(apiClient: AcademeApiClient): {
|
|
|
10414
10197
|
birthdate?: string;
|
|
10415
10198
|
groupId?: string;
|
|
10416
10199
|
institutionId?: string;
|
|
10200
|
+
guardianId?: string;
|
|
10417
10201
|
};
|
|
10418
10202
|
}, `${string}/${string}`>>;
|
|
10419
10203
|
createPublicUser(body: CreateUserBody): Promise<openapi_fetch.FetchResponse<{
|
|
@@ -10490,6 +10274,7 @@ declare function createUserService(apiClient: AcademeApiClient): {
|
|
|
10490
10274
|
birthdate?: string;
|
|
10491
10275
|
groupId?: string;
|
|
10492
10276
|
institutionId?: string;
|
|
10277
|
+
guardianId?: string;
|
|
10493
10278
|
};
|
|
10494
10279
|
}, `${string}/${string}`>>;
|
|
10495
10280
|
/**
|
|
@@ -10923,6 +10708,7 @@ declare function createInstitutionService(apiClient: AcademeApiClient): {
|
|
|
10923
10708
|
};
|
|
10924
10709
|
body: {
|
|
10925
10710
|
groupId: string;
|
|
10711
|
+
productId: string;
|
|
10926
10712
|
availableQuantity: number;
|
|
10927
10713
|
};
|
|
10928
10714
|
}, `${string}/${string}`>>;
|
|
@@ -14941,6 +14727,229 @@ declare function createSeatCodeService(apiClient: AcademeApiClient): {
|
|
|
14941
14727
|
};
|
|
14942
14728
|
type SeatCodeService = ReturnType<typeof createSeatCodeService>;
|
|
14943
14729
|
|
|
14730
|
+
type CreateProductBody = components["schemas"]["CreateProductDto"];
|
|
14731
|
+
type UpdateProductDto = components["schemas"]["UpdateProductDto"];
|
|
14732
|
+
type GetProductsParams = {
|
|
14733
|
+
name?: string;
|
|
14734
|
+
search?: string;
|
|
14735
|
+
page?: number;
|
|
14736
|
+
limit?: number;
|
|
14737
|
+
};
|
|
14738
|
+
declare function createProductService(apiClient: AcademeApiClient): {
|
|
14739
|
+
/**
|
|
14740
|
+
* List all products with optional filters
|
|
14741
|
+
*/
|
|
14742
|
+
getProducts(params?: GetProductsParams): Promise<openapi_fetch.FetchResponse<{
|
|
14743
|
+
parameters: {
|
|
14744
|
+
query?: {
|
|
14745
|
+
name?: string;
|
|
14746
|
+
search?: string;
|
|
14747
|
+
page?: number;
|
|
14748
|
+
limit?: number;
|
|
14749
|
+
};
|
|
14750
|
+
header?: never;
|
|
14751
|
+
path?: never;
|
|
14752
|
+
cookie?: never;
|
|
14753
|
+
};
|
|
14754
|
+
requestBody?: never;
|
|
14755
|
+
responses: {
|
|
14756
|
+
200: {
|
|
14757
|
+
headers: {
|
|
14758
|
+
[name: string]: unknown;
|
|
14759
|
+
};
|
|
14760
|
+
content: {
|
|
14761
|
+
"application/json": {
|
|
14762
|
+
status?: string;
|
|
14763
|
+
data?: components["schemas"]["Product"][];
|
|
14764
|
+
meta?: {
|
|
14765
|
+
total?: number;
|
|
14766
|
+
page?: number;
|
|
14767
|
+
limit?: number;
|
|
14768
|
+
totalPages?: number;
|
|
14769
|
+
};
|
|
14770
|
+
};
|
|
14771
|
+
};
|
|
14772
|
+
};
|
|
14773
|
+
401: components["responses"]["Unauthorized"];
|
|
14774
|
+
500: components["responses"]["ServerError"];
|
|
14775
|
+
};
|
|
14776
|
+
}, {
|
|
14777
|
+
params: {
|
|
14778
|
+
query: GetProductsParams | undefined;
|
|
14779
|
+
};
|
|
14780
|
+
}, `${string}/${string}`>>;
|
|
14781
|
+
/**
|
|
14782
|
+
* Get product by ID
|
|
14783
|
+
*/
|
|
14784
|
+
getProductById(id: string): Promise<openapi_fetch.FetchResponse<{
|
|
14785
|
+
parameters: {
|
|
14786
|
+
query?: never;
|
|
14787
|
+
header?: never;
|
|
14788
|
+
path: {
|
|
14789
|
+
id: string;
|
|
14790
|
+
};
|
|
14791
|
+
cookie?: never;
|
|
14792
|
+
};
|
|
14793
|
+
requestBody?: never;
|
|
14794
|
+
responses: {
|
|
14795
|
+
200: {
|
|
14796
|
+
headers: {
|
|
14797
|
+
[name: string]: unknown;
|
|
14798
|
+
};
|
|
14799
|
+
content: {
|
|
14800
|
+
"application/json": {
|
|
14801
|
+
status?: string;
|
|
14802
|
+
data?: components["schemas"]["Product"];
|
|
14803
|
+
};
|
|
14804
|
+
};
|
|
14805
|
+
};
|
|
14806
|
+
400: components["responses"]["BadRequest"];
|
|
14807
|
+
401: components["responses"]["Unauthorized"];
|
|
14808
|
+
404: components["responses"]["NotFound"];
|
|
14809
|
+
500: components["responses"]["ServerError"];
|
|
14810
|
+
};
|
|
14811
|
+
}, {
|
|
14812
|
+
params: {
|
|
14813
|
+
path: {
|
|
14814
|
+
id: string;
|
|
14815
|
+
};
|
|
14816
|
+
};
|
|
14817
|
+
}, `${string}/${string}`>>;
|
|
14818
|
+
/**
|
|
14819
|
+
* Create a new product
|
|
14820
|
+
*/
|
|
14821
|
+
createProduct(body: CreateProductBody): Promise<openapi_fetch.FetchResponse<{
|
|
14822
|
+
parameters: {
|
|
14823
|
+
query?: never;
|
|
14824
|
+
header?: never;
|
|
14825
|
+
path?: never;
|
|
14826
|
+
cookie?: never;
|
|
14827
|
+
};
|
|
14828
|
+
requestBody: {
|
|
14829
|
+
content: {
|
|
14830
|
+
"application/json": components["schemas"]["CreateProductDto"];
|
|
14831
|
+
};
|
|
14832
|
+
};
|
|
14833
|
+
responses: {
|
|
14834
|
+
201: {
|
|
14835
|
+
headers: {
|
|
14836
|
+
[name: string]: unknown;
|
|
14837
|
+
};
|
|
14838
|
+
content: {
|
|
14839
|
+
"application/json": {
|
|
14840
|
+
status?: string;
|
|
14841
|
+
data?: components["schemas"]["Product"];
|
|
14842
|
+
};
|
|
14843
|
+
};
|
|
14844
|
+
};
|
|
14845
|
+
400: components["responses"]["BadRequest"];
|
|
14846
|
+
401: components["responses"]["Unauthorized"];
|
|
14847
|
+
409: {
|
|
14848
|
+
headers: {
|
|
14849
|
+
[name: string]: unknown;
|
|
14850
|
+
};
|
|
14851
|
+
content: {
|
|
14852
|
+
"application/json": {
|
|
14853
|
+
status?: string;
|
|
14854
|
+
message?: string;
|
|
14855
|
+
};
|
|
14856
|
+
};
|
|
14857
|
+
};
|
|
14858
|
+
500: components["responses"]["ServerError"];
|
|
14859
|
+
};
|
|
14860
|
+
}, {
|
|
14861
|
+
body: {
|
|
14862
|
+
id?: string;
|
|
14863
|
+
name: string;
|
|
14864
|
+
description?: string;
|
|
14865
|
+
};
|
|
14866
|
+
}, `${string}/${string}`>>;
|
|
14867
|
+
/**
|
|
14868
|
+
* Update product information
|
|
14869
|
+
*/
|
|
14870
|
+
updateProduct(id: string, body: UpdateProductDto): Promise<openapi_fetch.FetchResponse<{
|
|
14871
|
+
parameters: {
|
|
14872
|
+
query?: never;
|
|
14873
|
+
header?: never;
|
|
14874
|
+
path: {
|
|
14875
|
+
id: string;
|
|
14876
|
+
};
|
|
14877
|
+
cookie?: never;
|
|
14878
|
+
};
|
|
14879
|
+
requestBody: {
|
|
14880
|
+
content: {
|
|
14881
|
+
"application/json": components["schemas"]["UpdateProductDto"];
|
|
14882
|
+
};
|
|
14883
|
+
};
|
|
14884
|
+
responses: {
|
|
14885
|
+
200: {
|
|
14886
|
+
headers: {
|
|
14887
|
+
[name: string]: unknown;
|
|
14888
|
+
};
|
|
14889
|
+
content: {
|
|
14890
|
+
"application/json": {
|
|
14891
|
+
status?: string;
|
|
14892
|
+
data?: components["schemas"]["Product"];
|
|
14893
|
+
};
|
|
14894
|
+
};
|
|
14895
|
+
};
|
|
14896
|
+
400: components["responses"]["BadRequest"];
|
|
14897
|
+
401: components["responses"]["Unauthorized"];
|
|
14898
|
+
404: components["responses"]["NotFound"];
|
|
14899
|
+
409: {
|
|
14900
|
+
headers: {
|
|
14901
|
+
[name: string]: unknown;
|
|
14902
|
+
};
|
|
14903
|
+
content?: never;
|
|
14904
|
+
};
|
|
14905
|
+
500: components["responses"]["ServerError"];
|
|
14906
|
+
};
|
|
14907
|
+
}, {
|
|
14908
|
+
params: {
|
|
14909
|
+
path: {
|
|
14910
|
+
id: string;
|
|
14911
|
+
};
|
|
14912
|
+
};
|
|
14913
|
+
body: {
|
|
14914
|
+
name?: string;
|
|
14915
|
+
description?: string;
|
|
14916
|
+
};
|
|
14917
|
+
}, `${string}/${string}`>>;
|
|
14918
|
+
/**
|
|
14919
|
+
* Delete product
|
|
14920
|
+
*/
|
|
14921
|
+
deleteProduct(id: string): Promise<openapi_fetch.FetchResponse<{
|
|
14922
|
+
parameters: {
|
|
14923
|
+
query?: never;
|
|
14924
|
+
header?: never;
|
|
14925
|
+
path: {
|
|
14926
|
+
id: string;
|
|
14927
|
+
};
|
|
14928
|
+
cookie?: never;
|
|
14929
|
+
};
|
|
14930
|
+
requestBody?: never;
|
|
14931
|
+
responses: {
|
|
14932
|
+
204: {
|
|
14933
|
+
headers: {
|
|
14934
|
+
[name: string]: unknown;
|
|
14935
|
+
};
|
|
14936
|
+
content?: never;
|
|
14937
|
+
};
|
|
14938
|
+
400: components["responses"]["BadRequest"];
|
|
14939
|
+
401: components["responses"]["Unauthorized"];
|
|
14940
|
+
404: components["responses"]["NotFound"];
|
|
14941
|
+
500: components["responses"]["ServerError"];
|
|
14942
|
+
};
|
|
14943
|
+
}, {
|
|
14944
|
+
params: {
|
|
14945
|
+
path: {
|
|
14946
|
+
id: string;
|
|
14947
|
+
};
|
|
14948
|
+
};
|
|
14949
|
+
}, `${string}/${string}`>>;
|
|
14950
|
+
};
|
|
14951
|
+
type ProductService = ReturnType<typeof createProductService>;
|
|
14952
|
+
|
|
14944
14953
|
type AcademeApiClient = ReturnType<typeof openapi_fetch__default<paths>>;
|
|
14945
14954
|
declare function createAcademeApiClient(baseUrl: string): AcademeApiClient;
|
|
14946
14955
|
interface AcademeServices {
|
|
@@ -14957,6 +14966,7 @@ interface AcademeServices {
|
|
|
14957
14966
|
quiz: QuizService;
|
|
14958
14967
|
certificate: CertificateService;
|
|
14959
14968
|
seatCode: SeatCodeService;
|
|
14969
|
+
product: ProductService;
|
|
14960
14970
|
}
|
|
14961
14971
|
|
|
14962
14972
|
type AcademeKeycloakContextProps = {
|