@snokam/platform-client 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 (200) hide show
  1. package/.openapi-generator-ignore +23 -0
  2. package/README.md +423 -0
  3. package/dist/apis/PlatformClient.d.ts +2194 -0
  4. package/dist/apis/PlatformClient.js +5902 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +19 -0
  7. package/dist/esm/apis/PlatformClient.d.ts +2194 -0
  8. package/dist/esm/apis/PlatformClient.js +5898 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +3 -0
  11. package/dist/esm/index.d.ts +3 -0
  12. package/dist/esm/index.js +5 -0
  13. package/dist/esm/models/index.d.ts +6691 -0
  14. package/dist/esm/models/index.js +336 -0
  15. package/dist/esm/runtime.d.ts +181 -0
  16. package/dist/esm/runtime.js +342 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +21 -0
  19. package/dist/models/index.d.ts +6691 -0
  20. package/dist/models/index.js +339 -0
  21. package/dist/runtime.d.ts +181 -0
  22. package/dist/runtime.js +357 -0
  23. package/docs/AccessSubject.md +17 -0
  24. package/docs/ActivateRequest.md +15 -0
  25. package/docs/ActivateResult.md +16 -0
  26. package/docs/AddCustomDomainRequest.md +16 -0
  27. package/docs/ApiTokenSummary.md +20 -0
  28. package/docs/ApiTokenVerifyResult.md +16 -0
  29. package/docs/AppCatalogEntry.md +18 -0
  30. package/docs/AppModule.md +20 -0
  31. package/docs/ApproveDeviceRequest.md +15 -0
  32. package/docs/BillingPaymentMethod.md +16 -0
  33. package/docs/BillingSessionRequest.md +14 -0
  34. package/docs/BillingSessionResponse.md +14 -0
  35. package/docs/BridgeWebhookResult.md +18 -0
  36. package/docs/Business.md +65 -0
  37. package/docs/BusinessAccess.md +15 -0
  38. package/docs/BusinessConfig.md +18 -0
  39. package/docs/BusinessHealth.md +17 -0
  40. package/docs/BusinessMeterUsage.md +18 -0
  41. package/docs/BusinessOwner.md +16 -0
  42. package/docs/BusinessUsageRollup.md +23 -0
  43. package/docs/Capability.md +17 -0
  44. package/docs/CommissionTierReference.md +16 -0
  45. package/docs/ComponentBlocksInnerOneOfChildrenInner.md +17 -0
  46. package/docs/ComponentBlocksInnerOneOfMarkDefsInner.md +16 -0
  47. package/docs/CreateApiTokenRequest.md +15 -0
  48. package/docs/CreateUserRequest.md +20 -0
  49. package/docs/CreatedApiToken.md +21 -0
  50. package/docs/CredentialSummary.md +21 -0
  51. package/docs/CustomDomain.md +18 -0
  52. package/docs/CustomDomainProvisioning.md +15 -0
  53. package/docs/DevicePairRequestBody.md +14 -0
  54. package/docs/DevicePairing.md +17 -0
  55. package/docs/DevicePairingStatus.md +17 -0
  56. package/docs/DevicePollRequestBody.md +15 -0
  57. package/docs/DeviceScreen.md +20 -0
  58. package/docs/DirectoryAppRoleItem.md +15 -0
  59. package/docs/DirectoryGroupItem.md +15 -0
  60. package/docs/DirectoryGroupsResponse.md +14 -0
  61. package/docs/DirectoryLicenseItem.md +16 -0
  62. package/docs/DirectoryLicensesResponse.md +14 -0
  63. package/docs/DirectoryMailbox.md +15 -0
  64. package/docs/DirectoryServicePrincipalItem.md +16 -0
  65. package/docs/DirectoryServicePrincipalsResponse.md +14 -0
  66. package/docs/DnsRecord.md +16 -0
  67. package/docs/EmployeeReference.md +16 -0
  68. package/docs/EmployeeSettings.md +14 -0
  69. package/docs/EmployeeSystemAccess.md +24 -0
  70. package/docs/EmployeeSystemConfig.md +18 -0
  71. package/docs/Entitlements.md +23 -0
  72. package/docs/FacebookAccount.md +17 -0
  73. package/docs/GitHubRepo.md +18 -0
  74. package/docs/GoogleAnalyticsProperty.md +16 -0
  75. package/docs/GoogleAnalyticsSelection.md +14 -0
  76. package/docs/ImpersonationHistoryEntry.md +25 -0
  77. package/docs/IntegrationCheckResult.md +18 -0
  78. package/docs/IntegrationHealthStatus.md +16 -0
  79. package/docs/IntegrationSecret.md +16 -0
  80. package/docs/IntegrationSetting.md +17 -0
  81. package/docs/IntegrationSummary.md +29 -0
  82. package/docs/InviteCredentialRequest.md +15 -0
  83. package/docs/InvoiceBasis.md +20 -0
  84. package/docs/InvoiceBasisLine.md +18 -0
  85. package/docs/LoginConfig.md +21 -0
  86. package/docs/MeApp.md +15 -0
  87. package/docs/MeterEnforcementDecision.md +19 -0
  88. package/docs/MeterEntitlement.md +22 -0
  89. package/docs/ModelReconciliation.md +24 -0
  90. package/docs/OAuthAccessTokenResponse.md +16 -0
  91. package/docs/OAuthStartResponse.md +14 -0
  92. package/docs/OlafApiKeyResponse.md +14 -0
  93. package/docs/OlafTeamsSettings.md +14 -0
  94. package/docs/OnboardBusinessRequest.md +27 -0
  95. package/docs/OnboardingConfig.md +18 -0
  96. package/docs/OnboardingStatus.md +19 -0
  97. package/docs/OnboardingStep.md +15 -0
  98. package/docs/PageEmployeeOrderInner.md +17 -0
  99. package/docs/PageEquipmentInner.md +17 -0
  100. package/docs/PasswordLoginRequest.md +17 -0
  101. package/docs/PasswordLoginResult.md +20 -0
  102. package/docs/PatchBusinessRequest.md +26 -0
  103. package/docs/PatchEmployee.md +58 -0
  104. package/docs/PendingDevicePreview.md +17 -0
  105. package/docs/PickSanityPatchEmployeeExcludeKeyofSanityPatchEmployeeScopeGrantsSalaryConfig.md +14 -0
  106. package/docs/PickSanityPatchEmployeeExcludeKeyofSanityPatchEmployeeScopeGrantsSettings.md +14 -0
  107. package/docs/PlanFeature.md +16 -0
  108. package/docs/PlanInfo.md +21 -0
  109. package/docs/PlanMeter.md +24 -0
  110. package/docs/PlatformClient.md +9321 -0
  111. package/docs/PlatformIntegration.md +21 -0
  112. package/docs/PlatformSanityConfig.md +17 -0
  113. package/docs/PlatformSecretField.md +16 -0
  114. package/docs/PlatformSecretStatus.md +16 -0
  115. package/docs/PowerOfficeConnectResponse.md +14 -0
  116. package/docs/PowerOfficeProduct.md +15 -0
  117. package/docs/PowerOfficeProductsResponse.md +15 -0
  118. package/docs/PowerOfficeProject.md +15 -0
  119. package/docs/PowerOfficeProjectsResponse.md +15 -0
  120. package/docs/ProtectedEmployee.md +63 -0
  121. package/docs/ProvisioningEvent.md +17 -0
  122. package/docs/RecordImpersonationActivityRequest.md +18 -0
  123. package/docs/RenameDeviceRequest.md +14 -0
  124. package/docs/ResetConfirmRequest.md +16 -0
  125. package/docs/ResetRequest.md +15 -0
  126. package/docs/RevokeRequest.md +14 -0
  127. package/docs/RollupMeterTotal.md +18 -0
  128. package/docs/SanityCreateEmployeeCliftonStrengthsInner.md +17 -0
  129. package/docs/SanityCreateEmployeeGroupsInner.md +17 -0
  130. package/docs/SanityCreateEmployeeTagsInner.md +17 -0
  131. package/docs/SanityCreateEmployeeTechnologiesInner.md +17 -0
  132. package/docs/SanityEmployeeCliftonStrengthsInner.md +20 -0
  133. package/docs/SanityEmployeeCommissionTier.md +20 -0
  134. package/docs/SanityEmployeeEquipmentInner.md +19 -0
  135. package/docs/SanityEmployeeGroupsInner.md +24 -0
  136. package/docs/SanityEmployeeManager.md +23 -0
  137. package/docs/SanityEmployeeNextOfKinInner.md +17 -0
  138. package/docs/SanityEmployeeSalaryConfig.md +14 -0
  139. package/docs/SanityEmployeeSettings.md +14 -0
  140. package/docs/SanityImageAssetReference.md +16 -0
  141. package/docs/SanityImageCrop.md +18 -0
  142. package/docs/SanityImageHotspot.md +18 -0
  143. package/docs/SanityPatchPageMetaImage.md +18 -0
  144. package/docs/SanitySystemsInnerDescriptionInner.md +20 -0
  145. package/docs/SanityTechnologyWithRelationsArticlesInnerMediaOneOf.md +15 -0
  146. package/docs/SanityTechnologyWithRelationsEmployeesInnerTagsInner.md +17 -0
  147. package/docs/SanityTechnologyWithRelationsProjectsInnerTechnologiesInner.md +18 -0
  148. package/docs/SanityTvCategoryDashboardsInnerBackgroundImage.md +15 -0
  149. package/docs/SanityTvCategoryDashboardsInnerBackgroundImageAsset.md +18 -0
  150. package/docs/ScopeDefinition.md +17 -0
  151. package/docs/SessionBootstrapRequest.md +14 -0
  152. package/docs/SetActiveProviderRequest.md +15 -0
  153. package/docs/SetFacebookAccountRequest.md +17 -0
  154. package/docs/SetGoogleAnalyticsPropertyRequest.md +14 -0
  155. package/docs/SetPlatformSecretRequest.md +14 -0
  156. package/docs/SetScopeGrantsRequest.md +14 -0
  157. package/docs/SetWorkReposRequest.md +14 -0
  158. package/docs/SetWorkspaceRepoRequest.md +14 -0
  159. package/docs/SignupConfig.md +14 -0
  160. package/docs/SignupRequest.md +25 -0
  161. package/docs/SignupResult.md +15 -0
  162. package/docs/Slug.md +16 -0
  163. package/docs/SsoExchangeRequest.md +14 -0
  164. package/docs/StartImpersonationRequest.md +16 -0
  165. package/docs/StartImpersonationResult.md +20 -0
  166. package/docs/StudioSanityConfig.md +16 -0
  167. package/docs/SystemRoleOption.md +15 -0
  168. package/docs/TeamsAcsTokenResponse.md +16 -0
  169. package/docs/TeamsAuthStateResponse.md +14 -0
  170. package/docs/TenantDomain.md +17 -0
  171. package/docs/TenantInfo.md +32 -0
  172. package/docs/TenantSanityCredentials.md +16 -0
  173. package/docs/TokenExchangeRequest.md +14 -0
  174. package/docs/TokenExchangeResult.md +15 -0
  175. package/docs/TokenReconciliationReport.md +16 -0
  176. package/docs/TokenReconciliationSnapshot.md +27 -0
  177. package/docs/TotpEnrollRequest.md +15 -0
  178. package/docs/TotpEnrollResult.md +16 -0
  179. package/docs/UpdateAppsRequest.md +14 -0
  180. package/docs/UpdateSecretsRequest.md +14 -0
  181. package/docs/UsageDailySeries.md +16 -0
  182. package/docs/UsageDayPoint.md +15 -0
  183. package/docs/UsageEvent.md +18 -0
  184. package/docs/UsageEventsRequest.md +15 -0
  185. package/docs/UsageMeterDailySeries.md +17 -0
  186. package/docs/UsageMeterSummary.md +31 -0
  187. package/docs/UsageRollup.md +16 -0
  188. package/docs/UsageRollupTotals.md +18 -0
  189. package/docs/UsageSummary.md +23 -0
  190. package/docs/VerifyApiTokenRequest.md +14 -0
  191. package/docs/WorkReposSelection.md +14 -0
  192. package/docs/WorkspaceRepoSelection.md +14 -0
  193. package/package.json +20 -0
  194. package/src/apis/PlatformClient.ts +7514 -0
  195. package/src/apis/index.ts +3 -0
  196. package/src/index.ts +5 -0
  197. package/src/models/index.ts +6789 -0
  198. package/src/runtime.ts +442 -0
  199. package/tsconfig.esm.json +7 -0
  200. package/tsconfig.json +16 -0
@@ -0,0 +1,336 @@
1
+ /**
2
+ * @export
3
+ */
4
+ export const BusinessStatusEnum = {
5
+ PendingReview: 'PendingReview',
6
+ Approved: 'Approved',
7
+ Provisioning: 'Provisioning',
8
+ Active: 'Active',
9
+ Failed: 'Failed',
10
+ Suspended: 'Suspended'
11
+ };
12
+ /**
13
+ * @export
14
+ */
15
+ export const CommissionTierReferenceSanityTypeEnum = {
16
+ Reference: 'reference'
17
+ };
18
+ /**
19
+ * @export
20
+ */
21
+ export const ComponentBlocksInnerOneOfChildrenInnerSanityTypeEnum = {
22
+ Span: 'span'
23
+ };
24
+ /**
25
+ * @export
26
+ */
27
+ export const ComponentBlocksInnerOneOfMarkDefsInnerSanityTypeEnum = {
28
+ Link: 'link'
29
+ };
30
+ /**
31
+ * @export
32
+ */
33
+ export const EmployeeReferenceSanityTypeEnum = {
34
+ Reference: 'reference'
35
+ };
36
+ /**
37
+ * @export
38
+ */
39
+ export const IntegrationCheckResultStatusEnum = {
40
+ NotConfigured: 'not_configured',
41
+ Configured: 'configured',
42
+ Ok: 'ok',
43
+ Fail: 'fail'
44
+ };
45
+ /**
46
+ * @export
47
+ */
48
+ export const IntegrationSummaryAuthMethodEnum = {
49
+ ApiKey: 'api-key',
50
+ Oauth: 'oauth'
51
+ };
52
+ /**
53
+ * @export
54
+ */
55
+ export const OnboardBusinessRequestStatusEnum = {
56
+ PendingReview: 'PendingReview',
57
+ Approved: 'Approved',
58
+ Provisioning: 'Provisioning',
59
+ Active: 'Active',
60
+ Failed: 'Failed',
61
+ Suspended: 'Suspended'
62
+ };
63
+ /**
64
+ * @export
65
+ */
66
+ export const PageEmployeeOrderInnerSanityTypeEnum = {
67
+ Reference: 'reference'
68
+ };
69
+ /**
70
+ * @export
71
+ */
72
+ export const PageEquipmentInnerSanityTypeEnum = {
73
+ Reference: 'reference'
74
+ };
75
+ /**
76
+ * @export
77
+ */
78
+ export const PatchBusinessRequestStatusEnum = {
79
+ PendingReview: 'PendingReview',
80
+ Approved: 'Approved',
81
+ Provisioning: 'Provisioning',
82
+ Active: 'Active',
83
+ Failed: 'Failed',
84
+ Suspended: 'Suspended'
85
+ };
86
+ /**
87
+ * @export
88
+ */
89
+ export const PatchEmployeeGenderEnum = {
90
+ Male: 'male',
91
+ Female: 'female',
92
+ TheseAreNotTheGendersYouAreLookingFor: 'These are not the genders you are looking for'
93
+ };
94
+ /**
95
+ * @export
96
+ */
97
+ export const PatchEmployeeMaritalStatusEnum = {
98
+ Single: 'single',
99
+ Married: 'married',
100
+ Cohabitant: 'cohabitant'
101
+ };
102
+ /**
103
+ * @export
104
+ */
105
+ export const PatchEmployeeParentalLeaveCoverageEnum = {
106
+ _80: '80',
107
+ _100: '100'
108
+ };
109
+ /**
110
+ * @export
111
+ */
112
+ export const PatchEmployeeSanityTypeEnum = {
113
+ Employee: 'employee'
114
+ };
115
+ /**
116
+ * @export
117
+ */
118
+ export const PickSanityPatchEmployeeExcludeKeyofSanityPatchEmployeeScopeGrantsSalaryConfigModelEnum = {
119
+ SnokamCeo: 'snokam.ceo',
120
+ SnokamEmployee: 'snokam.employee'
121
+ };
122
+ /**
123
+ * @export
124
+ */
125
+ export const PickSanityPatchEmployeeExcludeKeyofSanityPatchEmployeeScopeGrantsSettingsColorSchemeEnum = {
126
+ Dark: 'dark',
127
+ Light: 'light',
128
+ System: 'system'
129
+ };
130
+ /**
131
+ * @export
132
+ */
133
+ export const PlatformIntegrationKindEnum = {
134
+ ApiKey: 'api-key',
135
+ Oauth: 'oauth',
136
+ Platform: 'platform'
137
+ };
138
+ /**
139
+ * @export
140
+ */
141
+ export const ProtectedEmployeeGenderEnum = {
142
+ Female: 'female',
143
+ Male: 'male',
144
+ TheseAreNotTheGendersYouAreLookingFor: 'These are not the genders you are looking for'
145
+ };
146
+ /**
147
+ * @export
148
+ */
149
+ export const ProtectedEmployeeMaritalStatusEnum = {
150
+ Cohabitant: 'cohabitant',
151
+ Married: 'married',
152
+ Single: 'single'
153
+ };
154
+ /**
155
+ * @export
156
+ */
157
+ export const ProtectedEmployeeParentalLeaveCoverageEnum = {
158
+ _80: '80',
159
+ _100: '100'
160
+ };
161
+ /**
162
+ * @export
163
+ */
164
+ export const ProtectedEmployeeSanityTypeEnum = {
165
+ Employee: 'employee'
166
+ };
167
+ /**
168
+ * @export
169
+ */
170
+ export const SanityCreateEmployeeCliftonStrengthsInnerSanityTypeEnum = {
171
+ Reference: 'reference'
172
+ };
173
+ /**
174
+ * @export
175
+ */
176
+ export const SanityCreateEmployeeGroupsInnerSanityTypeEnum = {
177
+ Reference: 'reference'
178
+ };
179
+ /**
180
+ * @export
181
+ */
182
+ export const SanityCreateEmployeeTagsInnerSanityTypeEnum = {
183
+ Reference: 'reference'
184
+ };
185
+ /**
186
+ * @export
187
+ */
188
+ export const SanityCreateEmployeeTechnologiesInnerSanityTypeEnum = {
189
+ Reference: 'reference'
190
+ };
191
+ /**
192
+ * @export
193
+ */
194
+ export const SanityEmployeeCliftonStrengthsInnerDomainEnum = {
195
+ Executing: 'executing',
196
+ Influencing: 'influencing',
197
+ RelationshipBuilding: 'relationship_building',
198
+ StrategicThinking: 'strategic_thinking'
199
+ };
200
+ /**
201
+ * @export
202
+ */
203
+ export const SanityEmployeeCliftonStrengthsInnerSanityTypeEnum = {
204
+ CliftonStrength: 'cliftonStrength'
205
+ };
206
+ /**
207
+ * @export
208
+ */
209
+ export const SanityEmployeeCommissionTierSanityTypeEnum = {
210
+ CommissionTier: 'commissionTier'
211
+ };
212
+ /**
213
+ * @export
214
+ */
215
+ export const SanityEmployeeEquipmentInnerSanityTypeEnum = {
216
+ Equipment: 'equipment'
217
+ };
218
+ /**
219
+ * @export
220
+ */
221
+ export const SanityEmployeeGroupsInnerSanityTypeEnum = {
222
+ Group: 'group'
223
+ };
224
+ /**
225
+ * @export
226
+ */
227
+ export const SanityEmployeeManagerSanityTypeEnum = {
228
+ Employee: 'employee'
229
+ };
230
+ /**
231
+ * @export
232
+ */
233
+ export const SanityEmployeeNextOfKinInnerSanityTypeEnum = {
234
+ Nextofkin: 'nextofkin'
235
+ };
236
+ /**
237
+ * @export
238
+ */
239
+ export const SanityEmployeeSalaryConfigModelEnum = {
240
+ SnokamCeo: 'snokam.ceo',
241
+ SnokamEmployee: 'snokam.employee'
242
+ };
243
+ /**
244
+ * @export
245
+ */
246
+ export const SanityEmployeeSettingsColorSchemeEnum = {
247
+ Dark: 'dark',
248
+ Light: 'light',
249
+ System: 'system'
250
+ };
251
+ /**
252
+ * @export
253
+ */
254
+ export const SanityImageAssetReferenceSanityTypeEnum = {
255
+ Reference: 'reference'
256
+ };
257
+ /**
258
+ * @export
259
+ */
260
+ export const SanityImageCropSanityTypeEnum = {
261
+ SanityImageCrop: 'sanity.imageCrop'
262
+ };
263
+ /**
264
+ * @export
265
+ */
266
+ export const SanityImageHotspotSanityTypeEnum = {
267
+ SanityImageHotspot: 'sanity.imageHotspot'
268
+ };
269
+ /**
270
+ * @export
271
+ */
272
+ export const SanityPatchPageMetaImageSanityTypeEnum = {
273
+ Image: 'image'
274
+ };
275
+ /**
276
+ * @export
277
+ */
278
+ export const SanitySystemsInnerDescriptionInnerListItemEnum = {
279
+ Bullet: 'bullet',
280
+ Number: 'number'
281
+ };
282
+ /**
283
+ * @export
284
+ */
285
+ export const SanitySystemsInnerDescriptionInnerSanityTypeEnum = {
286
+ Block: 'block'
287
+ };
288
+ /**
289
+ * @export
290
+ */
291
+ export const SanitySystemsInnerDescriptionInnerStyleEnum = {
292
+ Blockquote: 'blockquote',
293
+ H1: 'h1',
294
+ H2: 'h2',
295
+ H3: 'h3',
296
+ H4: 'h4',
297
+ H5: 'h5',
298
+ H6: 'h6',
299
+ Normal: 'normal'
300
+ };
301
+ /**
302
+ * @export
303
+ */
304
+ export const SanityTechnologyWithRelationsArticlesInnerMediaOneOfSanityTypeEnum = {
305
+ Image: 'image'
306
+ };
307
+ /**
308
+ * @export
309
+ */
310
+ export const SanityTechnologyWithRelationsEmployeesInnerTagsInnerSanityTypeEnum = {
311
+ Tag: 'tag'
312
+ };
313
+ /**
314
+ * @export
315
+ */
316
+ export const SanityTechnologyWithRelationsProjectsInnerTechnologiesInnerSanityTypeEnum = {
317
+ Technology: 'technology'
318
+ };
319
+ /**
320
+ * @export
321
+ */
322
+ export const SanityTvCategoryDashboardsInnerBackgroundImageSanityTypeEnum = {
323
+ Image: 'image'
324
+ };
325
+ /**
326
+ * @export
327
+ */
328
+ export const SanityTvCategoryDashboardsInnerBackgroundImageAssetSanityTypeEnum = {
329
+ SanityImageAsset: 'sanity.imageAsset'
330
+ };
331
+ /**
332
+ * @export
333
+ */
334
+ export const SlugSanityTypeEnum = {
335
+ Slug: 'slug'
336
+ };
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Platform API
3
+ * Self-service business platform management API
4
+ *
5
+ * The version of the OpenAPI document: v1.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 canConsumeForm(consumes: Consume[]): boolean;
128
+ export interface Consume {
129
+ contentType: string;
130
+ }
131
+ export interface RequestContext {
132
+ fetch: FetchAPI;
133
+ url: string;
134
+ init: RequestInit;
135
+ }
136
+ export interface ResponseContext {
137
+ fetch: FetchAPI;
138
+ url: string;
139
+ init: RequestInit;
140
+ response: Response;
141
+ }
142
+ export interface ErrorContext {
143
+ fetch: FetchAPI;
144
+ url: string;
145
+ init: RequestInit;
146
+ error: unknown;
147
+ response?: Response;
148
+ }
149
+ export interface Middleware {
150
+ pre?(context: RequestContext): Promise<FetchParams | void>;
151
+ post?(context: ResponseContext): Promise<Response | void>;
152
+ onError?(context: ErrorContext): Promise<Response | void>;
153
+ }
154
+ export interface ApiResponse<T> {
155
+ raw: Response;
156
+ value(): Promise<T>;
157
+ }
158
+ export interface ResponseTransformer<T> {
159
+ (json: any): T;
160
+ }
161
+ export declare class JSONApiResponse<T> {
162
+ raw: Response;
163
+ private transformer;
164
+ constructor(raw: Response, transformer?: ResponseTransformer<T>);
165
+ value(): Promise<T>;
166
+ }
167
+ export declare class VoidApiResponse {
168
+ raw: Response;
169
+ constructor(raw: Response);
170
+ value(): Promise<void>;
171
+ }
172
+ export declare class BlobApiResponse {
173
+ raw: Response;
174
+ constructor(raw: Response);
175
+ value(): Promise<Blob>;
176
+ }
177
+ export declare class TextApiResponse {
178
+ raw: Response;
179
+ constructor(raw: Response);
180
+ value(): Promise<string>;
181
+ }