@rebornteam/reborn-api 4.9.3 → 4.9.4

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.
@@ -0,0 +1,63 @@
1
+ # AdminImportApi
2
+
3
+ All URIs are relative to *https://api.smsh.sh*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**importAdvancedBan**](#importadvancedban) | **POST** /admin/import/advancedban | Import punishments from an AdvancedBan MySQL database|
8
+
9
+ # **importAdvancedBan**
10
+ > AdminAsyncJobStartResponse importAdvancedBan(adminAdvancedBanImportRequest)
11
+
12
+ Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ AdminImportApi,
19
+ Configuration,
20
+ AdminAdvancedBanImportRequest
21
+ } from '@rebornteam/reborn-api';
22
+
23
+ const configuration = new Configuration();
24
+ const apiInstance = new AdminImportApi(configuration);
25
+
26
+ let adminAdvancedBanImportRequest: AdminAdvancedBanImportRequest; //
27
+
28
+ const { status, data } = await apiInstance.importAdvancedBan(
29
+ adminAdvancedBanImportRequest
30
+ );
31
+ ```
32
+
33
+ ### Parameters
34
+
35
+ |Name | Type | Description | Notes|
36
+ |------------- | ------------- | ------------- | -------------|
37
+ | **adminAdvancedBanImportRequest** | **AdminAdvancedBanImportRequest**| | |
38
+
39
+
40
+ ### Return type
41
+
42
+ **AdminAsyncJobStartResponse**
43
+
44
+ ### Authorization
45
+
46
+ [DiscordAuth](../README.md#DiscordAuth)
47
+
48
+ ### HTTP request headers
49
+
50
+ - **Content-Type**: application/json
51
+ - **Accept**: application/json
52
+
53
+
54
+ ### HTTP response details
55
+ | Status code | Description | Response headers |
56
+ |-------------|-------------|------------------|
57
+ |**202** | Job accepted; poll /admin/job/{id} for progress | - |
58
+ |**400** | Invalid request body | - |
59
+ |**401** | Unauthorized | - |
60
+ |**403** | Forbidden - Administrator role required | - |
61
+
62
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
63
+
@@ -0,0 +1,31 @@
1
+ # AdminJobConfig
2
+
3
+ Configuration metadata for a runnable job (fields + submit path).
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **jobType** | **string** | JobType name | [optional] [default to undefined]
10
+ **title** | **string** | Display title | [optional] [default to undefined]
11
+ **description** | **string** | Display description | [optional] [default to undefined]
12
+ **submitPath** | **string** | Path the filled-in {key:value} body is POSTed to | [optional] [default to undefined]
13
+ **requiresAdmin** | **boolean** | Whether running this job requires Administrator rank | [optional] [default to undefined]
14
+ **fields** | [**Array<AdminJobField>**](AdminJobField.md) | Fields to render, in order | [optional] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { AdminJobConfig } from '@rebornteam/reborn-api';
20
+
21
+ const instance: AdminJobConfig = {
22
+ jobType,
23
+ title,
24
+ description,
25
+ submitPath,
26
+ requiresAdmin,
27
+ fields,
28
+ };
29
+ ```
30
+
31
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,33 @@
1
+ # AdminJobField
2
+
3
+ One configurable field of a runnable job.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **key** | **string** | Field key; also the JSON property name submitted to the job\'s endpoint | [optional] [default to undefined]
10
+ **label** | **string** | Human label for the input | [optional] [default to undefined]
11
+ **type** | [**JobFieldType**](JobFieldType.md) | Input type | [optional] [default to undefined]
12
+ **required** | **boolean** | Whether the field must be provided | [optional] [default to undefined]
13
+ **defaultValue** | **string** | Default value, string form (booleans use \"true\"/\"false\") | [optional] [default to undefined]
14
+ **placeholder** | **string** | Placeholder text | [optional] [default to undefined]
15
+ **helpText** | **string** | Optional helper text shown under the input | [optional] [default to undefined]
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import { AdminJobField } from '@rebornteam/reborn-api';
21
+
22
+ const instance: AdminJobField = {
23
+ key,
24
+ label,
25
+ type,
26
+ required,
27
+ defaultValue,
28
+ placeholder,
29
+ helpText,
30
+ };
31
+ ```
32
+
33
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.smsh.sh*
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
7
  |[**cancel**](#cancel) | **DELETE** /admin/job/{id} | Request cancellation of an async job|
8
+ |[**config**](#config) | **GET** /admin/job/config | List configurable jobs|
8
9
  |[**downloadArtifact**](#downloadartifact) | **GET** /admin/job/{id}/artifact.csv | Download a job\'s CSV artifact|
9
10
  |[**get**](#get) | **GET** /admin/job/{id} | Get one async job|
10
11
  |[**list**](#list) | **GET** /admin/job | List async jobs|
@@ -63,6 +64,52 @@ void (empty response body)
63
64
 
64
65
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
65
66
 
67
+ # **config**
68
+ > Array<AdminJobConfig> config()
69
+
70
+ Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
71
+
72
+ ### Example
73
+
74
+ ```typescript
75
+ import {
76
+ AdminJobsApi,
77
+ Configuration
78
+ } from '@rebornteam/reborn-api';
79
+
80
+ const configuration = new Configuration();
81
+ const apiInstance = new AdminJobsApi(configuration);
82
+
83
+ const { status, data } = await apiInstance.config();
84
+ ```
85
+
86
+ ### Parameters
87
+ This endpoint does not have any parameters.
88
+
89
+
90
+ ### Return type
91
+
92
+ **Array<AdminJobConfig>**
93
+
94
+ ### Authorization
95
+
96
+ [DiscordAuth](../README.md#DiscordAuth)
97
+
98
+ ### HTTP request headers
99
+
100
+ - **Content-Type**: Not defined
101
+ - **Accept**: application/json
102
+
103
+
104
+ ### HTTP response details
105
+ | Status code | Description | Response headers |
106
+ |-------------|-------------|------------------|
107
+ |**200** | Job configuration metadata | - |
108
+ |**401** | Unauthorized | - |
109
+ |**403** | Forbidden - Moderator role required | - |
110
+
111
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
112
+
66
113
  # **downloadArtifact**
67
114
  > string downloadArtifact()
68
115
 
@@ -0,0 +1,15 @@
1
+ # JobFieldType
2
+
3
+ Input type
4
+
5
+ ## Enum
6
+
7
+ * `Text` (value: `'TEXT'`)
8
+
9
+ * `Number` (value: `'NUMBER'`)
10
+
11
+ * `Password` (value: `'PASSWORD'`)
12
+
13
+ * `Boolean` (value: `'BOOLEAN'`)
14
+
15
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 4.9.3
7
+ * The version of the OpenAPI document: 4.9.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebornteam/reborn-api",
3
- "version": "4.9.3",
3
+ "version": "4.9.4",
4
4
  "description": "OpenAPI client for @rebornteam/reborn-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {