@wix/media 1.0.103 → 1.0.104
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/package.json +6 -6
- package/type-bundles/context.bundle.d.ts +85 -2808
- package/type-bundles/index.bundle.d.ts +55 -171
|
@@ -347,37 +347,38 @@ interface EnterpriseOnboardingOptions {
|
|
|
347
347
|
accountName?: string;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
interface HttpClient
|
|
351
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
352
|
-
fetchWithAuth:
|
|
350
|
+
interface HttpClient {
|
|
351
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
352
|
+
fetchWithAuth: typeof fetch;
|
|
353
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
353
354
|
}
|
|
354
|
-
type RequestOptionsFactory
|
|
355
|
-
type HttpResponse
|
|
355
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
356
|
+
type HttpResponse<T = any> = {
|
|
356
357
|
data: T;
|
|
357
358
|
status: number;
|
|
358
359
|
statusText: string;
|
|
359
360
|
headers: any;
|
|
360
361
|
request?: any;
|
|
361
362
|
};
|
|
362
|
-
type RequestOptions
|
|
363
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
363
364
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
364
365
|
url: string;
|
|
365
366
|
data?: Data;
|
|
366
367
|
params?: URLSearchParams;
|
|
367
|
-
} & APIMetadata
|
|
368
|
-
type APIMetadata
|
|
368
|
+
} & APIMetadata;
|
|
369
|
+
type APIMetadata = {
|
|
369
370
|
methodFqn?: string;
|
|
370
371
|
entityFqdn?: string;
|
|
371
372
|
packageName?: string;
|
|
372
373
|
};
|
|
373
|
-
type EventDefinition
|
|
374
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
374
375
|
__type: 'event-definition';
|
|
375
376
|
type: Type;
|
|
376
377
|
isDomainEvent?: boolean;
|
|
377
378
|
transformations?: (envelope: unknown) => Payload;
|
|
378
379
|
__payload: Payload;
|
|
379
380
|
};
|
|
380
|
-
declare function EventDefinition
|
|
381
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
381
382
|
|
|
382
383
|
declare global {
|
|
383
384
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -389,27 +390,27 @@ declare global {
|
|
|
389
390
|
declare const __metadata$3: {
|
|
390
391
|
PACKAGE_NAME: string;
|
|
391
392
|
};
|
|
392
|
-
declare function createCategory(httpClient: HttpClient
|
|
393
|
+
declare function createCategory(httpClient: HttpClient): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
393
394
|
_id: string;
|
|
394
395
|
publishStatus: PublishStatus$1;
|
|
395
396
|
}>;
|
|
396
|
-
declare function deleteCategory(httpClient: HttpClient
|
|
397
|
-
declare function updateCategory(httpClient: HttpClient
|
|
397
|
+
declare function deleteCategory(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
398
|
+
declare function updateCategory(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
398
399
|
_id: string;
|
|
399
400
|
publishStatus: PublishStatus$1;
|
|
400
401
|
}>;
|
|
401
|
-
declare function getCategory(httpClient: HttpClient
|
|
402
|
+
declare function getCategory(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
402
403
|
category?: {
|
|
403
404
|
_id: string;
|
|
404
405
|
publishStatus: PublishStatus$1;
|
|
405
406
|
} | undefined;
|
|
406
407
|
subCategories: (any | undefined)[];
|
|
407
408
|
}>;
|
|
408
|
-
declare function enterpriseOnboarding(httpClient: HttpClient
|
|
409
|
-
declare function getMediaManagerCategories(httpClient: HttpClient
|
|
410
|
-
declare const onEnterpriseCategoryCreated: EventDefinition
|
|
411
|
-
declare const onEnterpriseCategoryDeleted: EventDefinition
|
|
412
|
-
declare const onEnterpriseCategoryUpdated: EventDefinition
|
|
409
|
+
declare function enterpriseOnboarding(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
410
|
+
declare function getMediaManagerCategories(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
411
|
+
declare const onEnterpriseCategoryCreated: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
412
|
+
declare const onEnterpriseCategoryDeleted: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
413
|
+
declare const onEnterpriseCategoryUpdated: EventDefinition<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
|
|
413
414
|
|
|
414
415
|
type index_d$3_CreateCategoryRequest = CreateCategoryRequest;
|
|
415
416
|
type index_d$3_CreateCategoryResponse = CreateCategoryResponse;
|
|
@@ -1369,54 +1370,15 @@ interface OverwriteItemCategoriesOptions {
|
|
|
1369
1370
|
categoryIds?: string[];
|
|
1370
1371
|
}
|
|
1371
1372
|
|
|
1372
|
-
interface HttpClient$2 {
|
|
1373
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
1374
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1375
|
-
}
|
|
1376
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
1377
|
-
type HttpResponse$2<T = any> = {
|
|
1378
|
-
data: T;
|
|
1379
|
-
status: number;
|
|
1380
|
-
statusText: string;
|
|
1381
|
-
headers: any;
|
|
1382
|
-
request?: any;
|
|
1383
|
-
};
|
|
1384
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
1385
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1386
|
-
url: string;
|
|
1387
|
-
data?: Data;
|
|
1388
|
-
params?: URLSearchParams;
|
|
1389
|
-
} & APIMetadata$2;
|
|
1390
|
-
type APIMetadata$2 = {
|
|
1391
|
-
methodFqn?: string;
|
|
1392
|
-
entityFqdn?: string;
|
|
1393
|
-
packageName?: string;
|
|
1394
|
-
};
|
|
1395
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
1396
|
-
__type: 'event-definition';
|
|
1397
|
-
type: Type;
|
|
1398
|
-
isDomainEvent?: boolean;
|
|
1399
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1400
|
-
__payload: Payload;
|
|
1401
|
-
};
|
|
1402
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
1403
|
-
|
|
1404
|
-
declare global {
|
|
1405
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1406
|
-
interface SymbolConstructor {
|
|
1407
|
-
readonly observable: symbol;
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
1373
|
declare const __metadata$2: {
|
|
1412
1374
|
PACKAGE_NAME: string;
|
|
1413
1375
|
};
|
|
1414
|
-
declare function itemUploadCallback(httpClient: HttpClient
|
|
1415
|
-
declare function generateFileUploadUrl$1(httpClient: HttpClient
|
|
1416
|
-
declare function importFile$1(httpClient: HttpClient
|
|
1417
|
-
declare function searchItems(httpClient: HttpClient
|
|
1418
|
-
declare function queryItems(httpClient: HttpClient
|
|
1419
|
-
declare function updateItem(httpClient: HttpClient
|
|
1376
|
+
declare function itemUploadCallback(httpClient: HttpClient): (options?: ItemUploadCallbackOptions) => Promise<void>;
|
|
1377
|
+
declare function generateFileUploadUrl$1(httpClient: HttpClient): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
|
|
1378
|
+
declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
|
|
1379
|
+
declare function searchItems(httpClient: HttpClient): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
|
|
1380
|
+
declare function queryItems(httpClient: HttpClient): () => ItemsQueryBuilder;
|
|
1381
|
+
declare function updateItem(httpClient: HttpClient): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & {
|
|
1420
1382
|
_id: string;
|
|
1421
1383
|
mediaType: MediaType$1;
|
|
1422
1384
|
assets?: {
|
|
@@ -1437,8 +1399,8 @@ declare function updateItem(httpClient: HttpClient$2): (_id: string, item: Updat
|
|
|
1437
1399
|
} | undefined;
|
|
1438
1400
|
publishStatus: PublishStatus;
|
|
1439
1401
|
}>;
|
|
1440
|
-
declare function bulkUpdateItem(httpClient: HttpClient
|
|
1441
|
-
declare function getItem(httpClient: HttpClient
|
|
1402
|
+
declare function bulkUpdateItem(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1403
|
+
declare function getItem(httpClient: HttpClient): (itemId: string) => Promise<EnterpriseMediaItem & {
|
|
1442
1404
|
_id: string;
|
|
1443
1405
|
mediaType: MediaType$1;
|
|
1444
1406
|
assets?: {
|
|
@@ -1459,13 +1421,13 @@ declare function getItem(httpClient: HttpClient$2): (itemId: string) => Promise<
|
|
|
1459
1421
|
} | undefined;
|
|
1460
1422
|
publishStatus: PublishStatus;
|
|
1461
1423
|
}>;
|
|
1462
|
-
declare function linkItemToCategories(httpClient: HttpClient
|
|
1463
|
-
declare function unlinkItemFromCategories(httpClient: HttpClient
|
|
1464
|
-
declare function overwriteItemCategories(httpClient: HttpClient
|
|
1465
|
-
declare const onEnterpriseItemCreated: EventDefinition
|
|
1466
|
-
declare const onEnterpriseItemUpdated: EventDefinition
|
|
1467
|
-
declare const onEnterpriseItemItemCategoriesChanged: EventDefinition
|
|
1468
|
-
declare const onEnterpriseItemPublishStatusChanged: EventDefinition
|
|
1424
|
+
declare function linkItemToCategories(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
1425
|
+
declare function unlinkItemFromCategories(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
1426
|
+
declare function overwriteItemCategories(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
1427
|
+
declare const onEnterpriseItemCreated: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
1428
|
+
declare const onEnterpriseItemUpdated: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
1429
|
+
declare const onEnterpriseItemItemCategoriesChanged: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
1430
|
+
declare const onEnterpriseItemPublishStatusChanged: EventDefinition<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
|
|
1469
1431
|
|
|
1470
1432
|
type index_d$2_BulkItemUpdateResult = BulkItemUpdateResult;
|
|
1471
1433
|
type index_d$2_BulkUpdateItemOptions = BulkUpdateItemOptions;
|
|
@@ -3365,51 +3327,12 @@ interface ListDeletedFilesOptions {
|
|
|
3365
3327
|
paging?: CursorPaging$1;
|
|
3366
3328
|
}
|
|
3367
3329
|
|
|
3368
|
-
interface HttpClient$1 {
|
|
3369
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3370
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3371
|
-
}
|
|
3372
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3373
|
-
type HttpResponse$1<T = any> = {
|
|
3374
|
-
data: T;
|
|
3375
|
-
status: number;
|
|
3376
|
-
statusText: string;
|
|
3377
|
-
headers: any;
|
|
3378
|
-
request?: any;
|
|
3379
|
-
};
|
|
3380
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3381
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3382
|
-
url: string;
|
|
3383
|
-
data?: Data;
|
|
3384
|
-
params?: URLSearchParams;
|
|
3385
|
-
} & APIMetadata$1;
|
|
3386
|
-
type APIMetadata$1 = {
|
|
3387
|
-
methodFqn?: string;
|
|
3388
|
-
entityFqdn?: string;
|
|
3389
|
-
packageName?: string;
|
|
3390
|
-
};
|
|
3391
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3392
|
-
__type: 'event-definition';
|
|
3393
|
-
type: Type;
|
|
3394
|
-
isDomainEvent?: boolean;
|
|
3395
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3396
|
-
__payload: Payload;
|
|
3397
|
-
};
|
|
3398
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3399
|
-
|
|
3400
|
-
declare global {
|
|
3401
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3402
|
-
interface SymbolConstructor {
|
|
3403
|
-
readonly observable: symbol;
|
|
3404
|
-
}
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
3330
|
declare const __metadata$1: {
|
|
3408
3331
|
PACKAGE_NAME: string;
|
|
3409
3332
|
};
|
|
3410
|
-
declare function generateFilesDownloadUrl(httpClient: HttpClient
|
|
3411
|
-
declare function generateFileDownloadUrl(httpClient: HttpClient
|
|
3412
|
-
declare function getFileDescriptor(httpClient: HttpClient
|
|
3333
|
+
declare function generateFilesDownloadUrl(httpClient: HttpClient): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
3334
|
+
declare function generateFileDownloadUrl(httpClient: HttpClient): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
3335
|
+
declare function getFileDescriptor(httpClient: HttpClient): (fileId: string) => Promise<FileDescriptor & {
|
|
3413
3336
|
_id: string;
|
|
3414
3337
|
displayName: string;
|
|
3415
3338
|
url: string;
|
|
@@ -3466,8 +3389,8 @@ declare function getFileDescriptor(httpClient: HttpClient$1): (fileId: string) =
|
|
|
3466
3389
|
siteId: string;
|
|
3467
3390
|
state: State$1;
|
|
3468
3391
|
}>;
|
|
3469
|
-
declare function getFileDescriptors(httpClient: HttpClient
|
|
3470
|
-
declare function updateFileDescriptor(httpClient: HttpClient
|
|
3392
|
+
declare function getFileDescriptors(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
3393
|
+
declare function updateFileDescriptor(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
3471
3394
|
_id: string;
|
|
3472
3395
|
displayName: string;
|
|
3473
3396
|
url: string;
|
|
@@ -3524,21 +3447,21 @@ declare function updateFileDescriptor(httpClient: HttpClient$1): (file: FileDesc
|
|
|
3524
3447
|
siteId: string;
|
|
3525
3448
|
state: State$1;
|
|
3526
3449
|
}>;
|
|
3527
|
-
declare function generateFileUploadUrl(httpClient: HttpClient
|
|
3528
|
-
declare function generateFileResumableUploadUrl(httpClient: HttpClient
|
|
3529
|
-
declare function importFile(httpClient: HttpClient
|
|
3530
|
-
declare function bulkImportFiles(httpClient: HttpClient
|
|
3531
|
-
declare function bulkImportFile(httpClient: HttpClient
|
|
3532
|
-
declare function listFiles(httpClient: HttpClient
|
|
3533
|
-
declare function searchFiles(httpClient: HttpClient
|
|
3534
|
-
declare function generateVideoStreamingUrl(httpClient: HttpClient
|
|
3535
|
-
declare function bulkDeleteFiles(httpClient: HttpClient
|
|
3536
|
-
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient
|
|
3537
|
-
declare function listDeletedFiles(httpClient: HttpClient
|
|
3538
|
-
declare const onFileDescriptorUpdated: EventDefinition
|
|
3539
|
-
declare const onFileDescriptorDeleted: EventDefinition
|
|
3540
|
-
declare const onFileDescriptorFileReady: EventDefinition
|
|
3541
|
-
declare const onFileDescriptorFileFailed: EventDefinition
|
|
3450
|
+
declare function generateFileUploadUrl(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
3451
|
+
declare function generateFileResumableUploadUrl(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
3452
|
+
declare function importFile(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
3453
|
+
declare function bulkImportFiles(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
3454
|
+
declare function bulkImportFile(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
3455
|
+
declare function listFiles(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
3456
|
+
declare function searchFiles(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
3457
|
+
declare function generateVideoStreamingUrl(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
3458
|
+
declare function bulkDeleteFiles(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
3459
|
+
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
|
|
3460
|
+
declare function listDeletedFiles(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
3461
|
+
declare const onFileDescriptorUpdated: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
3462
|
+
declare const onFileDescriptorDeleted: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
3463
|
+
declare const onFileDescriptorFileReady: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
3464
|
+
declare const onFileDescriptorFileFailed: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
3542
3465
|
|
|
3543
3466
|
type index_d$1_ApplicationError = ApplicationError;
|
|
3544
3467
|
type index_d$1_Archive = Archive;
|
|
@@ -4180,45 +4103,6 @@ interface ListDeletedFoldersOptions {
|
|
|
4180
4103
|
paging?: CursorPaging;
|
|
4181
4104
|
}
|
|
4182
4105
|
|
|
4183
|
-
interface HttpClient {
|
|
4184
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4185
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4186
|
-
}
|
|
4187
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4188
|
-
type HttpResponse<T = any> = {
|
|
4189
|
-
data: T;
|
|
4190
|
-
status: number;
|
|
4191
|
-
statusText: string;
|
|
4192
|
-
headers: any;
|
|
4193
|
-
request?: any;
|
|
4194
|
-
};
|
|
4195
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4196
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4197
|
-
url: string;
|
|
4198
|
-
data?: Data;
|
|
4199
|
-
params?: URLSearchParams;
|
|
4200
|
-
} & APIMetadata;
|
|
4201
|
-
type APIMetadata = {
|
|
4202
|
-
methodFqn?: string;
|
|
4203
|
-
entityFqdn?: string;
|
|
4204
|
-
packageName?: string;
|
|
4205
|
-
};
|
|
4206
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4207
|
-
__type: 'event-definition';
|
|
4208
|
-
type: Type;
|
|
4209
|
-
isDomainEvent?: boolean;
|
|
4210
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4211
|
-
__payload: Payload;
|
|
4212
|
-
};
|
|
4213
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4214
|
-
|
|
4215
|
-
declare global {
|
|
4216
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4217
|
-
interface SymbolConstructor {
|
|
4218
|
-
readonly observable: symbol;
|
|
4219
|
-
}
|
|
4220
|
-
}
|
|
4221
|
-
|
|
4222
4106
|
declare const __metadata: {
|
|
4223
4107
|
PACKAGE_NAME: string;
|
|
4224
4108
|
};
|