@deliverart/sdk-js-integration 0.0.5 → 1.2.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.
- package/dist/index.cjs +12484 -1553
- package/dist/index.d.cts +8214 -25471
- package/dist/index.d.ts +8214 -25471
- package/dist/index.js +12344 -1407
- package/package.json +12 -27
- package/.changeset/config.json +0 -11
- package/.github/workflows/workflow.yml +0 -47
- package/.prettierrc +0 -7
- package/CHANGELOG.md +0 -25
- package/README.md +0 -3
- package/eslint.config.js +0 -37
- package/src/activatable-integration-data-schemas.ts +0 -50
- package/src/activatable-integration-types.ts +0 -17
- package/src/activatable-integration.ts +0 -86
- package/src/activation-request.ts +0 -53
- package/src/cancellation-request-types.ts +0 -42
- package/src/cancellation-request.ts +0 -21
- package/src/index.ts +0 -9
- package/src/integration-schemas.ts +0 -31
- package/src/requests/DeleteIntegration.ts +0 -27
- package/src/requests/GetIntegrationDetails.ts +0 -30
- package/src/requests/GetIntegrations.ts +0 -63
- package/src/requests/UpdateIntegration.ts +0 -36
- package/src/requests/activation-requests/ActivateIntegrationActivationRequest.ts +0 -38
- package/src/requests/activation-requests/AnnotateIntegrationActivationRequest.ts +0 -46
- package/src/requests/activation-requests/CreateIntegrationActivationRequest.ts +0 -80
- package/src/requests/activation-requests/DeleteIntegrationActivationRequest.ts +0 -27
- package/src/requests/activation-requests/GetIntegrationActivationRequestDetails.ts +0 -37
- package/src/requests/activation-requests/GetIntegrationActivationRequests.ts +0 -86
- package/src/requests/activation-requests/RespondIntegrationActivationRequest.ts +0 -58
- package/src/requests/activation-requests/SendIntegrationActivationRequestToPartner.ts +0 -38
- package/src/requests/activation-requests/UpdateIntegrationActivationRequest.ts +0 -91
- package/src/requests/activation-requests/index.ts +0 -9
- package/src/requests/cancellation-requests/CancelIntegrationCancellationRequest.ts +0 -38
- package/src/requests/cancellation-requests/CreateIntegrationCancellationRequest.ts +0 -41
- package/src/requests/cancellation-requests/DeleteIntegrationCancellationRequest.ts +0 -27
- package/src/requests/cancellation-requests/GetIntegrationCancellationRequestDetails.ts +0 -37
- package/src/requests/cancellation-requests/GetIntegrationCancellationRequests.ts +0 -72
- package/src/requests/cancellation-requests/index.ts +0 -5
- package/src/requests/index.ts +0 -7
- package/src/requests/services/cassa_in_cloud/CreateIntegrationCassaInCloud.ts +0 -42
- package/src/requests/services/cassa_in_cloud/DeleteIntegrationCassaInCloud.ts +0 -27
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudClientLogRequestDetails.ts +0 -40
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudClientLogRequests.ts +0 -64
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudDetails.ts +0 -36
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudList.ts +0 -61
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudSyncMenuProcessDetails.ts +0 -40
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudSyncMenuProcesses.ts +0 -69
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudWebHookEventDetails.ts +0 -40
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudWebHookEvents.ts +0 -69
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncCustomers.ts +0 -27
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncOrganizations.ts +0 -27
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncProducts.ts +0 -27
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncSalesModes.ts +0 -27
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncStock.ts +0 -27
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncTimetables.ts +0 -27
- package/src/requests/services/cassa_in_cloud/UpdateIntegrationCassaInCloud.ts +0 -39
- package/src/requests/services/cassa_in_cloud/index.ts +0 -17
- package/src/requests/services/deliveroo/CreateIntegrationDeliveroo.ts +0 -40
- package/src/requests/services/deliveroo/DeleteIntegrationDeliveroo.ts +0 -27
- package/src/requests/services/deliveroo/GetIntegrationDeliverooClientLogRequestDetails.ts +0 -40
- package/src/requests/services/deliveroo/GetIntegrationDeliverooClientLogRequests.ts +0 -64
- package/src/requests/services/deliveroo/GetIntegrationDeliverooDetails.ts +0 -36
- package/src/requests/services/deliveroo/GetIntegrationDeliverooList.ts +0 -61
- package/src/requests/services/deliveroo/GetIntegrationDeliverooMenuVersionDetails.ts +0 -35
- package/src/requests/services/deliveroo/GetIntegrationDeliverooMenuVersions.ts +0 -62
- package/src/requests/services/deliveroo/GetIntegrationDeliverooSyncMenuProcessDetails.ts +0 -40
- package/src/requests/services/deliveroo/GetIntegrationDeliverooSyncMenuProcesses.ts +0 -69
- package/src/requests/services/deliveroo/GetIntegrationDeliverooWebhookEventDetails.ts +0 -40
- package/src/requests/services/deliveroo/GetIntegrationDeliverooWebhookEvents.ts +0 -69
- package/src/requests/services/deliveroo/IntegrationDeliverooSyncMenu.ts +0 -27
- package/src/requests/services/deliveroo/IntegrationDeliverooSyncOpeningHours.ts +0 -27
- package/src/requests/services/deliveroo/UpdateIntegrationDeliveroo.ts +0 -39
- package/src/requests/services/deliveroo/UpdateIntegrationDeliverooSiteStatus.ts +0 -43
- package/src/requests/services/deliveroo/index.ts +0 -16
- package/src/requests/services/glovo/CreateIntegrationGlovo.ts +0 -39
- package/src/requests/services/glovo/DeleteIntegrationGlovo.ts +0 -27
- package/src/requests/services/glovo/GetIntegrationGlovoClientLogRequestDetails.ts +0 -39
- package/src/requests/services/glovo/GetIntegrationGlovoClientLogRequests.ts +0 -64
- package/src/requests/services/glovo/GetIntegrationGlovoDetails.ts +0 -36
- package/src/requests/services/glovo/GetIntegrationGlovoList.ts +0 -55
- package/src/requests/services/glovo/GetIntegrationGlovoMenuUpdateDetails.ts +0 -39
- package/src/requests/services/glovo/GetIntegrationGlovoMenuUpdates.ts +0 -66
- package/src/requests/services/glovo/GetIntegrationGlovoMenuVersionDetails.ts +0 -35
- package/src/requests/services/glovo/GetIntegrationGlovoMenuVersions.ts +0 -62
- package/src/requests/services/glovo/GetIntegrationGlovoWebhookEventDetails.ts +0 -39
- package/src/requests/services/glovo/GetIntegrationGlovoWebhookEvents.ts +0 -68
- package/src/requests/services/glovo/IntegrationGlovoSyncMenu.ts +0 -27
- package/src/requests/services/glovo/UpdateIntegrationGlovo.ts +0 -39
- package/src/requests/services/glovo/UpdateIntegrationGlovoStoreStatus.ts +0 -43
- package/src/requests/services/glovo/index.ts +0 -15
- package/src/requests/services/index.ts +0 -4
- package/src/requests/services/justeat/CreateIntegrationJustEat.ts +0 -39
- package/src/requests/services/justeat/DeleteIntegrationJustEat.ts +0 -27
- package/src/requests/services/justeat/GetIntegrationJustEatClientLogRequestDetails.ts +0 -40
- package/src/requests/services/justeat/GetIntegrationJustEatClientLogRequests.ts +0 -64
- package/src/requests/services/justeat/GetIntegrationJustEatDetails.ts +0 -36
- package/src/requests/services/justeat/GetIntegrationJustEatList.ts +0 -60
- package/src/requests/services/justeat/GetIntegrationJustEatMenuVersionDetails.ts +0 -35
- package/src/requests/services/justeat/GetIntegrationJustEatMenuVersions.ts +0 -62
- package/src/requests/services/justeat/GetIntegrationJustEatSyncMenuProcessDetails.ts +0 -40
- package/src/requests/services/justeat/GetIntegrationJustEatSyncMenuProcesses.ts +0 -69
- package/src/requests/services/justeat/IntegrationJustEatSyncMenu.ts +0 -27
- package/src/requests/services/justeat/IntegrationJustEatSyncOpeningTimes.ts +0 -27
- package/src/requests/services/justeat/UpdateIntegrationJustEat.ts +0 -39
- package/src/requests/services/justeat/UpdateIntegrationJustEatRestaurantStatus.ts +0 -44
- package/src/requests/services/justeat/index.ts +0 -14
- package/src/schemas.ts +0 -104
- package/src/service-schemas/cassa_in_cloud.ts +0 -154
- package/src/service-schemas/deliveroo.ts +0 -159
- package/src/service-schemas/glovo.ts +0 -153
- package/src/service-schemas/justeat.ts +0 -121
- package/src/types.ts +0 -296
- package/tsconfig.json +0 -15
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IntegrationJustEatSyncMenuProcessDetails,
|
|
6
|
-
integrationJustEatSyncMenuProcessDetailsSchema,
|
|
7
|
-
} from '../../../service-schemas/justeat'
|
|
8
|
-
|
|
9
|
-
export const getIntegrationJustEatSyncMenuProcessDetailsInputSchema = z.undefined()
|
|
10
|
-
|
|
11
|
-
export const getIntegrationJustEatSyncMenuProcessDetailsResponseSchema =
|
|
12
|
-
integrationJustEatSyncMenuProcessDetailsSchema
|
|
13
|
-
export type GetIntegrationJustEatSyncMenuProcessDetailsResponse =
|
|
14
|
-
IntegrationJustEatSyncMenuProcessDetails
|
|
15
|
-
|
|
16
|
-
export class GetIntegrationJustEatSyncMenuProcessDetails extends AbstractApiRequest<
|
|
17
|
-
void,
|
|
18
|
-
GetIntegrationJustEatSyncMenuProcessDetailsResponse
|
|
19
|
-
> {
|
|
20
|
-
readonly method = 'GET'
|
|
21
|
-
readonly contentType = 'application/json'
|
|
22
|
-
readonly accept = 'application/json'
|
|
23
|
-
readonly inputSchema = getIntegrationJustEatSyncMenuProcessDetailsInputSchema
|
|
24
|
-
readonly outputSchema = getIntegrationJustEatSyncMenuProcessDetailsResponseSchema
|
|
25
|
-
readonly querySchema = undefined
|
|
26
|
-
readonly headersSchema = undefined
|
|
27
|
-
|
|
28
|
-
private readonly integrationJustEatId: string
|
|
29
|
-
private readonly processId: string
|
|
30
|
-
|
|
31
|
-
constructor(integrationJustEatId: string, processId: string) {
|
|
32
|
-
super()
|
|
33
|
-
this.integrationJustEatId = integrationJustEatId
|
|
34
|
-
this.processId = processId
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
getPath(): string {
|
|
38
|
-
return `/integrations/justeat/${this.integrationJustEatId}/sync_menu_processes/${this.processId}`
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
import {
|
|
3
|
-
createPaginatedSchema,
|
|
4
|
-
Paginated,
|
|
5
|
-
responseToPagination,
|
|
6
|
-
} from '@deliverart/sdk-js-global-types'
|
|
7
|
-
import { AxiosResponse } from 'axios'
|
|
8
|
-
import { z } from 'zod'
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
IntegrationJustEatSyncMenuProcess,
|
|
12
|
-
integrationJustEatSyncMenuProcessSchema,
|
|
13
|
-
} from '../../../service-schemas/justeat'
|
|
14
|
-
|
|
15
|
-
export const getIntegrationJustEatSyncMenuProcessesQuerySchema = z.object({
|
|
16
|
-
page: z.number().optional(),
|
|
17
|
-
})
|
|
18
|
-
export type GetIntegrationJustEatSyncMenuProcessesQueryParams = z.infer<
|
|
19
|
-
typeof getIntegrationJustEatSyncMenuProcessesQuerySchema
|
|
20
|
-
>
|
|
21
|
-
|
|
22
|
-
export const getIntegrationJustEatSyncMenuProcessesResponseSchema = createPaginatedSchema(
|
|
23
|
-
integrationJustEatSyncMenuProcessSchema,
|
|
24
|
-
)
|
|
25
|
-
export type GetIntegrationJustEatSyncMenuProcessesResponse = z.infer<
|
|
26
|
-
typeof getIntegrationJustEatSyncMenuProcessesResponseSchema
|
|
27
|
-
>
|
|
28
|
-
|
|
29
|
-
export const getIntegrationJustEatSyncMenuProcessesInputSchema = z.undefined()
|
|
30
|
-
|
|
31
|
-
export class GetIntegrationJustEatSyncMenuProcesses extends AbstractApiRequest<
|
|
32
|
-
void,
|
|
33
|
-
GetIntegrationJustEatSyncMenuProcessesResponse,
|
|
34
|
-
GetIntegrationJustEatSyncMenuProcessesQueryParams
|
|
35
|
-
> {
|
|
36
|
-
readonly method = 'GET'
|
|
37
|
-
readonly contentType = 'application/json'
|
|
38
|
-
readonly accept = 'application/json'
|
|
39
|
-
|
|
40
|
-
readonly inputSchema = getIntegrationJustEatSyncMenuProcessesInputSchema
|
|
41
|
-
readonly outputSchema = getIntegrationJustEatSyncMenuProcessesResponseSchema
|
|
42
|
-
readonly querySchema = getIntegrationJustEatSyncMenuProcessesQuerySchema
|
|
43
|
-
readonly headersSchema = undefined
|
|
44
|
-
|
|
45
|
-
private readonly integrationJustEatId: string
|
|
46
|
-
|
|
47
|
-
constructor(
|
|
48
|
-
integrationJustEatId: string,
|
|
49
|
-
options?: { query?: GetIntegrationJustEatSyncMenuProcessesQueryParams },
|
|
50
|
-
) {
|
|
51
|
-
super(undefined, options)
|
|
52
|
-
this.integrationJustEatId = integrationJustEatId
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
getPath(): string {
|
|
56
|
-
return `/integrations/justeat/${this.integrationJustEatId}/sync_menu_processes`
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
parseResponse(
|
|
60
|
-
data: unknown,
|
|
61
|
-
rawResponse: AxiosResponse,
|
|
62
|
-
): Paginated<IntegrationJustEatSyncMenuProcess> {
|
|
63
|
-
const integrations = z.array(integrationJustEatSyncMenuProcessSchema).parse(data)
|
|
64
|
-
return this.validateOutput({
|
|
65
|
-
data: integrations,
|
|
66
|
-
pagination: responseToPagination(rawResponse),
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
export const integrationJustEatSyncMenuInputSchema = z.undefined()
|
|
5
|
-
export const integrationJustEatSyncMenuResponseSchema = z.undefined()
|
|
6
|
-
|
|
7
|
-
export class IntegrationJustEatSyncMenu extends AbstractApiRequest<void, void> {
|
|
8
|
-
readonly method = 'POST'
|
|
9
|
-
readonly contentType = 'application/json'
|
|
10
|
-
readonly accept = 'application/json'
|
|
11
|
-
|
|
12
|
-
readonly inputSchema = integrationJustEatSyncMenuInputSchema
|
|
13
|
-
readonly outputSchema = integrationJustEatSyncMenuResponseSchema
|
|
14
|
-
readonly querySchema = undefined
|
|
15
|
-
readonly headersSchema = undefined
|
|
16
|
-
|
|
17
|
-
private readonly integrationJustEatId: string
|
|
18
|
-
|
|
19
|
-
constructor(integrationJustEatId: string) {
|
|
20
|
-
super()
|
|
21
|
-
this.integrationJustEatId = integrationJustEatId
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
getPath(): string {
|
|
25
|
-
return `/integrations/justeat/${this.integrationJustEatId}/sync/menu`
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
export const integrationJustEatSyncOpeningHoursInputSchema = z.undefined()
|
|
5
|
-
export const integrationJustEatSyncOpeningHoursResponseSchema = z.undefined()
|
|
6
|
-
|
|
7
|
-
export class IntegrationJustEatSyncOpeningTimes extends AbstractApiRequest<void, void> {
|
|
8
|
-
readonly method = 'POST'
|
|
9
|
-
readonly contentType = 'application/json'
|
|
10
|
-
readonly accept = 'application/json'
|
|
11
|
-
|
|
12
|
-
readonly inputSchema = integrationJustEatSyncOpeningHoursInputSchema
|
|
13
|
-
readonly outputSchema = integrationJustEatSyncOpeningHoursResponseSchema
|
|
14
|
-
readonly querySchema = undefined
|
|
15
|
-
readonly headersSchema = undefined
|
|
16
|
-
|
|
17
|
-
private readonly integrationJustEatId: string
|
|
18
|
-
|
|
19
|
-
constructor(integrationJustEatId: string) {
|
|
20
|
-
super()
|
|
21
|
-
this.integrationJustEatId = integrationJustEatId
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
getPath(): string {
|
|
25
|
-
return `/integrations/justeat/${this.integrationJustEatId}/sync/opening_times`
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
IntegrationJustEatDetails,
|
|
5
|
-
integrationJustEatDetailsSchema,
|
|
6
|
-
IntegrationJustEatEditableFields,
|
|
7
|
-
integrationJustEatEditableFieldsSchema,
|
|
8
|
-
} from '../../../service-schemas/justeat'
|
|
9
|
-
|
|
10
|
-
export const updateIntegrationJustEatInputSchema = integrationJustEatEditableFieldsSchema
|
|
11
|
-
export type UpdateIntegrationJustEatInput = IntegrationJustEatEditableFields
|
|
12
|
-
|
|
13
|
-
export const updateIntegrationJustEatResponseSchema = integrationJustEatDetailsSchema
|
|
14
|
-
export type UpdateIntegrationJustEatResponse = IntegrationJustEatDetails
|
|
15
|
-
|
|
16
|
-
export class UpdateIntegrationJustEat extends AbstractApiRequest<
|
|
17
|
-
UpdateIntegrationJustEatInput,
|
|
18
|
-
UpdateIntegrationJustEatResponse
|
|
19
|
-
> {
|
|
20
|
-
readonly method = 'PATCH'
|
|
21
|
-
readonly contentType = 'application/merge-patch+json'
|
|
22
|
-
readonly accept = 'application/json'
|
|
23
|
-
|
|
24
|
-
readonly inputSchema = updateIntegrationJustEatInputSchema
|
|
25
|
-
readonly outputSchema = updateIntegrationJustEatResponseSchema
|
|
26
|
-
readonly querySchema = undefined
|
|
27
|
-
readonly headersSchema = undefined
|
|
28
|
-
|
|
29
|
-
private readonly integrationJustEatId: string
|
|
30
|
-
|
|
31
|
-
constructor(integrationJustEatId: string, input: UpdateIntegrationJustEatInput) {
|
|
32
|
-
super(input)
|
|
33
|
-
this.integrationJustEatId = integrationJustEatId
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getPath(): string {
|
|
37
|
-
return `/integrations/justeat/${this.integrationJustEatId}`
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IntegrationJustEatDetails,
|
|
6
|
-
integrationJustEatDetailsSchema,
|
|
7
|
-
} from '../../../service-schemas/justeat'
|
|
8
|
-
import { integrationJustEatRestaurantStatusSchema } from '../../../types'
|
|
9
|
-
|
|
10
|
-
export const updateIntegrationJustEatRestaurantStatusInputSchema = z.object({
|
|
11
|
-
status: integrationJustEatRestaurantStatusSchema,
|
|
12
|
-
})
|
|
13
|
-
export type UpdateIntegrationJustEatRestaurantStatusInput = z.infer<
|
|
14
|
-
typeof updateIntegrationJustEatRestaurantStatusInputSchema
|
|
15
|
-
>
|
|
16
|
-
|
|
17
|
-
export const updateIntegrationJustEatRestaurantStatusResponseSchema =
|
|
18
|
-
integrationJustEatDetailsSchema
|
|
19
|
-
export type UpdateIntegrationJustEatRestaurantStatusResponse = IntegrationJustEatDetails
|
|
20
|
-
|
|
21
|
-
export class UpdateIntegrationJustEatRestaurantStatus extends AbstractApiRequest<
|
|
22
|
-
UpdateIntegrationJustEatRestaurantStatusInput,
|
|
23
|
-
UpdateIntegrationJustEatRestaurantStatusResponse
|
|
24
|
-
> {
|
|
25
|
-
readonly method = 'POST'
|
|
26
|
-
readonly contentType = 'application/json'
|
|
27
|
-
readonly accept = 'application/json'
|
|
28
|
-
|
|
29
|
-
readonly inputSchema = updateIntegrationJustEatRestaurantStatusInputSchema
|
|
30
|
-
readonly outputSchema = updateIntegrationJustEatRestaurantStatusResponseSchema
|
|
31
|
-
readonly querySchema = undefined
|
|
32
|
-
readonly headersSchema = undefined
|
|
33
|
-
|
|
34
|
-
private readonly integrationJustEatId: string
|
|
35
|
-
|
|
36
|
-
constructor(integrationJustEatId: string, input: UpdateIntegrationJustEatRestaurantStatusInput) {
|
|
37
|
-
super(input)
|
|
38
|
-
this.integrationJustEatId = integrationJustEatId
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
getPath(): string {
|
|
42
|
-
return `/integrations/justeat/${this.integrationJustEatId}/restaurant/status`
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './CreateIntegrationJustEat'
|
|
2
|
-
export * from './DeleteIntegrationJustEat'
|
|
3
|
-
export * from './GetIntegrationJustEatClientLogRequestDetails'
|
|
4
|
-
export * from './GetIntegrationJustEatClientLogRequests'
|
|
5
|
-
export * from './GetIntegrationJustEatDetails'
|
|
6
|
-
export * from './GetIntegrationJustEatList'
|
|
7
|
-
export * from './GetIntegrationJustEatMenuVersionDetails'
|
|
8
|
-
export * from './GetIntegrationJustEatMenuVersions'
|
|
9
|
-
export * from './GetIntegrationJustEatSyncMenuProcessDetails'
|
|
10
|
-
export * from './GetIntegrationJustEatSyncMenuProcesses'
|
|
11
|
-
export * from './IntegrationJustEatSyncMenu'
|
|
12
|
-
export * from './IntegrationJustEatSyncOpeningTimes'
|
|
13
|
-
export * from './UpdateIntegrationJustEat'
|
|
14
|
-
export * from './UpdateIntegrationJustEatRestaurantStatus'
|
package/src/schemas.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { datetimeSchema, sortDirSchema } from '@deliverart/sdk-js-global-types'
|
|
2
|
-
import { pointOfSalePathSchema } from '@deliverart/sdk-js-point-of-sale'
|
|
3
|
-
import { salesModeNullablePathSchema } from '@deliverart/sdk-js-sales-mode'
|
|
4
|
-
import { z } from 'zod'
|
|
5
|
-
|
|
6
|
-
import { integrationCancellationRequestNullablePathSchema } from './cancellation-request-types'
|
|
7
|
-
import {
|
|
8
|
-
integrationClientLogRequestMethodSchema,
|
|
9
|
-
integrationDeliverooMenuVersionNullablePathSchema,
|
|
10
|
-
integrationGlovoMenuVersionNullablePathSchema,
|
|
11
|
-
integrationJustEatMenuVersionNullablePathSchema,
|
|
12
|
-
integrationPathSchema,
|
|
13
|
-
integrationProviderSchema,
|
|
14
|
-
integrationServiceSchema,
|
|
15
|
-
integrationStatusSchema,
|
|
16
|
-
} from './types'
|
|
17
|
-
|
|
18
|
-
export const menuVersionSchema = z.object({
|
|
19
|
-
id: z.string(),
|
|
20
|
-
contentUrl: z.string(),
|
|
21
|
-
filePath: z.string(),
|
|
22
|
-
createdAt: datetimeSchema,
|
|
23
|
-
updatedAt: datetimeSchema,
|
|
24
|
-
})
|
|
25
|
-
export type MenuVersion = z.infer<typeof menuVersionSchema>
|
|
26
|
-
|
|
27
|
-
export const menuVersionDetailsSchema = menuVersionSchema.extend({
|
|
28
|
-
integration: integrationPathSchema,
|
|
29
|
-
})
|
|
30
|
-
export type MenuVersionDetails = z.infer<typeof menuVersionDetailsSchema>
|
|
31
|
-
|
|
32
|
-
export const integrationBaseSchema = z.object({
|
|
33
|
-
id: z.string(),
|
|
34
|
-
cancellationRequest: integrationCancellationRequestNullablePathSchema,
|
|
35
|
-
connectionId: z.string().nullable(),
|
|
36
|
-
service: integrationServiceSchema,
|
|
37
|
-
status: integrationStatusSchema,
|
|
38
|
-
provider: integrationProviderSchema,
|
|
39
|
-
createdAt: datetimeSchema,
|
|
40
|
-
updatedAt: datetimeSchema,
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
export const writableIntegrationSchema = integrationBaseSchema.pick({
|
|
44
|
-
status: true, // Only for ADMIN users
|
|
45
|
-
provider: true,
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
export const integrationDetailsFieldsSchema = z.object({
|
|
49
|
-
pointOfSale: pointOfSalePathSchema,
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
export const integrationDeliveryProviderCommonSchema = z.object({
|
|
53
|
-
name: z.string(),
|
|
54
|
-
skipInvalidItem: z.boolean(),
|
|
55
|
-
skipNegativePrices: z.boolean(),
|
|
56
|
-
importTaggedItems: z.boolean(),
|
|
57
|
-
tagsForImport: z.array(z.string()).optional(),
|
|
58
|
-
isValidMenu: z.boolean(),
|
|
59
|
-
latestMenuSyncAt: datetimeSchema.nullable(),
|
|
60
|
-
latestMenuCheckAt: datetimeSchema.nullable(),
|
|
61
|
-
currentMenuVersion: z.union([
|
|
62
|
-
integrationDeliverooMenuVersionNullablePathSchema,
|
|
63
|
-
integrationGlovoMenuVersionNullablePathSchema,
|
|
64
|
-
integrationJustEatMenuVersionNullablePathSchema,
|
|
65
|
-
]),
|
|
66
|
-
salesMode: salesModeNullablePathSchema,
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
export const integrationClientLogRequestSchema = z.object({
|
|
70
|
-
id: z.string(),
|
|
71
|
-
url: z.string(),
|
|
72
|
-
method: integrationClientLogRequestMethodSchema,
|
|
73
|
-
statusCode: z.number(),
|
|
74
|
-
createdAt: datetimeSchema,
|
|
75
|
-
})
|
|
76
|
-
export type IntegrationClientLogRequest = z.infer<typeof integrationClientLogRequestSchema>
|
|
77
|
-
|
|
78
|
-
export const integrationClientLogRequestDetailsSchema = integrationClientLogRequestSchema.extend({
|
|
79
|
-
integration: integrationPathSchema,
|
|
80
|
-
requestHeaders: z.record(z.string()),
|
|
81
|
-
responseHeaders: z.record(z.string()),
|
|
82
|
-
requestBody: z.string(),
|
|
83
|
-
responseBody: z.string(),
|
|
84
|
-
})
|
|
85
|
-
export type IntegrationClientLogRequestDetails = z.infer<
|
|
86
|
-
typeof integrationClientLogRequestDetailsSchema
|
|
87
|
-
>
|
|
88
|
-
|
|
89
|
-
export const clientLogRequestQuerySchema = z.object({
|
|
90
|
-
'order[createdAt]': sortDirSchema.optional(),
|
|
91
|
-
method: integrationClientLogRequestMethodSchema.optional(),
|
|
92
|
-
'method[]': z.array(integrationClientLogRequestMethodSchema).optional(),
|
|
93
|
-
'statusCode[between]': z.number().optional(),
|
|
94
|
-
'statusCode[gt]': z.number().optional(),
|
|
95
|
-
'statusCode[gte]': z.number().optional(),
|
|
96
|
-
'statusCode[lt]': z.number().optional(),
|
|
97
|
-
'statusCode[lte]': z.number().optional(),
|
|
98
|
-
'createdAt[before]': z.string().optional(),
|
|
99
|
-
'createdAt[strictly_before]': z.string().optional(),
|
|
100
|
-
'createdAt[after]': z.string().optional(),
|
|
101
|
-
'createdAt[strictly_after]': z.string().optional(),
|
|
102
|
-
page: z.coerce.number().optional(),
|
|
103
|
-
})
|
|
104
|
-
export type ClientLogRequestQuery = z.infer<typeof clientLogRequestQuerySchema>
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
datetimeSchema,
|
|
3
|
-
sortDirSchema,
|
|
4
|
-
timestampsFilterSchema,
|
|
5
|
-
} from '@deliverart/sdk-js-global-types'
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { integrationBaseSchema, integrationDetailsFieldsSchema } from '../schemas'
|
|
9
|
-
import {
|
|
10
|
-
integrationCassaInCloudDirectionSchema,
|
|
11
|
-
integrationCassaInCloudPathSchema,
|
|
12
|
-
integrationCassaInCloudProductChannelSchema,
|
|
13
|
-
integrationCassaInCloudSyncMenuErrorLogPathSchema,
|
|
14
|
-
integrationCassaInCloudWebHookEventEntitySchema,
|
|
15
|
-
integrationCassaInCloudWebHookEventEventSchema,
|
|
16
|
-
integrationServiceSchema,
|
|
17
|
-
integrationStatusSchema,
|
|
18
|
-
} from '../types'
|
|
19
|
-
|
|
20
|
-
export const integrationCassaInCloudSchema = integrationBaseSchema.omit({ service: true }).extend({
|
|
21
|
-
finalized: z.boolean(),
|
|
22
|
-
apiKey: z.string(),
|
|
23
|
-
service: integrationServiceSchema.extract(['cassa_in_cloud']),
|
|
24
|
-
idSalesPoint: z.number().nonnegative(),
|
|
25
|
-
direction: integrationCassaInCloudDirectionSchema,
|
|
26
|
-
locale: z.string(),
|
|
27
|
-
latestMenuSyncAt: datetimeSchema.nullable(),
|
|
28
|
-
defaultCustomerId: z.string().nullable(),
|
|
29
|
-
skipSyncProductDescription: z.boolean(),
|
|
30
|
-
productChannels: integrationCassaInCloudProductChannelSchema.array(),
|
|
31
|
-
})
|
|
32
|
-
export type IntegrationCassaInCloud = z.infer<typeof integrationCassaInCloudSchema>
|
|
33
|
-
|
|
34
|
-
export const integrationCassaInCloudDetailsSchema = integrationCassaInCloudSchema.extend(
|
|
35
|
-
integrationDetailsFieldsSchema.shape,
|
|
36
|
-
)
|
|
37
|
-
export type IntegrationCassaInCloudDetails = z.infer<typeof integrationCassaInCloudDetailsSchema>
|
|
38
|
-
|
|
39
|
-
export const integrationsCassaInCloudQuerySchema = z
|
|
40
|
-
.object({
|
|
41
|
-
'order[createdAt]': sortDirSchema.optional(),
|
|
42
|
-
'order[updatedAt]': sortDirSchema.optional(),
|
|
43
|
-
'order[latestMenuSyncAt]': sortDirSchema.optional(),
|
|
44
|
-
apiKey: z.string().optional(),
|
|
45
|
-
'apiKey[]': z.array(z.string()).optional(),
|
|
46
|
-
idSalesPoint: z.string().optional(),
|
|
47
|
-
'idSalesPoint[]': z.array(z.string()).optional(),
|
|
48
|
-
direction: integrationCassaInCloudDirectionSchema.optional(),
|
|
49
|
-
'direction[]': z.array(integrationCassaInCloudDirectionSchema).optional(),
|
|
50
|
-
status: integrationStatusSchema.optional(),
|
|
51
|
-
'status[]': z.array(integrationStatusSchema).optional(),
|
|
52
|
-
connectionId: z.string().optional(),
|
|
53
|
-
'connectionId[]': z.array(z.string()).optional(),
|
|
54
|
-
finalized: z.coerce.boolean().optional(),
|
|
55
|
-
skipInvalidItem: z.coerce.boolean().optional(),
|
|
56
|
-
isValidMenu: z.coerce.boolean().optional(),
|
|
57
|
-
'latestMenuSyncAt[before]': z.string().optional(),
|
|
58
|
-
'latestMenuSyncAt[strictly_before]': z.string().optional(),
|
|
59
|
-
'latestMenuSyncAt[after]': z.string().optional(),
|
|
60
|
-
'latestMenuSyncAt[strictly_after]': z.string().optional(),
|
|
61
|
-
service: integrationServiceSchema.extract(['cassa_in_cloud']).optional(),
|
|
62
|
-
page: z.coerce.number().optional(),
|
|
63
|
-
})
|
|
64
|
-
.merge(timestampsFilterSchema)
|
|
65
|
-
export type IntegrationsCassaInCloudQueryParams = z.infer<
|
|
66
|
-
typeof integrationsCassaInCloudQuerySchema
|
|
67
|
-
>
|
|
68
|
-
|
|
69
|
-
export const integrationCassaInCloudEditableFieldsSchema = integrationCassaInCloudSchema
|
|
70
|
-
.pick({
|
|
71
|
-
apiKey: true,
|
|
72
|
-
idSalesPoint: true,
|
|
73
|
-
direction: true,
|
|
74
|
-
skipSyncProductDescription: true,
|
|
75
|
-
productChannels: true,
|
|
76
|
-
locale: true,
|
|
77
|
-
provider: true, // Available for only ADMIN users
|
|
78
|
-
})
|
|
79
|
-
.partial()
|
|
80
|
-
export type IntegrationCassaInCloudEditableFields = z.infer<
|
|
81
|
-
typeof integrationCassaInCloudEditableFieldsSchema
|
|
82
|
-
>
|
|
83
|
-
|
|
84
|
-
export const integrationCassaInCloudSyncMenuProcessSchema = z.object({
|
|
85
|
-
id: z.string(),
|
|
86
|
-
currentPlaces: z.any(),
|
|
87
|
-
availableSalesModesIds: z.array(z.string()),
|
|
88
|
-
availableProductIds: z.array(z.string()),
|
|
89
|
-
availableCategoryIds: z.array(z.string()),
|
|
90
|
-
createdAt: datetimeSchema,
|
|
91
|
-
endAt: datetimeSchema.nullable(),
|
|
92
|
-
})
|
|
93
|
-
export type IntegrationCassaInCloudSyncMenuProcess = z.infer<
|
|
94
|
-
typeof integrationCassaInCloudSyncMenuProcessSchema
|
|
95
|
-
>
|
|
96
|
-
export const integrationCassaInCloudSyncMenuProcessDetailsSchema =
|
|
97
|
-
integrationCassaInCloudSyncMenuProcessSchema.extend({
|
|
98
|
-
integration: integrationCassaInCloudPathSchema,
|
|
99
|
-
errors: z.array(integrationCassaInCloudSyncMenuErrorLogPathSchema).optional(),
|
|
100
|
-
})
|
|
101
|
-
export type IntegrationCassaInCloudSyncMenuProcessDetails = z.infer<
|
|
102
|
-
typeof integrationCassaInCloudSyncMenuProcessDetailsSchema
|
|
103
|
-
>
|
|
104
|
-
|
|
105
|
-
export const integrationCassaInCloudSyncMenuProcessesQuerySchema = z.object({
|
|
106
|
-
'order[createdAt]': sortDirSchema.optional(),
|
|
107
|
-
'order[endAt]': sortDirSchema.optional(),
|
|
108
|
-
'createdAt[before]': z.string().optional(),
|
|
109
|
-
'createdAt[strictly_before]': z.string().optional(),
|
|
110
|
-
'createdAt[after]': z.string().optional(),
|
|
111
|
-
'createdAt[strictly_after]': z.string().optional(),
|
|
112
|
-
'endAt[before]': z.string().optional(),
|
|
113
|
-
'endAt[strictly_before]': z.string().optional(),
|
|
114
|
-
'endAt[after]': z.string().optional(),
|
|
115
|
-
'endAt[strictly_after]': z.string().optional(),
|
|
116
|
-
page: z.coerce.number().optional(),
|
|
117
|
-
})
|
|
118
|
-
export type IntegrationCassaInCloudSyncMenuProcessesQueryParams = z.infer<
|
|
119
|
-
typeof integrationCassaInCloudSyncMenuProcessesQuerySchema
|
|
120
|
-
>
|
|
121
|
-
|
|
122
|
-
export const integrationCassaInCloudWebHookEventSchema = z.object({
|
|
123
|
-
id: z.string(),
|
|
124
|
-
entity: integrationCassaInCloudWebHookEventEntitySchema,
|
|
125
|
-
event: integrationCassaInCloudWebHookEventEventSchema,
|
|
126
|
-
body: z.any(),
|
|
127
|
-
createdAt: datetimeSchema,
|
|
128
|
-
})
|
|
129
|
-
export type IntegrationCassaInCloudWebHookEvent = z.infer<
|
|
130
|
-
typeof integrationCassaInCloudWebHookEventSchema
|
|
131
|
-
>
|
|
132
|
-
export const integrationCassaInCloudWebHookEventDetailsSchema =
|
|
133
|
-
integrationCassaInCloudWebHookEventSchema.extend({
|
|
134
|
-
integration: integrationCassaInCloudPathSchema,
|
|
135
|
-
})
|
|
136
|
-
export type IntegrationCassaInCloudWebHookEventDetails = z.infer<
|
|
137
|
-
typeof integrationCassaInCloudWebHookEventDetailsSchema
|
|
138
|
-
>
|
|
139
|
-
|
|
140
|
-
export const integrationCassaInCloudWebHookEventsQuerySchema = z.object({
|
|
141
|
-
'order[createdAt]': sortDirSchema.optional(),
|
|
142
|
-
entity: integrationCassaInCloudWebHookEventEntitySchema.optional(),
|
|
143
|
-
'entity[]': z.array(integrationCassaInCloudWebHookEventEntitySchema).optional(),
|
|
144
|
-
event: integrationCassaInCloudWebHookEventEventSchema.optional(),
|
|
145
|
-
'event[]': z.array(integrationCassaInCloudWebHookEventEventSchema).optional(),
|
|
146
|
-
'createdAt[before]': z.string().optional(),
|
|
147
|
-
'createdAt[strictly_before]': z.string().optional(),
|
|
148
|
-
'createdAt[after]': z.string().optional(),
|
|
149
|
-
'createdAt[strictly_after]': z.string().optional(),
|
|
150
|
-
page: z.coerce.number().optional(),
|
|
151
|
-
})
|
|
152
|
-
export type IntegrationCassaInCloudWebHookEventsQueryParams = z.infer<
|
|
153
|
-
typeof integrationCassaInCloudWebHookEventsQuerySchema
|
|
154
|
-
>
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
datetimeSchema,
|
|
3
|
-
sortDirSchema,
|
|
4
|
-
timestampsFilterSchema,
|
|
5
|
-
} from '@deliverart/sdk-js-global-types'
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
integrationBaseSchema,
|
|
10
|
-
integrationDeliveryProviderCommonSchema,
|
|
11
|
-
integrationDetailsFieldsSchema,
|
|
12
|
-
} from '../schemas'
|
|
13
|
-
import {
|
|
14
|
-
integrationDeliverooPathSchema,
|
|
15
|
-
integrationDeliverooSyncMenuProcessModeSchema,
|
|
16
|
-
integrationDeliverooWebhookEventTypeSchema,
|
|
17
|
-
integrationServiceSchema,
|
|
18
|
-
integrationStatusSchema,
|
|
19
|
-
} from '../types'
|
|
20
|
-
|
|
21
|
-
export const integrationDeliverooSchema = integrationBaseSchema
|
|
22
|
-
.omit({ service: true })
|
|
23
|
-
.extend(integrationDeliveryProviderCommonSchema.shape)
|
|
24
|
-
.extend({
|
|
25
|
-
brandId: z.string(),
|
|
26
|
-
siteId: z.string(),
|
|
27
|
-
imageMenuUrl: z.string().url().nullable(),
|
|
28
|
-
latestOpeningHoursSyncAt: datetimeSchema.nullable(),
|
|
29
|
-
service: integrationServiceSchema.extract(['deliveroo']),
|
|
30
|
-
acceptanceTimeout: z.number().min(0).max(8),
|
|
31
|
-
nextSyncMenuScheduledAt: datetimeSchema.nullable(),
|
|
32
|
-
})
|
|
33
|
-
export type IntegrationDeliveroo = z.infer<typeof integrationDeliverooSchema>
|
|
34
|
-
|
|
35
|
-
export const integrationDeliverooDetailsSchema = integrationDeliverooSchema.extend(
|
|
36
|
-
integrationDetailsFieldsSchema.shape,
|
|
37
|
-
)
|
|
38
|
-
export type IntegrationDeliverooDetails = z.infer<typeof integrationDeliverooDetailsSchema>
|
|
39
|
-
|
|
40
|
-
export const integrationDeliverooEditableFieldsSchema = integrationDeliverooSchema.pick({
|
|
41
|
-
name: true,
|
|
42
|
-
brandId: true,
|
|
43
|
-
siteId: true,
|
|
44
|
-
imageMenuUrl: true,
|
|
45
|
-
acceptanceTimeout: true,
|
|
46
|
-
skipNegativePrices: true,
|
|
47
|
-
skipInvalidItem: true,
|
|
48
|
-
salesMode: true,
|
|
49
|
-
importTaggedItems: true,
|
|
50
|
-
tagsForImport: true,
|
|
51
|
-
provider: true, // Available for only ADMIN users
|
|
52
|
-
})
|
|
53
|
-
export type IntegrationDeliverooEditableFields = z.infer<
|
|
54
|
-
typeof integrationDeliverooEditableFieldsSchema
|
|
55
|
-
>
|
|
56
|
-
|
|
57
|
-
export const integrationsDeliverooQuerySchema = z
|
|
58
|
-
.object({
|
|
59
|
-
'order[createdAt]': sortDirSchema.optional(),
|
|
60
|
-
'order[updatedAt]': sortDirSchema.optional(),
|
|
61
|
-
'order[latestMenuCheckAt]': sortDirSchema.optional(),
|
|
62
|
-
'order[latestMenuSyncAt]': sortDirSchema.optional(),
|
|
63
|
-
'order[latestOpeningHoursSyncAt]': sortDirSchema.optional(),
|
|
64
|
-
name: z.string().optional(),
|
|
65
|
-
brandId: z.string().optional(),
|
|
66
|
-
'brandId[]': z.array(z.string()).optional(),
|
|
67
|
-
siteId: z.string().optional(),
|
|
68
|
-
'siteId[]': z.array(z.string()).optional(),
|
|
69
|
-
status: integrationStatusSchema.optional(),
|
|
70
|
-
'status[]': z.array(integrationStatusSchema).optional(),
|
|
71
|
-
connectionId: z.string().optional(),
|
|
72
|
-
'connectionId[]': z.array(z.string()).optional(),
|
|
73
|
-
skipInvalidItem: z.coerce.boolean().optional(),
|
|
74
|
-
isValidMenu: z.coerce.boolean().optional(),
|
|
75
|
-
'latestMenuCheckAt[before]': z.string().optional(),
|
|
76
|
-
'latestMenuCheckAt[strictly_before]': z.string().optional(),
|
|
77
|
-
'latestMenuCheckAt[after]': z.string().optional(),
|
|
78
|
-
'latestMenuCheckAt[strictly_after]': z.string().optional(),
|
|
79
|
-
'latestMenuSyncAt[before]': z.string().optional(),
|
|
80
|
-
'latestMenuSyncAt[strictly_before]': z.string().optional(),
|
|
81
|
-
'latestMenuSyncAt[after]': z.string().optional(),
|
|
82
|
-
'latestMenuSyncAt[strictly_after]': z.string().optional(),
|
|
83
|
-
'latestOpeningHoursSyncAt[before]': z.string().optional(),
|
|
84
|
-
'latestOpeningHoursSyncAt[strictly_before]': z.string().optional(),
|
|
85
|
-
'latestOpeningHoursSyncAt[after]': z.string().optional(),
|
|
86
|
-
'latestOpeningHoursSyncAt[strictly_after]': z.string().optional(),
|
|
87
|
-
service: integrationServiceSchema.extract(['deliveroo']).optional(),
|
|
88
|
-
page: z.coerce.number().optional(),
|
|
89
|
-
})
|
|
90
|
-
.merge(timestampsFilterSchema)
|
|
91
|
-
export type IntegrationsDeliverooQueryParams = z.infer<typeof integrationsDeliverooQuerySchema>
|
|
92
|
-
|
|
93
|
-
export const integrationDeliverooSyncMenuProcessSchema = z.object({
|
|
94
|
-
id: z.string(),
|
|
95
|
-
mode: integrationDeliverooSyncMenuProcessModeSchema,
|
|
96
|
-
success: z.boolean().nullable(),
|
|
97
|
-
response: z.string().nullable(),
|
|
98
|
-
createdAt: datetimeSchema,
|
|
99
|
-
endAt: datetimeSchema.nullable(),
|
|
100
|
-
})
|
|
101
|
-
export type IntegrationDeliverooSyncMenuProcess = z.infer<
|
|
102
|
-
typeof integrationDeliverooSyncMenuProcessSchema
|
|
103
|
-
>
|
|
104
|
-
export const integrationDeliverooSyncMenuProcessDetailsSchema =
|
|
105
|
-
integrationDeliverooSyncMenuProcessSchema.extend({
|
|
106
|
-
integration: integrationDeliverooPathSchema,
|
|
107
|
-
})
|
|
108
|
-
export type IntegrationDeliverooSyncMenuProcessDetails = z.infer<
|
|
109
|
-
typeof integrationDeliverooSyncMenuProcessDetailsSchema
|
|
110
|
-
>
|
|
111
|
-
|
|
112
|
-
export const integrationDeliverooSyncMenuProcessesQuerySchema = z.object({
|
|
113
|
-
'order[endAt]': sortDirSchema.optional(),
|
|
114
|
-
mode: integrationDeliverooSyncMenuProcessModeSchema.optional(),
|
|
115
|
-
'mode[]': z.array(integrationDeliverooSyncMenuProcessModeSchema).optional(),
|
|
116
|
-
'createdAt[before]': z.string().optional(),
|
|
117
|
-
'createdAt[strictly_before]': z.string().optional(),
|
|
118
|
-
'createdAt[after]': z.string().optional(),
|
|
119
|
-
'createdAt[strictly_after]': z.string().optional(),
|
|
120
|
-
'endAt[before]': z.string().optional(),
|
|
121
|
-
'endAt[strictly_before]': z.string().optional(),
|
|
122
|
-
'endAt[after]': z.string().optional(),
|
|
123
|
-
'endAt[strictly_after]': z.string().optional(),
|
|
124
|
-
page: z.coerce.number().optional(),
|
|
125
|
-
})
|
|
126
|
-
export type IntegrationDeliverooSyncMenuProcessesQueryParams = z.infer<
|
|
127
|
-
typeof integrationDeliverooSyncMenuProcessesQuerySchema
|
|
128
|
-
>
|
|
129
|
-
|
|
130
|
-
export const integrationDeliverooWebhookEventSchema = z.object({
|
|
131
|
-
id: z.string(),
|
|
132
|
-
event: integrationDeliverooWebhookEventTypeSchema,
|
|
133
|
-
body: z.any(),
|
|
134
|
-
createdAt: datetimeSchema,
|
|
135
|
-
})
|
|
136
|
-
export type IntegrationDeliverooWebhookEvent = z.infer<
|
|
137
|
-
typeof integrationDeliverooWebhookEventSchema
|
|
138
|
-
>
|
|
139
|
-
export const integrationDeliverooWebhookEventDetailsSchema =
|
|
140
|
-
integrationDeliverooWebhookEventSchema.extend({
|
|
141
|
-
integration: integrationDeliverooPathSchema,
|
|
142
|
-
})
|
|
143
|
-
export type IntegrationDeliverooWebhookEventDetails = z.infer<
|
|
144
|
-
typeof integrationDeliverooWebhookEventDetailsSchema
|
|
145
|
-
>
|
|
146
|
-
|
|
147
|
-
export const integrationDeliverooWebhookEventsQueryParamsSchema = z.object({
|
|
148
|
-
'order[createdAt]': sortDirSchema.optional(),
|
|
149
|
-
event: integrationDeliverooWebhookEventTypeSchema.optional(),
|
|
150
|
-
'event[]': z.array(integrationDeliverooWebhookEventTypeSchema).optional(),
|
|
151
|
-
'createdAt[before]': z.string().optional(),
|
|
152
|
-
'createdAt[strictly_before]': z.string().optional(),
|
|
153
|
-
'createdAt[after]': z.string().optional(),
|
|
154
|
-
'createdAt[strictly_after]': z.string().optional(),
|
|
155
|
-
page: z.coerce.number().optional(),
|
|
156
|
-
})
|
|
157
|
-
export type IntegrationDeliverooWebhookEventsQueryParams = z.infer<
|
|
158
|
-
typeof integrationDeliverooWebhookEventsQueryParamsSchema
|
|
159
|
-
>
|