@deliverart/sdk-js-integration 0.0.1
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/.changeset/config.json +11 -0
- package/.github/workflows/workflow.yml +47 -0
- package/.prettierrc +7 -0
- package/README.md +3 -0
- package/dist/index.cjs +3660 -0
- package/dist/index.d.cts +32181 -0
- package/dist/index.d.ts +32181 -0
- package/dist/index.js +3385 -0
- package/eslint.config.js +37 -0
- package/package.json +48 -0
- package/src/activatable-integration-data-schemas.ts +50 -0
- package/src/activatable-integration-types.ts +17 -0
- package/src/activatable-integration.ts +86 -0
- package/src/activation-request.ts +53 -0
- package/src/cancellation-request-types.ts +34 -0
- package/src/cancellation-request.ts +21 -0
- package/src/index.ts +9 -0
- package/src/integration-schemas.ts +31 -0
- package/src/requests/DeleteIntegration.ts +27 -0
- package/src/requests/GetIntegrationDetails.ts +30 -0
- package/src/requests/GetIntegrations.ts +63 -0
- package/src/requests/UpdateIntegration.ts +36 -0
- package/src/requests/activation-requests/ActivateIntegrationActivationRequest.ts +38 -0
- package/src/requests/activation-requests/AnnotateIntegrationActivationRequest.ts +46 -0
- package/src/requests/activation-requests/CreateIntegrationActivationRequest.ts +80 -0
- package/src/requests/activation-requests/DeleteIntegrationActivationRequest.ts +27 -0
- package/src/requests/activation-requests/GetIntegrationActivationRequestDetails.ts +37 -0
- package/src/requests/activation-requests/GetIntegrationActivationRequests.ts +86 -0
- package/src/requests/activation-requests/RespondIntegrationActivationRequest.ts +58 -0
- package/src/requests/activation-requests/SendIntegrationActivationRequestToPartner.ts +38 -0
- package/src/requests/activation-requests/UpdateIntegrationActivationRequest.ts +91 -0
- package/src/requests/activation-requests/index.ts +9 -0
- package/src/requests/cancellation-requests/CancelIntegrationCancellationRequest.ts +38 -0
- package/src/requests/cancellation-requests/CreateIntegrationCancellationRequest.ts +41 -0
- package/src/requests/cancellation-requests/DeleteIntegrationCancellationRequest.ts +27 -0
- package/src/requests/cancellation-requests/GetIntegrationCancellationRequestDetails.ts +37 -0
- package/src/requests/cancellation-requests/GetIntegrationCancellationRequests.ts +72 -0
- package/src/requests/cancellation-requests/index.ts +5 -0
- package/src/requests/index.ts +7 -0
- package/src/requests/services/cassa_in_cloud/CreateIntegrationCassaInCloud.ts +42 -0
- package/src/requests/services/cassa_in_cloud/DeleteIntegrationCassaInCloud.ts +27 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudClientLogRequestDetails.ts +40 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudClientLogRequests.ts +64 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudDetails.ts +36 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudList.ts +61 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudSyncMenuProcessDetails.ts +40 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudSyncMenuProcesses.ts +69 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudWebHookEventDetails.ts +40 -0
- package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudWebHookEvents.ts +69 -0
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncCustomers.ts +27 -0
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncOrganizations.ts +27 -0
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncProducts.ts +27 -0
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncSalesModes.ts +27 -0
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncStock.ts +27 -0
- package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncTimetables.ts +27 -0
- package/src/requests/services/cassa_in_cloud/UpdateIntegrationCassaInCloud.ts +39 -0
- package/src/requests/services/cassa_in_cloud/index.ts +17 -0
- package/src/requests/services/deliveroo/CreateIntegrationDeliveroo.ts +40 -0
- package/src/requests/services/deliveroo/DeleteIntegrationDeliveroo.ts +27 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooClientLogRequestDetails.ts +40 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooClientLogRequests.ts +64 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooDetails.ts +36 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooList.ts +61 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooMenuVersionDetails.ts +35 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooMenuVersions.ts +62 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooSyncMenuProcessDetails.ts +40 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooSyncMenuProcesses.ts +69 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooWebhookEventDetails.ts +40 -0
- package/src/requests/services/deliveroo/GetIntegrationDeliverooWebhookEvents.ts +69 -0
- package/src/requests/services/deliveroo/IntegrationDeliverooSyncMenu.ts +27 -0
- package/src/requests/services/deliveroo/IntegrationDeliverooSyncOpeningHours.ts +27 -0
- package/src/requests/services/deliveroo/UpdateIntegrationDeliveroo.ts +39 -0
- package/src/requests/services/deliveroo/UpdateIntegrationDeliverooSiteStatus.ts +43 -0
- package/src/requests/services/deliveroo/index.ts +16 -0
- package/src/requests/services/glovo/CreateIntegrationGlovo.ts +39 -0
- package/src/requests/services/glovo/DeleteIntegrationGlovo.ts +27 -0
- package/src/requests/services/glovo/GetIntegrationGlovoClientLogRequestDetails.ts +39 -0
- package/src/requests/services/glovo/GetIntegrationGlovoClientLogRequests.ts +64 -0
- package/src/requests/services/glovo/GetIntegrationGlovoDetails.ts +36 -0
- package/src/requests/services/glovo/GetIntegrationGlovoList.ts +55 -0
- package/src/requests/services/glovo/GetIntegrationGlovoMenuUpdateDetails.ts +39 -0
- package/src/requests/services/glovo/GetIntegrationGlovoMenuUpdates.ts +66 -0
- package/src/requests/services/glovo/GetIntegrationGlovoMenuVersionDetails.ts +35 -0
- package/src/requests/services/glovo/GetIntegrationGlovoMenuVersions.ts +62 -0
- package/src/requests/services/glovo/GetIntegrationGlovoWebhookEventDetails.ts +39 -0
- package/src/requests/services/glovo/GetIntegrationGlovoWebhookEvents.ts +68 -0
- package/src/requests/services/glovo/IntegrationGlovoSyncMenu.ts +27 -0
- package/src/requests/services/glovo/UpdateIntegrationGlovo.ts +39 -0
- package/src/requests/services/glovo/UpdateIntegrationGlovoStoreStatus.ts +43 -0
- package/src/requests/services/glovo/index.ts +15 -0
- package/src/requests/services/index.ts +4 -0
- package/src/requests/services/justeat/CreateIntegrationJustEat.ts +39 -0
- package/src/requests/services/justeat/DeleteIntegrationJustEat.ts +27 -0
- package/src/requests/services/justeat/GetIntegrationJustEatClientLogRequestDetails.ts +40 -0
- package/src/requests/services/justeat/GetIntegrationJustEatClientLogRequests.ts +64 -0
- package/src/requests/services/justeat/GetIntegrationJustEatDetails.ts +36 -0
- package/src/requests/services/justeat/GetIntegrationJustEatList.ts +60 -0
- package/src/requests/services/justeat/GetIntegrationJustEatMenuVersionDetails.ts +35 -0
- package/src/requests/services/justeat/GetIntegrationJustEatMenuVersions.ts +62 -0
- package/src/requests/services/justeat/GetIntegrationJustEatSyncMenuProcessDetails.ts +40 -0
- package/src/requests/services/justeat/GetIntegrationJustEatSyncMenuProcesses.ts +69 -0
- package/src/requests/services/justeat/IntegrationJustEatSyncMenu.ts +27 -0
- package/src/requests/services/justeat/IntegrationJustEatSyncOpeningTimes.ts +27 -0
- package/src/requests/services/justeat/UpdateIntegrationJustEat.ts +39 -0
- package/src/requests/services/justeat/UpdateIntegrationJustEatRestaurantStatus.ts +44 -0
- package/src/requests/services/justeat/index.ts +14 -0
- package/src/schemas.ts +97 -0
- package/src/service-schemas/cassa_in_cloud.ts +154 -0
- package/src/service-schemas/deliveroo.ts +159 -0
- package/src/service-schemas/glovo.ts +153 -0
- package/src/service-schemas/justeat.ts +121 -0
- package/src/types.ts +227 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
IntegrationGlovoWebhookEvent,
|
|
12
|
+
integrationGlovoWebhookEventSchema,
|
|
13
|
+
IntegrationGlovoWebhookEventsQueryParams,
|
|
14
|
+
integrationGlovoWebhookEventsQueryParamsSchema,
|
|
15
|
+
} from '../../../service-schemas/glovo'
|
|
16
|
+
|
|
17
|
+
export const getIntegrationGlovoWebhookEventsQuerySchema =
|
|
18
|
+
integrationGlovoWebhookEventsQueryParamsSchema
|
|
19
|
+
export type GetIntegrationGlovoWebhookEventsQueryParams = IntegrationGlovoWebhookEventsQueryParams
|
|
20
|
+
|
|
21
|
+
export const getIntegrationGlovoWebhookEventsResponseSchema = createPaginatedSchema(
|
|
22
|
+
integrationGlovoWebhookEventSchema,
|
|
23
|
+
)
|
|
24
|
+
export type GetIntegrationGlovoWebhookEventsResponse = z.infer<
|
|
25
|
+
typeof getIntegrationGlovoWebhookEventsResponseSchema
|
|
26
|
+
>
|
|
27
|
+
|
|
28
|
+
export const getIntegrationGlovoWebhookEventsInputSchema = z.undefined()
|
|
29
|
+
|
|
30
|
+
export class GetIntegrationGlovoWebhookEvents extends AbstractApiRequest<
|
|
31
|
+
void,
|
|
32
|
+
GetIntegrationGlovoWebhookEventsResponse,
|
|
33
|
+
GetIntegrationGlovoWebhookEventsQueryParams
|
|
34
|
+
> {
|
|
35
|
+
readonly method = 'GET'
|
|
36
|
+
readonly contentType = 'application/json'
|
|
37
|
+
readonly accept = 'application/json'
|
|
38
|
+
|
|
39
|
+
readonly inputSchema = getIntegrationGlovoWebhookEventsInputSchema
|
|
40
|
+
readonly outputSchema = getIntegrationGlovoWebhookEventsResponseSchema
|
|
41
|
+
readonly querySchema = getIntegrationGlovoWebhookEventsQuerySchema
|
|
42
|
+
readonly headersSchema = undefined
|
|
43
|
+
|
|
44
|
+
private readonly integrationGlovoId: string
|
|
45
|
+
|
|
46
|
+
constructor(
|
|
47
|
+
integrationGlovoId: string,
|
|
48
|
+
options?: { query?: GetIntegrationGlovoWebhookEventsQueryParams },
|
|
49
|
+
) {
|
|
50
|
+
super(undefined, options)
|
|
51
|
+
this.integrationGlovoId = integrationGlovoId
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
getPath(): string {
|
|
55
|
+
return `/integrations/glovo/${this.integrationGlovoId}/webhook_events`
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
parseResponse(
|
|
59
|
+
data: unknown,
|
|
60
|
+
rawResponse: AxiosResponse,
|
|
61
|
+
): Paginated<IntegrationGlovoWebhookEvent> {
|
|
62
|
+
const integrations = z.array(integrationGlovoWebhookEventSchema).parse(data)
|
|
63
|
+
return this.validateOutput({
|
|
64
|
+
data: integrations,
|
|
65
|
+
pagination: responseToPagination(rawResponse),
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
export const integrationGlovoSyncMenuInputSchema = z.undefined()
|
|
5
|
+
export const integrationGlovoSyncMenuResponseSchema = z.undefined()
|
|
6
|
+
|
|
7
|
+
export class IntegrationGlovoSyncMenu extends AbstractApiRequest<void, void> {
|
|
8
|
+
readonly method = 'POST'
|
|
9
|
+
readonly contentType = 'application/json'
|
|
10
|
+
readonly accept = 'application/json'
|
|
11
|
+
|
|
12
|
+
readonly inputSchema = integrationGlovoSyncMenuInputSchema
|
|
13
|
+
readonly outputSchema = integrationGlovoSyncMenuResponseSchema
|
|
14
|
+
readonly querySchema = undefined
|
|
15
|
+
readonly headersSchema = undefined
|
|
16
|
+
|
|
17
|
+
private readonly integrationGlovoId: string
|
|
18
|
+
|
|
19
|
+
constructor(integrationGlovoId: string) {
|
|
20
|
+
super()
|
|
21
|
+
this.integrationGlovoId = integrationGlovoId
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getPath(): string {
|
|
25
|
+
return `/integrations/glovo/${this.integrationGlovoId}/sync/menu`
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
IntegrationGlovoDetails,
|
|
5
|
+
integrationGlovoDetailsSchema,
|
|
6
|
+
IntegrationGlovoEditableFields,
|
|
7
|
+
integrationGlovoEditableFieldsSchema,
|
|
8
|
+
} from '../../../service-schemas/glovo'
|
|
9
|
+
|
|
10
|
+
export const updateIntegrationGlovoInputSchema = integrationGlovoEditableFieldsSchema
|
|
11
|
+
export type UpdateIntegrationGlovoInput = IntegrationGlovoEditableFields
|
|
12
|
+
|
|
13
|
+
export const updateIntegrationGlovoResponseSchema = integrationGlovoDetailsSchema
|
|
14
|
+
export type UpdateIntegrationGlovoResponse = IntegrationGlovoDetails
|
|
15
|
+
|
|
16
|
+
export class UpdateIntegrationGlovo extends AbstractApiRequest<
|
|
17
|
+
UpdateIntegrationGlovoInput,
|
|
18
|
+
UpdateIntegrationGlovoResponse
|
|
19
|
+
> {
|
|
20
|
+
readonly method = 'PATCH'
|
|
21
|
+
readonly contentType = 'application/merge-patch+json'
|
|
22
|
+
readonly accept = 'application/json'
|
|
23
|
+
|
|
24
|
+
readonly inputSchema = updateIntegrationGlovoInputSchema
|
|
25
|
+
readonly outputSchema = updateIntegrationGlovoResponseSchema
|
|
26
|
+
readonly querySchema = undefined
|
|
27
|
+
readonly headersSchema = undefined
|
|
28
|
+
|
|
29
|
+
private readonly integrationGlovoId: string
|
|
30
|
+
|
|
31
|
+
constructor(integrationGlovoId: string, input: UpdateIntegrationGlovoInput) {
|
|
32
|
+
super(input)
|
|
33
|
+
this.integrationGlovoId = integrationGlovoId
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getPath(): string {
|
|
37
|
+
return `/integrations/glovo/${this.integrationGlovoId}`
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IntegrationGlovoDetails,
|
|
6
|
+
integrationGlovoDetailsSchema,
|
|
7
|
+
} from '../../../service-schemas/glovo'
|
|
8
|
+
import { integrationGlovoStoreStatusSchema } from '../../../types'
|
|
9
|
+
|
|
10
|
+
export const updateIntegrationGlovoStoreStatusInputSchema = z.object({
|
|
11
|
+
status: integrationGlovoStoreStatusSchema,
|
|
12
|
+
})
|
|
13
|
+
export type UpdateIntegrationGlovoStoreStatusInput = z.infer<
|
|
14
|
+
typeof updateIntegrationGlovoStoreStatusInputSchema
|
|
15
|
+
>
|
|
16
|
+
|
|
17
|
+
export const updateIntegrationGlovoStoreStatusResponseSchema = integrationGlovoDetailsSchema
|
|
18
|
+
export type UpdateIntegrationGlovoStoreStatusResponse = IntegrationGlovoDetails
|
|
19
|
+
|
|
20
|
+
export class UpdateIntegrationGlovoStoreStatus extends AbstractApiRequest<
|
|
21
|
+
UpdateIntegrationGlovoStoreStatusInput,
|
|
22
|
+
UpdateIntegrationGlovoStoreStatusResponse
|
|
23
|
+
> {
|
|
24
|
+
readonly method = 'POST'
|
|
25
|
+
readonly contentType = 'application/json'
|
|
26
|
+
readonly accept = 'application/json'
|
|
27
|
+
|
|
28
|
+
readonly inputSchema = updateIntegrationGlovoStoreStatusInputSchema
|
|
29
|
+
readonly outputSchema = updateIntegrationGlovoStoreStatusResponseSchema
|
|
30
|
+
readonly querySchema = undefined
|
|
31
|
+
readonly headersSchema = undefined
|
|
32
|
+
|
|
33
|
+
private readonly integrationGlovoId: string
|
|
34
|
+
|
|
35
|
+
constructor(integrationGlovoId: string, input: UpdateIntegrationGlovoStoreStatusInput) {
|
|
36
|
+
super(input)
|
|
37
|
+
this.integrationGlovoId = integrationGlovoId
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
getPath(): string {
|
|
41
|
+
return `/integrations/glovo/${this.integrationGlovoId}/store/status`
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './CreateIntegrationGlovo'
|
|
2
|
+
export * from './DeleteIntegrationGlovo'
|
|
3
|
+
export * from './GetIntegrationGlovoClientLogRequestDetails'
|
|
4
|
+
export * from './GetIntegrationGlovoClientLogRequests'
|
|
5
|
+
export * from './GetIntegrationGlovoDetails'
|
|
6
|
+
export * from './GetIntegrationGlovoList'
|
|
7
|
+
export * from './GetIntegrationGlovoMenuUpdateDetails'
|
|
8
|
+
export * from './GetIntegrationGlovoMenuUpdates'
|
|
9
|
+
export * from './GetIntegrationGlovoMenuVersionDetails'
|
|
10
|
+
export * from './GetIntegrationGlovoMenuVersions'
|
|
11
|
+
export * from './GetIntegrationGlovoWebhookEventDetails'
|
|
12
|
+
export * from './GetIntegrationGlovoWebhookEvents'
|
|
13
|
+
export * from './IntegrationGlovoSyncMenu'
|
|
14
|
+
export * from './UpdateIntegrationGlovo'
|
|
15
|
+
export * from './UpdateIntegrationGlovoStoreStatus'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
import { pointOfSalePathSchema } from '@deliverart/sdk-js-point-of-sale'
|
|
3
|
+
import { z } from 'zod'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
IntegrationJustEatDetails,
|
|
7
|
+
integrationJustEatDetailsSchema,
|
|
8
|
+
integrationJustEatEditableFieldsSchema,
|
|
9
|
+
} from '../../../service-schemas/justeat'
|
|
10
|
+
|
|
11
|
+
export const createIntegrationJustEatInputSchema = integrationJustEatEditableFieldsSchema.extend({
|
|
12
|
+
pointOfSale: pointOfSalePathSchema,
|
|
13
|
+
})
|
|
14
|
+
export type CreateIntegrationJustEatInput = z.infer<typeof createIntegrationJustEatInputSchema>
|
|
15
|
+
|
|
16
|
+
export const createIntegrationJustEatResponseSchema = integrationJustEatDetailsSchema
|
|
17
|
+
export type CreateIntegrationJustEatResponse = IntegrationJustEatDetails
|
|
18
|
+
|
|
19
|
+
export class CreateIntegrationJustEat extends AbstractApiRequest<
|
|
20
|
+
CreateIntegrationJustEatInput,
|
|
21
|
+
CreateIntegrationJustEatResponse
|
|
22
|
+
> {
|
|
23
|
+
readonly method = 'POST'
|
|
24
|
+
readonly contentType = 'application/json'
|
|
25
|
+
readonly accept = 'application/json'
|
|
26
|
+
|
|
27
|
+
readonly inputSchema = createIntegrationJustEatInputSchema
|
|
28
|
+
readonly outputSchema = createIntegrationJustEatResponseSchema
|
|
29
|
+
readonly querySchema = undefined
|
|
30
|
+
readonly headersSchema = undefined
|
|
31
|
+
|
|
32
|
+
constructor(input: CreateIntegrationJustEatInput) {
|
|
33
|
+
super(input)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getPath(): string {
|
|
37
|
+
return '/integrations/justeat'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
export const deleteIntegrationJustEatInputSchema = z.undefined()
|
|
5
|
+
export const deleteIntegrationJustEatResponseSchema = z.undefined()
|
|
6
|
+
|
|
7
|
+
export class DeleteIntegrationJustEat extends AbstractApiRequest<void, void> {
|
|
8
|
+
readonly method = 'DELETE'
|
|
9
|
+
readonly contentType = 'application/json'
|
|
10
|
+
readonly accept = 'application/json'
|
|
11
|
+
|
|
12
|
+
readonly inputSchema = deleteIntegrationJustEatInputSchema
|
|
13
|
+
readonly outputSchema = deleteIntegrationJustEatResponseSchema
|
|
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}`
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IntegrationClientLogRequestDetails,
|
|
6
|
+
integrationClientLogRequestDetailsSchema,
|
|
7
|
+
} from '../../../schemas'
|
|
8
|
+
|
|
9
|
+
export const getIntegrationJustEatClientLogRequestDetailsInputSchema = z.undefined()
|
|
10
|
+
|
|
11
|
+
export const getIntegrationJustEatClientLogRequestDetailsResponseSchema =
|
|
12
|
+
integrationClientLogRequestDetailsSchema
|
|
13
|
+
export type GetIntegrationJustEatClientLogRequestDetailsResponse =
|
|
14
|
+
IntegrationClientLogRequestDetails
|
|
15
|
+
|
|
16
|
+
export class GetIntegrationJustEatClientLogRequestDetails extends AbstractApiRequest<
|
|
17
|
+
void,
|
|
18
|
+
GetIntegrationJustEatClientLogRequestDetailsResponse
|
|
19
|
+
> {
|
|
20
|
+
readonly method = 'GET'
|
|
21
|
+
readonly contentType = 'application/json'
|
|
22
|
+
readonly accept = 'application/json'
|
|
23
|
+
readonly inputSchema = getIntegrationJustEatClientLogRequestDetailsInputSchema
|
|
24
|
+
readonly outputSchema = getIntegrationJustEatClientLogRequestDetailsResponseSchema
|
|
25
|
+
readonly querySchema = undefined
|
|
26
|
+
readonly headersSchema = undefined
|
|
27
|
+
|
|
28
|
+
private readonly integrationJustEatId: string
|
|
29
|
+
private readonly requestId: string
|
|
30
|
+
|
|
31
|
+
constructor(integrationJustEatId: string, requestId: string) {
|
|
32
|
+
super()
|
|
33
|
+
this.integrationJustEatId = integrationJustEatId
|
|
34
|
+
this.requestId = requestId
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
getPath(): string {
|
|
38
|
+
return `/integrations/justeat/${this.integrationJustEatId}/client_log_requests/${this.requestId}`
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
ClientLogRequestQuery,
|
|
12
|
+
clientLogRequestQuerySchema,
|
|
13
|
+
IntegrationClientLogRequest,
|
|
14
|
+
integrationClientLogRequestSchema,
|
|
15
|
+
} from '../../../schemas'
|
|
16
|
+
|
|
17
|
+
export const getIntegrationJustEatClientLogRequestsQuerySchema = clientLogRequestQuerySchema
|
|
18
|
+
export type GetIntegrationJustEatClientLogRequestsQueryParams = ClientLogRequestQuery
|
|
19
|
+
|
|
20
|
+
export const getIntegrationJustEatClientLogRequestsResponseSchema = createPaginatedSchema(
|
|
21
|
+
integrationClientLogRequestSchema,
|
|
22
|
+
)
|
|
23
|
+
export type GetIntegrationJustEatClientLogRequestsResponse = z.infer<
|
|
24
|
+
typeof getIntegrationJustEatClientLogRequestsResponseSchema
|
|
25
|
+
>
|
|
26
|
+
|
|
27
|
+
export const getIntegrationJustEatClientLogRequestsInputSchema = z.undefined()
|
|
28
|
+
|
|
29
|
+
export class GetIntegrationJustEatClientLogRequests extends AbstractApiRequest<
|
|
30
|
+
void,
|
|
31
|
+
GetIntegrationJustEatClientLogRequestsResponse,
|
|
32
|
+
GetIntegrationJustEatClientLogRequestsQueryParams
|
|
33
|
+
> {
|
|
34
|
+
readonly method = 'GET'
|
|
35
|
+
readonly contentType = 'application/json'
|
|
36
|
+
readonly accept = 'application/json'
|
|
37
|
+
|
|
38
|
+
readonly inputSchema = getIntegrationJustEatClientLogRequestsInputSchema
|
|
39
|
+
readonly outputSchema = getIntegrationJustEatClientLogRequestsResponseSchema
|
|
40
|
+
readonly querySchema = getIntegrationJustEatClientLogRequestsQuerySchema
|
|
41
|
+
readonly headersSchema = undefined
|
|
42
|
+
|
|
43
|
+
private readonly integrationJustEatId: string
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
integrationJustEatId: string,
|
|
47
|
+
options?: { query?: GetIntegrationJustEatClientLogRequestsQueryParams },
|
|
48
|
+
) {
|
|
49
|
+
super(undefined, options)
|
|
50
|
+
this.integrationJustEatId = integrationJustEatId
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
getPath(): string {
|
|
54
|
+
return `/integrations/justeat/${this.integrationJustEatId}/client_log_requests`
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
parseResponse(data: unknown, rawResponse: AxiosResponse): Paginated<IntegrationClientLogRequest> {
|
|
58
|
+
const integrations = z.array(integrationClientLogRequestSchema).parse(data)
|
|
59
|
+
return this.validateOutput({
|
|
60
|
+
data: integrations,
|
|
61
|
+
pagination: responseToPagination(rawResponse),
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
|
|
9
|
+
export const getIntegrationJustEatDetailsInputSchema = z.undefined()
|
|
10
|
+
|
|
11
|
+
export const getIntegrationJustEatDetailsResponseSchema = integrationJustEatDetailsSchema
|
|
12
|
+
export type GetIntegrationJustEatDetailsResponse = IntegrationJustEatDetails
|
|
13
|
+
|
|
14
|
+
export class GetIntegrationJustEatDetails extends AbstractApiRequest<
|
|
15
|
+
void,
|
|
16
|
+
GetIntegrationJustEatDetailsResponse
|
|
17
|
+
> {
|
|
18
|
+
readonly method = 'GET'
|
|
19
|
+
readonly contentType = 'application/json'
|
|
20
|
+
readonly accept = 'application/json'
|
|
21
|
+
readonly inputSchema = getIntegrationJustEatDetailsInputSchema
|
|
22
|
+
readonly outputSchema = getIntegrationJustEatDetailsResponseSchema
|
|
23
|
+
readonly querySchema = undefined
|
|
24
|
+
readonly headersSchema = undefined
|
|
25
|
+
|
|
26
|
+
private readonly integrationJustEatId: string
|
|
27
|
+
|
|
28
|
+
constructor(integrationJustEatId: string) {
|
|
29
|
+
super()
|
|
30
|
+
this.integrationJustEatId = integrationJustEatId
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
getPath(): string {
|
|
34
|
+
return `/integrations/justeat/${this.integrationJustEatId}`
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
IntegrationJustEat,
|
|
12
|
+
integrationJustEatSchema,
|
|
13
|
+
integrationsJustEatQuerySchema,
|
|
14
|
+
} from '../../../service-schemas/justeat'
|
|
15
|
+
|
|
16
|
+
export const getIntegrationJustEatListQuerySchema = integrationsJustEatQuerySchema.omit({
|
|
17
|
+
service: true,
|
|
18
|
+
})
|
|
19
|
+
export type GetIntegrationJustEatListQueryParams = z.infer<
|
|
20
|
+
typeof getIntegrationJustEatListQuerySchema
|
|
21
|
+
>
|
|
22
|
+
|
|
23
|
+
export const getIntegrationJustEatListResponseSchema =
|
|
24
|
+
createPaginatedSchema(integrationJustEatSchema)
|
|
25
|
+
export type GetIntegrationJustEatListResponse = z.infer<
|
|
26
|
+
typeof getIntegrationJustEatListResponseSchema
|
|
27
|
+
>
|
|
28
|
+
|
|
29
|
+
export const getIntegrationJustEatListInputSchema = z.undefined()
|
|
30
|
+
|
|
31
|
+
export class GetIntegrationJustEatList extends AbstractApiRequest<
|
|
32
|
+
void,
|
|
33
|
+
GetIntegrationJustEatListResponse,
|
|
34
|
+
GetIntegrationJustEatListQueryParams
|
|
35
|
+
> {
|
|
36
|
+
readonly method = 'GET'
|
|
37
|
+
readonly contentType = 'application/json'
|
|
38
|
+
readonly accept = 'application/json'
|
|
39
|
+
|
|
40
|
+
readonly inputSchema = getIntegrationJustEatListInputSchema
|
|
41
|
+
readonly outputSchema = getIntegrationJustEatListResponseSchema
|
|
42
|
+
readonly querySchema = getIntegrationJustEatListQuerySchema
|
|
43
|
+
readonly headersSchema = undefined
|
|
44
|
+
|
|
45
|
+
constructor(options?: { query?: GetIntegrationJustEatListQueryParams }) {
|
|
46
|
+
super(undefined, options)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
getPath(): string {
|
|
50
|
+
return '/integrations/justeat'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
parseResponse(data: unknown, rawResponse: AxiosResponse): Paginated<IntegrationJustEat> {
|
|
54
|
+
const integrations = z.array(integrationJustEatSchema).parse(data)
|
|
55
|
+
return this.validateOutput({
|
|
56
|
+
data: integrations,
|
|
57
|
+
pagination: responseToPagination(rawResponse),
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import { MenuVersionDetails, menuVersionDetailsSchema } from '../../../schemas'
|
|
5
|
+
|
|
6
|
+
export const getIntegrationJustEatMenuVersionDetailsInputSchema = z.undefined()
|
|
7
|
+
|
|
8
|
+
export const getIntegrationJustEatMenuVersionDetailsResponseSchema = menuVersionDetailsSchema
|
|
9
|
+
export type GetIntegrationJustEatMenuVersionDetailsResponse = MenuVersionDetails
|
|
10
|
+
|
|
11
|
+
export class GetIntegrationJustEatMenuVersionDetails extends AbstractApiRequest<
|
|
12
|
+
void,
|
|
13
|
+
GetIntegrationJustEatMenuVersionDetailsResponse
|
|
14
|
+
> {
|
|
15
|
+
readonly method = 'GET'
|
|
16
|
+
readonly contentType = 'application/json'
|
|
17
|
+
readonly accept = 'application/json'
|
|
18
|
+
readonly inputSchema = getIntegrationJustEatMenuVersionDetailsInputSchema
|
|
19
|
+
readonly outputSchema = getIntegrationJustEatMenuVersionDetailsResponseSchema
|
|
20
|
+
readonly querySchema = undefined
|
|
21
|
+
readonly headersSchema = undefined
|
|
22
|
+
|
|
23
|
+
private readonly integrationJustEatId: string
|
|
24
|
+
private readonly versionId: string
|
|
25
|
+
|
|
26
|
+
constructor(integrationJustEatId: string, versionId: string) {
|
|
27
|
+
super()
|
|
28
|
+
this.integrationJustEatId = integrationJustEatId
|
|
29
|
+
this.versionId = versionId
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
getPath(): string {
|
|
33
|
+
return `/integrations/justeat/${this.integrationJustEatId}/menu_versions/${this.versionId}`
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { MenuVersion, menuVersionSchema } from '../../../schemas'
|
|
11
|
+
|
|
12
|
+
export const getIntegrationJustEatMenuVersionsQuerySchema = z.object({
|
|
13
|
+
page: z.number().optional(),
|
|
14
|
+
})
|
|
15
|
+
export type GetIntegrationJustEatMenuVersionsQueryParams = z.infer<
|
|
16
|
+
typeof getIntegrationJustEatMenuVersionsQuerySchema
|
|
17
|
+
>
|
|
18
|
+
|
|
19
|
+
export const getIntegrationJustEatMenuVersionsResponseSchema =
|
|
20
|
+
createPaginatedSchema(menuVersionSchema)
|
|
21
|
+
export type GetIntegrationJustEatMenuVersionsResponse = z.infer<
|
|
22
|
+
typeof getIntegrationJustEatMenuVersionsResponseSchema
|
|
23
|
+
>
|
|
24
|
+
|
|
25
|
+
export const getIntegrationJustEatMenuVersionsInputSchema = z.undefined()
|
|
26
|
+
|
|
27
|
+
export class GetIntegrationJustEatMenuVersions extends AbstractApiRequest<
|
|
28
|
+
void,
|
|
29
|
+
GetIntegrationJustEatMenuVersionsResponse,
|
|
30
|
+
GetIntegrationJustEatMenuVersionsQueryParams
|
|
31
|
+
> {
|
|
32
|
+
readonly method = 'GET'
|
|
33
|
+
readonly contentType = 'application/json'
|
|
34
|
+
readonly accept = 'application/json'
|
|
35
|
+
|
|
36
|
+
readonly inputSchema = getIntegrationJustEatMenuVersionsInputSchema
|
|
37
|
+
readonly outputSchema = getIntegrationJustEatMenuVersionsResponseSchema
|
|
38
|
+
readonly querySchema = getIntegrationJustEatMenuVersionsQuerySchema
|
|
39
|
+
readonly headersSchema = undefined
|
|
40
|
+
|
|
41
|
+
private readonly integrationJustEatId: string
|
|
42
|
+
|
|
43
|
+
constructor(
|
|
44
|
+
integrationJustEatId: string,
|
|
45
|
+
options?: { query?: GetIntegrationJustEatMenuVersionsQueryParams },
|
|
46
|
+
) {
|
|
47
|
+
super(undefined, options)
|
|
48
|
+
this.integrationJustEatId = integrationJustEatId
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getPath(): string {
|
|
52
|
+
return `/integrations/justeat/${this.integrationJustEatId}/menu_versions`
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
parseResponse(data: unknown, rawResponse: AxiosResponse): Paginated<MenuVersion> {
|
|
56
|
+
const integrations = z.array(menuVersionSchema).parse(data)
|
|
57
|
+
return this.validateOutput({
|
|
58
|
+
data: integrations,
|
|
59
|
+
pagination: responseToPagination(rawResponse),
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
}
|