Skip to content

Commit 497c708

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 9a72bf0 commit 497c708

46 files changed

Lines changed: 2466 additions & 332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ token.apiKey = "YOUR API KEY"
111111
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
112112
//token.apiKeyPrefix['Authorization'] = "Token"
113113

114-
var api = new BuiltByBitApi.GlobalApi()
114+
var api = new BuiltByBitApi.DefaultApi()
115115
var callback = function(error, data, response) {
116116
if (error) {
117117
console.error(error);
118118
} else {
119119
console.log('API called successfully. Returned data: ' + data);
120120
}
121121
};
122-
api.getV2Analytics(callback);
122+
api.getV2Health(callback);
123123

124124
```
125125

@@ -129,6 +129,9 @@ All URIs are relative to *https://api.builtbybit.com*
129129

130130
Class | Method | HTTP request | Description
131131
------------ | ------------- | ------------- | -------------
132+
*BuiltByBitApi.DefaultApi* | [**getV2Health**](docs/DefaultApi.md#getV2Health) | **GET** /v2/health | Retrieve a health status
133+
*BuiltByBitApi.DefaultApi* | [**getV2ResourcesCreatorCoupons**](docs/DefaultApi.md#getV2ResourcesCreatorCoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons
134+
*BuiltByBitApi.DefaultApi* | [**getV2ResourcesCreatorStores**](docs/DefaultApi.md#getV2ResourcesCreatorStores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
132135
*BuiltByBitApi.GlobalApi* | [**getV2Analytics**](docs/GlobalApi.md#getV2Analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
133136
*BuiltByBitApi.GlobalApi* | [**getV2AnalyticsGraph**](docs/GlobalApi.md#getV2AnalyticsGraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
134137
*BuiltByBitApi.GlobalApi* | [**getV2AnalyticsSingle**](docs/GlobalApi.md#getV2AnalyticsSingle) | **GET** /v2/analytics/single | Fetch a single analytics value
@@ -171,7 +174,7 @@ Class | Method | HTTP request | Description
171174
- [BuiltByBitApi.CartItemDiscountsInner](docs/CartItemDiscountsInner.md)
172175
- [BuiltByBitApi.CartSummary](docs/CartSummary.md)
173176
- [BuiltByBitApi.Category](docs/Category.md)
174-
- [BuiltByBitApi.Description](docs/Description.md)
177+
- [BuiltByBitApi.Coupon](docs/Coupon.md)
175178
- [BuiltByBitApi.Event](docs/Event.md)
176179
- [BuiltByBitApi.Filter](docs/Filter.md)
177180
- [BuiltByBitApi.FilterChoice](docs/FilterChoice.md)
@@ -192,12 +195,15 @@ Class | Method | HTTP request | Description
192195
- [BuiltByBitApi.GetV2AnalyticsSingle200ResponseDataPeriod](docs/GetV2AnalyticsSingle200ResponseDataPeriod.md)
193196
- [BuiltByBitApi.GetV2Events200Response](docs/GetV2Events200Response.md)
194197
- [BuiltByBitApi.GetV2Events200ResponseData](docs/GetV2Events200ResponseData.md)
198+
- [BuiltByBitApi.GetV2Health200Response](docs/GetV2Health200Response.md)
195199
- [BuiltByBitApi.GetV2ResourcesBuyerLatest200Response](docs/GetV2ResourcesBuyerLatest200Response.md)
196200
- [BuiltByBitApi.GetV2ResourcesBuyerLatest200ResponseData](docs/GetV2ResourcesBuyerLatest200ResponseData.md)
197201
- [BuiltByBitApi.GetV2ResourcesCreatorAddons200Response](docs/GetV2ResourcesCreatorAddons200Response.md)
198202
- [BuiltByBitApi.GetV2ResourcesCreatorAddons200ResponseData](docs/GetV2ResourcesCreatorAddons200ResponseData.md)
199203
- [BuiltByBitApi.GetV2ResourcesCreatorBundles200Response](docs/GetV2ResourcesCreatorBundles200Response.md)
200204
- [BuiltByBitApi.GetV2ResourcesCreatorBundles200ResponseData](docs/GetV2ResourcesCreatorBundles200ResponseData.md)
205+
- [BuiltByBitApi.GetV2ResourcesCreatorCoupons200Response](docs/GetV2ResourcesCreatorCoupons200Response.md)
206+
- [BuiltByBitApi.GetV2ResourcesCreatorCoupons200ResponseData](docs/GetV2ResourcesCreatorCoupons200ResponseData.md)
201207
- [BuiltByBitApi.GetV2ResourcesCreatorLicenses200Response](docs/GetV2ResourcesCreatorLicenses200Response.md)
202208
- [BuiltByBitApi.GetV2ResourcesCreatorLicenses200ResponseData](docs/GetV2ResourcesCreatorLicenses200ResponseData.md)
203209
- [BuiltByBitApi.GetV2ResourcesCreatorPurchases200Response](docs/GetV2ResourcesCreatorPurchases200Response.md)
@@ -208,6 +214,8 @@ Class | Method | HTTP request | Description
208214
- [BuiltByBitApi.GetV2ResourcesCreatorReviews200ResponseData](docs/GetV2ResourcesCreatorReviews200ResponseData.md)
209215
- [BuiltByBitApi.GetV2ResourcesCreatorSaleEvents200Response](docs/GetV2ResourcesCreatorSaleEvents200Response.md)
210216
- [BuiltByBitApi.GetV2ResourcesCreatorSaleEvents200ResponseData](docs/GetV2ResourcesCreatorSaleEvents200ResponseData.md)
217+
- [BuiltByBitApi.GetV2ResourcesCreatorStores200Response](docs/GetV2ResourcesCreatorStores200Response.md)
218+
- [BuiltByBitApi.GetV2ResourcesCreatorStores200ResponseData](docs/GetV2ResourcesCreatorStores200ResponseData.md)
211219
- [BuiltByBitApi.GetV2ResourcesCreatorUpdates200Response](docs/GetV2ResourcesCreatorUpdates200Response.md)
212220
- [BuiltByBitApi.GetV2ResourcesCreatorUpdates200ResponseData](docs/GetV2ResourcesCreatorUpdates200ResponseData.md)
213221
- [BuiltByBitApi.GetV2ResourcesCreatorVersions200Response](docs/GetV2ResourcesCreatorVersions200Response.md)
@@ -240,8 +248,10 @@ Class | Method | HTTP request | Description
240248
- [BuiltByBitApi.Purchase](docs/Purchase.md)
241249
- [BuiltByBitApi.Resource](docs/Resource.md)
242250
- [BuiltByBitApi.Review](docs/Review.md)
251+
- [BuiltByBitApi.RichText](docs/RichText.md)
243252
- [BuiltByBitApi.SaleEvent](docs/SaleEvent.md)
244253
- [BuiltByBitApi.SaleEventEntry](docs/SaleEventEntry.md)
254+
- [BuiltByBitApi.Store](docs/Store.md)
245255
- [BuiltByBitApi.Update](docs/Update.md)
246256
- [BuiltByBitApi.Version](docs/Version.md)
247257

docs/Bundle.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **String** | | [optional]
7+
**bundleId** | **Number** | | [optional]
8+
**userId** | **Number** | | [optional]
9+
**title** | **String** | | [optional]
10+
**description** | **String** | | [optional]
11+
**discount** | **Number** | | [optional]
12+
**createdAt** | **Number** | | [optional]
813

914

docs/Coupon.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# BuiltByBitApi.Coupon
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**couponId** | **Number** | | [optional]
8+
**userId** | **Number** | | [optional]
9+
**label** | **String** | This is the code a buyer would enter at checkout. | [optional]
10+
**discount** | **Number** | The discount to apply. Either a fixed value, or a decimal percent. Depends on the 'percent' field. | [optional]
11+
**percent** | **Boolean** | If true, the 'discount' field represents a decimal percentage. If false, the 'discount' field represents an absolute $ USD value. | [optional]
12+
**allContentTypes** | **[String]** | A list of content types for which this coupon code applies to without requiring an entry. Eg. if you created the coupon with the 'All resources' option selected, this list will include \"resource\". | [optional]
13+
**createdAt** | **Number** | A UNIX timestamp. | [optional]
14+
**expiresAt** | **Number** | A UNIX timestamp. | [optional]
15+
**maxUses** | **Number** | | [optional]
16+
**maxPerUserUses** | **Number** | | [optional]
17+
**uses** | **Number** | | [optional]
18+
**active** | **Boolean** | Whether or not the coupon code is active and can still be used at checkout. Accounts for the expiry date if set and the max use limit if set. | [optional]
19+
20+

docs/DefaultApi.md

Lines changed: 40 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@ All URIs are relative to *https://api.builtbybit.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**getV2Analytics**](DefaultApi.md#getV2Analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
8-
[**getV2AnalyticsGraph**](DefaultApi.md#getV2AnalyticsGraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
9-
[**getV2Events**](DefaultApi.md#getV2Events) | **GET** /v2/events | Fetch a list of pending events
10-
[**postV2EventsComplete**](DefaultApi.md#postV2EventsComplete) | **POST** /v2/events/complete | Mark events as complete
11-
[**postV2ResourcesCreatorUpdate**](DefaultApi.md#postV2ResourcesCreatorUpdate) | **POST** /v2/resources/creator/update | Post a resource update
7+
[**getV2Health**](DefaultApi.md#getV2Health) | **GET** /v2/health | Retrieve a health status
8+
[**getV2ResourcesCreatorCoupons**](DefaultApi.md#getV2ResourcesCreatorCoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons
9+
[**getV2ResourcesCreatorStores**](DefaultApi.md#getV2ResourcesCreatorStores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
1210

1311

1412

15-
## getV2Analytics
13+
## getV2Health
1614

17-
> GetV2Analytics200Response getV2Analytics()
15+
> GetV2Health200Response getV2Health()
1816
19-
Fetch a list of analytics definitions
17+
Retrieve a health status
2018

2119
### Example
2220

2321
```javascript
2422
import BuiltByBitApi from 'built_by_bit_api';
23+
let defaultClient = BuiltByBitApi.ApiClient.instance;
24+
// Configure API key authorization: token
25+
let token = defaultClient.authentications['token'];
26+
token.apiKey = 'YOUR API KEY';
27+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
28+
//token.apiKeyPrefix = 'Token';
2529

2630
let apiInstance = new BuiltByBitApi.DefaultApi();
27-
apiInstance.getV2Analytics((error, data, response) => {
31+
apiInstance.getV2Health((error, data, response) => {
2832
if (error) {
2933
console.error(error);
3034
} else {
@@ -39,39 +43,37 @@ This endpoint does not need any parameter.
3943

4044
### Return type
4145

42-
[**GetV2Analytics200Response**](GetV2Analytics200Response.md)
46+
[**GetV2Health200Response**](GetV2Health200Response.md)
4347

4448
### Authorization
4549

46-
No authorization required
50+
[token](../README.md#token)
4751

4852
### HTTP request headers
4953

5054
- **Content-Type**: Not defined
5155
- **Accept**: application/json
5256

5357

54-
## getV2AnalyticsGraph
58+
## getV2ResourcesCreatorCoupons
5559

56-
> GetV2AnalyticsGraph200Response getV2AnalyticsGraph(opts)
60+
> GetV2ResourcesCreatorCoupons200Response getV2ResourcesCreatorCoupons()
5761
58-
Fetch analytics graph data
62+
Fetch a list of your coupons
5963

6064
### Example
6165

6266
```javascript
6367
import BuiltByBitApi from 'built_by_bit_api';
68+
let defaultClient = BuiltByBitApi.ApiClient.instance;
69+
// Configure API key authorization: token
70+
let token = defaultClient.authentications['token'];
71+
token.apiKey = 'YOUR API KEY';
72+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
73+
//token.apiKeyPrefix = 'Token';
6474

6575
let apiInstance = new BuiltByBitApi.DefaultApi();
66-
let opts = {
67-
'analytics': null, // Array |
68-
'period': "period_example", // String |
69-
'grouping': "grouping_example", // String |
70-
'filters': "filters_example", // String |
71-
'startDate': "startDate_example", // String | Only respected when 'period' = 'custom_range'.
72-
'endDate': "endDate_example" // String | Only respected when 'period' = 'custom_range'.
73-
};
74-
apiInstance.getV2AnalyticsGraph(opts, (error, data, response) => {
76+
apiInstance.getV2ResourcesCreatorCoupons((error, data, response) => {
7577
if (error) {
7678
console.error(error);
7779
} else {
@@ -82,43 +84,41 @@ apiInstance.getV2AnalyticsGraph(opts, (error, data, response) => {
8284

8385
### Parameters
8486

85-
86-
Name | Type | Description | Notes
87-
------------- | ------------- | ------------- | -------------
88-
**analytics** | [**Array**](.md)| | [optional]
89-
**period** | **String**| | [optional]
90-
**grouping** | **String**| | [optional]
91-
**filters** | **String**| | [optional]
92-
**startDate** | **String**| Only respected when 'period' = 'custom_range'. | [optional]
93-
**endDate** | **String**| Only respected when 'period' = 'custom_range'. | [optional]
87+
This endpoint does not need any parameter.
9488

9589
### Return type
9690

97-
[**GetV2AnalyticsGraph200Response**](GetV2AnalyticsGraph200Response.md)
91+
[**GetV2ResourcesCreatorCoupons200Response**](GetV2ResourcesCreatorCoupons200Response.md)
9892

9993
### Authorization
10094

101-
No authorization required
95+
[token](../README.md#token)
10296

10397
### HTTP request headers
10498

10599
- **Content-Type**: Not defined
106100
- **Accept**: application/json
107101

108102

109-
## getV2Events
103+
## getV2ResourcesCreatorStores
110104

111-
> GetV2Events200Response getV2Events()
105+
> GetV2ResourcesCreatorStores200Response getV2ResourcesCreatorStores()
112106
113-
Fetch a list of pending events
107+
Fetch a list of your stores
114108

115109
### Example
116110

117111
```javascript
118112
import BuiltByBitApi from 'built_by_bit_api';
113+
let defaultClient = BuiltByBitApi.ApiClient.instance;
114+
// Configure API key authorization: token
115+
let token = defaultClient.authentications['token'];
116+
token.apiKey = 'YOUR API KEY';
117+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
118+
//token.apiKeyPrefix = 'Token';
119119

120120
let apiInstance = new BuiltByBitApi.DefaultApi();
121-
apiInstance.getV2Events((error, data, response) => {
121+
apiInstance.getV2ResourcesCreatorStores((error, data, response) => {
122122
if (error) {
123123
console.error(error);
124124
} else {
@@ -133,106 +133,14 @@ This endpoint does not need any parameter.
133133

134134
### Return type
135135

136-
[**GetV2Events200Response**](GetV2Events200Response.md)
136+
[**GetV2ResourcesCreatorStores200Response**](GetV2ResourcesCreatorStores200Response.md)
137137

138138
### Authorization
139139

140-
No authorization required
140+
[token](../README.md#token)
141141

142142
### HTTP request headers
143143

144144
- **Content-Type**: Not defined
145145
- **Accept**: application/json
146146

147-
148-
## postV2EventsComplete
149-
150-
> PostV2EventsComplete200Response postV2EventsComplete(opts)
151-
152-
Mark events as complete
153-
154-
### Example
155-
156-
```javascript
157-
import BuiltByBitApi from 'built_by_bit_api';
158-
159-
let apiInstance = new BuiltByBitApi.DefaultApi();
160-
let opts = {
161-
'postV2EventsCompleteRequest': new BuiltByBitApi.PostV2EventsCompleteRequest() // PostV2EventsCompleteRequest |
162-
};
163-
apiInstance.postV2EventsComplete(opts, (error, data, response) => {
164-
if (error) {
165-
console.error(error);
166-
} else {
167-
console.log('API called successfully. Returned data: ' + data);
168-
}
169-
});
170-
```
171-
172-
### Parameters
173-
174-
175-
Name | Type | Description | Notes
176-
------------- | ------------- | ------------- | -------------
177-
**postV2EventsCompleteRequest** | [**PostV2EventsCompleteRequest**](PostV2EventsCompleteRequest.md)| | [optional]
178-
179-
### Return type
180-
181-
[**PostV2EventsComplete200Response**](PostV2EventsComplete200Response.md)
182-
183-
### Authorization
184-
185-
No authorization required
186-
187-
### HTTP request headers
188-
189-
- **Content-Type**: application/json
190-
- **Accept**: application/json
191-
192-
193-
## postV2ResourcesCreatorUpdate
194-
195-
> PostV2ResourcesCreatorUpdate200Response postV2ResourcesCreatorUpdate(opts)
196-
197-
Post a resource update
198-
199-
Creates a new version for the resource and optionally posts a public update message. The uploaded file must be encoded using base64 as part of the JSON request body shown below. The request body (including the base64 encoded file data) cannot exceed 100MB. This roughly equates to a 67MB upload limit for the raw file when taking into account base64 encoding losses.
200-
201-
### Example
202-
203-
```javascript
204-
import BuiltByBitApi from 'built_by_bit_api';
205-
206-
let apiInstance = new BuiltByBitApi.DefaultApi();
207-
let opts = {
208-
'postV2ResourcesCreatorUpdateRequest': new BuiltByBitApi.PostV2ResourcesCreatorUpdateRequest() // PostV2ResourcesCreatorUpdateRequest |
209-
};
210-
apiInstance.postV2ResourcesCreatorUpdate(opts, (error, data, response) => {
211-
if (error) {
212-
console.error(error);
213-
} else {
214-
console.log('API called successfully. Returned data: ' + data);
215-
}
216-
});
217-
```
218-
219-
### Parameters
220-
221-
222-
Name | Type | Description | Notes
223-
------------- | ------------- | ------------- | -------------
224-
**postV2ResourcesCreatorUpdateRequest** | [**PostV2ResourcesCreatorUpdateRequest**](PostV2ResourcesCreatorUpdateRequest.md)| | [optional]
225-
226-
### Return type
227-
228-
[**PostV2ResourcesCreatorUpdate200Response**](PostV2ResourcesCreatorUpdate200Response.md)
229-
230-
### Authorization
231-
232-
No authorization required
233-
234-
### HTTP request headers
235-
236-
- **Content-Type**: application/json
237-
- **Accept**: application/json
238-

docs/GetV2Health200Response.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# BuiltByBitApi.GetV2Health200Response
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**result** | **String** | | [optional]
8+
**data** | **String** | | [optional]
9+
10+
11+
12+
## Enum: ResultEnum
13+
14+
15+
* `success` (value: `"success"`)
16+
17+
18+
19+
20+
21+
## Enum: DataEnum
22+
23+
24+
* `ok` (value: `"ok"`)
25+
26+
27+
28+

0 commit comments

Comments
 (0)