@tennac-booking/sdk 1.0.0

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.
Files changed (117) hide show
  1. package/.openapi-generator/FILES +17 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +46 -0
  5. package/apis/AuthApi.ts +157 -0
  6. package/apis/UsersApi.ts +56 -0
  7. package/apis/index.ts +4 -0
  8. package/dist/apis/AuthApi.d.ts +39 -0
  9. package/dist/apis/AuthApi.js +117 -0
  10. package/dist/apis/UsersApi.d.ts +26 -0
  11. package/dist/apis/UsersApi.js +58 -0
  12. package/dist/apis/index.d.ts +2 -0
  13. package/dist/apis/index.js +20 -0
  14. package/dist/esm/apis/AuthApi.d.ts +39 -0
  15. package/dist/esm/apis/AuthApi.js +113 -0
  16. package/dist/esm/apis/UsersApi.d.ts +26 -0
  17. package/dist/esm/apis/UsersApi.js +54 -0
  18. package/dist/esm/apis/index.d.ts +2 -0
  19. package/dist/esm/apis/index.js +4 -0
  20. package/dist/esm/index.d.ts +3 -0
  21. package/dist/esm/index.js +5 -0
  22. package/dist/esm/models/Booking.d.ts +87 -0
  23. package/dist/esm/models/Booking.js +82 -0
  24. package/dist/esm/models/Court.d.ts +76 -0
  25. package/dist/esm/models/Court.js +72 -0
  26. package/dist/esm/models/Slot.d.ts +44 -0
  27. package/dist/esm/models/Slot.js +51 -0
  28. package/dist/esm/models/SlotException.d.ts +50 -0
  29. package/dist/esm/models/SlotException.js +55 -0
  30. package/dist/esm/models/User.d.ts +92 -0
  31. package/dist/esm/models/User.js +69 -0
  32. package/dist/esm/models/index.d.ts +5 -0
  33. package/dist/esm/models/index.js +7 -0
  34. package/dist/esm/runtime.d.ts +184 -0
  35. package/dist/esm/runtime.js +334 -0
  36. package/dist/esm/src/apis/AuthApi.d.ts +39 -0
  37. package/dist/esm/src/apis/AuthApi.js +113 -0
  38. package/dist/esm/src/apis/UsersApi.d.ts +26 -0
  39. package/dist/esm/src/apis/UsersApi.js +54 -0
  40. package/dist/esm/src/apis/index.d.ts +2 -0
  41. package/dist/esm/src/apis/index.js +4 -0
  42. package/dist/esm/src/index.d.ts +3 -0
  43. package/dist/esm/src/index.js +5 -0
  44. package/dist/esm/src/models/Booking.d.ts +87 -0
  45. package/dist/esm/src/models/Booking.js +82 -0
  46. package/dist/esm/src/models/Court.d.ts +76 -0
  47. package/dist/esm/src/models/Court.js +72 -0
  48. package/dist/esm/src/models/Slot.d.ts +44 -0
  49. package/dist/esm/src/models/Slot.js +51 -0
  50. package/dist/esm/src/models/SlotException.d.ts +50 -0
  51. package/dist/esm/src/models/SlotException.js +55 -0
  52. package/dist/esm/src/models/User.d.ts +92 -0
  53. package/dist/esm/src/models/User.js +69 -0
  54. package/dist/esm/src/models/index.d.ts +5 -0
  55. package/dist/esm/src/models/index.js +7 -0
  56. package/dist/esm/src/runtime.d.ts +184 -0
  57. package/dist/esm/src/runtime.js +334 -0
  58. package/dist/index.d.ts +3 -0
  59. package/dist/index.js +21 -0
  60. package/dist/models/Booking.d.ts +87 -0
  61. package/dist/models/Booking.js +90 -0
  62. package/dist/models/Court.d.ts +76 -0
  63. package/dist/models/Court.js +80 -0
  64. package/dist/models/Slot.d.ts +44 -0
  65. package/dist/models/Slot.js +58 -0
  66. package/dist/models/SlotException.d.ts +50 -0
  67. package/dist/models/SlotException.js +62 -0
  68. package/dist/models/User.d.ts +92 -0
  69. package/dist/models/User.js +76 -0
  70. package/dist/models/index.d.ts +5 -0
  71. package/dist/models/index.js +23 -0
  72. package/dist/runtime.d.ts +184 -0
  73. package/dist/runtime.js +350 -0
  74. package/dist/src/apis/AuthApi.d.ts +39 -0
  75. package/dist/src/apis/AuthApi.js +117 -0
  76. package/dist/src/apis/UsersApi.d.ts +26 -0
  77. package/dist/src/apis/UsersApi.js +58 -0
  78. package/dist/src/apis/index.d.ts +2 -0
  79. package/dist/src/apis/index.js +20 -0
  80. package/dist/src/index.d.ts +3 -0
  81. package/dist/src/index.js +21 -0
  82. package/dist/src/models/Booking.d.ts +87 -0
  83. package/dist/src/models/Booking.js +90 -0
  84. package/dist/src/models/Court.d.ts +76 -0
  85. package/dist/src/models/Court.js +80 -0
  86. package/dist/src/models/Slot.d.ts +44 -0
  87. package/dist/src/models/Slot.js +58 -0
  88. package/dist/src/models/SlotException.d.ts +50 -0
  89. package/dist/src/models/SlotException.js +62 -0
  90. package/dist/src/models/User.d.ts +92 -0
  91. package/dist/src/models/User.js +76 -0
  92. package/dist/src/models/index.d.ts +5 -0
  93. package/dist/src/models/index.js +23 -0
  94. package/dist/src/runtime.d.ts +184 -0
  95. package/dist/src/runtime.js +350 -0
  96. package/index.ts +5 -0
  97. package/models/Booking.ts +142 -0
  98. package/models/Court.ts +130 -0
  99. package/models/Slot.ts +84 -0
  100. package/models/SlotException.ts +93 -0
  101. package/models/User.ts +149 -0
  102. package/models/index.ts +7 -0
  103. package/package.json +20 -0
  104. package/runtime.ts +432 -0
  105. package/src/apis/AuthApi.ts +157 -0
  106. package/src/apis/UsersApi.ts +56 -0
  107. package/src/apis/index.ts +4 -0
  108. package/src/index.ts +5 -0
  109. package/src/models/Booking.ts +142 -0
  110. package/src/models/Court.ts +130 -0
  111. package/src/models/Slot.ts +84 -0
  112. package/src/models/SlotException.ts +93 -0
  113. package/src/models/User.ts +149 -0
  114. package/src/models/index.ts +7 -0
  115. package/src/runtime.ts +432 -0
  116. package/tsconfig.esm.json +7 -0
  117. package/tsconfig.json +16 -0
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pickle Ball API
5
+ * API for managing pickle ball games and players
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the SlotException interface.
16
+ */
17
+ export function instanceOfSlotException(value) {
18
+ if (!('startDate' in value) || value['startDate'] === undefined)
19
+ return false;
20
+ if (!('endDate' in value) || value['endDate'] === undefined)
21
+ return false;
22
+ if (!('courtId' in value) || value['courtId'] === undefined)
23
+ return false;
24
+ if (!('reason' in value) || value['reason'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function SlotExceptionFromJSON(json) {
29
+ return SlotExceptionFromJSONTyped(json, false);
30
+ }
31
+ export function SlotExceptionFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'startDate': (new Date(json['startDate'])),
37
+ 'endDate': (new Date(json['endDate'])),
38
+ 'courtId': json['courtId'],
39
+ 'reason': json['reason'],
40
+ };
41
+ }
42
+ export function SlotExceptionToJSON(json) {
43
+ return SlotExceptionToJSONTyped(json, false);
44
+ }
45
+ export function SlotExceptionToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'startDate': ((value['startDate']).toISOString()),
51
+ 'endDate': ((value['endDate']).toISOString()),
52
+ 'courtId': value['courtId'],
53
+ 'reason': value['reason'],
54
+ };
55
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Pickle Ball API
3
+ * API for managing pickle ball games and players
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface User
16
+ */
17
+ export interface User {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof User
22
+ */
23
+ username?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof User
28
+ */
29
+ firstName: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof User
34
+ */
35
+ lastName: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof User
40
+ */
41
+ email: string;
42
+ /**
43
+ *
44
+ * @type {boolean}
45
+ * @memberof User
46
+ */
47
+ isAccountVerified?: boolean;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof User
52
+ */
53
+ level?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof User
58
+ */
59
+ stripeCustomerId?: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof User
64
+ */
65
+ phone?: string;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof User
70
+ */
71
+ password: string;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof User
76
+ */
77
+ profilePicture?: string;
78
+ /**
79
+ *
80
+ * @type {boolean}
81
+ * @memberof User
82
+ */
83
+ isAdmin?: boolean;
84
+ }
85
+ /**
86
+ * Check if a given object implements the User interface.
87
+ */
88
+ export declare function instanceOfUser(value: object): value is User;
89
+ export declare function UserFromJSON(json: any): User;
90
+ export declare function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User;
91
+ export declare function UserToJSON(json: any): User;
92
+ export declare function UserToJSONTyped(value?: User | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,69 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pickle Ball API
5
+ * API for managing pickle ball games and players
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the User interface.
16
+ */
17
+ export function instanceOfUser(value) {
18
+ if (!('firstName' in value) || value['firstName'] === undefined)
19
+ return false;
20
+ if (!('lastName' in value) || value['lastName'] === undefined)
21
+ return false;
22
+ if (!('email' in value) || value['email'] === undefined)
23
+ return false;
24
+ if (!('password' in value) || value['password'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function UserFromJSON(json) {
29
+ return UserFromJSONTyped(json, false);
30
+ }
31
+ export function UserFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'username': json['username'] == null ? undefined : json['username'],
37
+ 'firstName': json['firstName'],
38
+ 'lastName': json['lastName'],
39
+ 'email': json['email'],
40
+ 'isAccountVerified': json['isAccountVerified'] == null ? undefined : json['isAccountVerified'],
41
+ 'level': json['level'] == null ? undefined : json['level'],
42
+ 'stripeCustomerId': json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
43
+ 'phone': json['phone'] == null ? undefined : json['phone'],
44
+ 'password': json['password'],
45
+ 'profilePicture': json['profilePicture'] == null ? undefined : json['profilePicture'],
46
+ 'isAdmin': json['isAdmin'] == null ? undefined : json['isAdmin'],
47
+ };
48
+ }
49
+ export function UserToJSON(json) {
50
+ return UserToJSONTyped(json, false);
51
+ }
52
+ export function UserToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'username': value['username'],
58
+ 'firstName': value['firstName'],
59
+ 'lastName': value['lastName'],
60
+ 'email': value['email'],
61
+ 'isAccountVerified': value['isAccountVerified'],
62
+ 'level': value['level'],
63
+ 'stripeCustomerId': value['stripeCustomerId'],
64
+ 'phone': value['phone'],
65
+ 'password': value['password'],
66
+ 'profilePicture': value['profilePicture'],
67
+ 'isAdmin': value['isAdmin'],
68
+ };
69
+ }
@@ -0,0 +1,5 @@
1
+ export * from './Booking';
2
+ export * from './Court';
3
+ export * from './Slot';
4
+ export * from './SlotException';
5
+ export * from './User';
@@ -0,0 +1,7 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './Booking';
4
+ export * from './Court';
5
+ export * from './Slot';
6
+ export * from './SlotException';
7
+ export * from './User';
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Pickle Ball API
3
+ * API for managing pickle ball games and players
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export declare const BASE_PATH: string;
13
+ export interface ConfigurationParameters {
14
+ basePath?: string;
15
+ fetchApi?: FetchAPI;
16
+ middleware?: Middleware[];
17
+ queryParamsStringify?: (params: HTTPQuery) => string;
18
+ username?: string;
19
+ password?: string;
20
+ apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
21
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
22
+ headers?: HTTPHeaders;
23
+ credentials?: RequestCredentials;
24
+ }
25
+ export declare class Configuration {
26
+ private configuration;
27
+ constructor(configuration?: ConfigurationParameters);
28
+ set config(configuration: Configuration);
29
+ get basePath(): string;
30
+ get fetchApi(): FetchAPI | undefined;
31
+ get middleware(): Middleware[];
32
+ get queryParamsStringify(): (params: HTTPQuery) => string;
33
+ get username(): string | undefined;
34
+ get password(): string | undefined;
35
+ get apiKey(): ((name: string) => string | Promise<string>) | undefined;
36
+ get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
37
+ get headers(): HTTPHeaders | undefined;
38
+ get credentials(): RequestCredentials | undefined;
39
+ }
40
+ export declare const DefaultConfig: Configuration;
41
+ /**
42
+ * This is the base class for all generated API classes.
43
+ */
44
+ export declare class BaseAPI {
45
+ protected configuration: Configuration;
46
+ private static readonly jsonRegex;
47
+ private middleware;
48
+ constructor(configuration?: Configuration);
49
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
50
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
51
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
52
+ /**
53
+ * Check if the given MIME is a JSON MIME.
54
+ * JSON MIME examples:
55
+ * application/json
56
+ * application/json; charset=UTF8
57
+ * APPLICATION/JSON
58
+ * application/vnd.company+json
59
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
60
+ * @return True if the given MIME is JSON, false otherwise.
61
+ */
62
+ protected isJsonMime(mime: string | null | undefined): boolean;
63
+ protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
64
+ private createFetchParams;
65
+ private fetchApi;
66
+ /**
67
+ * Create a shallow clone of `this` by constructing a new instance
68
+ * and then shallow cloning data members.
69
+ */
70
+ private clone;
71
+ }
72
+ export declare class ResponseError extends Error {
73
+ response: Response;
74
+ name: "ResponseError";
75
+ constructor(response: Response, msg?: string);
76
+ }
77
+ export declare class FetchError extends Error {
78
+ cause: Error;
79
+ name: "FetchError";
80
+ constructor(cause: Error, msg?: string);
81
+ }
82
+ export declare class RequiredError extends Error {
83
+ field: string;
84
+ name: "RequiredError";
85
+ constructor(field: string, msg?: string);
86
+ }
87
+ export declare const COLLECTION_FORMATS: {
88
+ csv: string;
89
+ ssv: string;
90
+ tsv: string;
91
+ pipes: string;
92
+ };
93
+ export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
94
+ export type Json = any;
95
+ export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
96
+ export type HTTPHeaders = {
97
+ [key: string]: string;
98
+ };
99
+ export type HTTPQuery = {
100
+ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
101
+ };
102
+ export type HTTPBody = Json | FormData | URLSearchParams;
103
+ export type HTTPRequestInit = {
104
+ headers?: HTTPHeaders;
105
+ method: HTTPMethod;
106
+ credentials?: RequestCredentials;
107
+ body?: HTTPBody;
108
+ };
109
+ export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
110
+ export type InitOverrideFunction = (requestContext: {
111
+ init: HTTPRequestInit;
112
+ context: RequestOpts;
113
+ }) => Promise<RequestInit>;
114
+ export interface FetchParams {
115
+ url: string;
116
+ init: RequestInit;
117
+ }
118
+ export interface RequestOpts {
119
+ path: string;
120
+ method: HTTPMethod;
121
+ headers: HTTPHeaders;
122
+ query?: HTTPQuery;
123
+ body?: HTTPBody;
124
+ }
125
+ export declare function querystring(params: HTTPQuery, prefix?: string): string;
126
+ export declare function exists(json: any, key: string): boolean;
127
+ export declare function mapValues(data: any, fn: (item: any) => any): {
128
+ [key: string]: any;
129
+ };
130
+ export declare function canConsumeForm(consumes: Consume[]): boolean;
131
+ export interface Consume {
132
+ contentType: string;
133
+ }
134
+ export interface RequestContext {
135
+ fetch: FetchAPI;
136
+ url: string;
137
+ init: RequestInit;
138
+ }
139
+ export interface ResponseContext {
140
+ fetch: FetchAPI;
141
+ url: string;
142
+ init: RequestInit;
143
+ response: Response;
144
+ }
145
+ export interface ErrorContext {
146
+ fetch: FetchAPI;
147
+ url: string;
148
+ init: RequestInit;
149
+ error: unknown;
150
+ response?: Response;
151
+ }
152
+ export interface Middleware {
153
+ pre?(context: RequestContext): Promise<FetchParams | void>;
154
+ post?(context: ResponseContext): Promise<Response | void>;
155
+ onError?(context: ErrorContext): Promise<Response | void>;
156
+ }
157
+ export interface ApiResponse<T> {
158
+ raw: Response;
159
+ value(): Promise<T>;
160
+ }
161
+ export interface ResponseTransformer<T> {
162
+ (json: any): T;
163
+ }
164
+ export declare class JSONApiResponse<T> {
165
+ raw: Response;
166
+ private transformer;
167
+ constructor(raw: Response, transformer?: ResponseTransformer<T>);
168
+ value(): Promise<T>;
169
+ }
170
+ export declare class VoidApiResponse {
171
+ raw: Response;
172
+ constructor(raw: Response);
173
+ value(): Promise<void>;
174
+ }
175
+ export declare class BlobApiResponse {
176
+ raw: Response;
177
+ constructor(raw: Response);
178
+ value(): Promise<Blob>;
179
+ }
180
+ export declare class TextApiResponse {
181
+ raw: Response;
182
+ constructor(raw: Response);
183
+ value(): Promise<string>;
184
+ }