@deliverart/sdk-js-integration 0.0.4 → 1.1.6
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 +5368 -1534
- package/dist/index.d.cts +3759 -3714
- package/dist/index.d.ts +3759 -3714
- package/dist/index.js +5219 -1379
- 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 -19
- 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 -34
- 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,62 +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 { MenuVersion, menuVersionSchema } from '../../../schemas'
|
|
11
|
-
|
|
12
|
-
export const getIntegrationGlovoMenuVersionsQuerySchema = z.object({
|
|
13
|
-
page: z.number().optional(),
|
|
14
|
-
})
|
|
15
|
-
export type GetIntegrationGlovoMenuVersionsQueryParams = z.infer<
|
|
16
|
-
typeof getIntegrationGlovoMenuVersionsQuerySchema
|
|
17
|
-
>
|
|
18
|
-
|
|
19
|
-
export const getIntegrationGlovoMenuVersionsResponseSchema =
|
|
20
|
-
createPaginatedSchema(menuVersionSchema)
|
|
21
|
-
export type GetIntegrationGlovoMenuVersionsResponse = z.infer<
|
|
22
|
-
typeof getIntegrationGlovoMenuVersionsResponseSchema
|
|
23
|
-
>
|
|
24
|
-
|
|
25
|
-
export const getIntegrationGlovoMenuVersionsInputSchema = z.undefined()
|
|
26
|
-
|
|
27
|
-
export class GetIntegrationGlovoMenuVersions extends AbstractApiRequest<
|
|
28
|
-
void,
|
|
29
|
-
GetIntegrationGlovoMenuVersionsResponse,
|
|
30
|
-
GetIntegrationGlovoMenuVersionsQueryParams
|
|
31
|
-
> {
|
|
32
|
-
readonly method = 'GET'
|
|
33
|
-
readonly contentType = 'application/json'
|
|
34
|
-
readonly accept = 'application/json'
|
|
35
|
-
|
|
36
|
-
readonly inputSchema = getIntegrationGlovoMenuVersionsInputSchema
|
|
37
|
-
readonly outputSchema = getIntegrationGlovoMenuVersionsResponseSchema
|
|
38
|
-
readonly querySchema = getIntegrationGlovoMenuVersionsQuerySchema
|
|
39
|
-
readonly headersSchema = undefined
|
|
40
|
-
|
|
41
|
-
private readonly integrationGlovoId: string
|
|
42
|
-
|
|
43
|
-
constructor(
|
|
44
|
-
integrationGlovoId: string,
|
|
45
|
-
options?: { query?: GetIntegrationGlovoMenuVersionsQueryParams },
|
|
46
|
-
) {
|
|
47
|
-
super(undefined, options)
|
|
48
|
-
this.integrationGlovoId = integrationGlovoId
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
getPath(): string {
|
|
52
|
-
return `/integrations/glovo/${this.integrationGlovoId}/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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IntegrationGlovoWebhookEventDetails,
|
|
6
|
-
integrationGlovoWebhookEventDetailsSchema,
|
|
7
|
-
} from '../../../service-schemas/glovo'
|
|
8
|
-
|
|
9
|
-
export const getIntegrationGlovoWebhookEventDetailsInputSchema = z.undefined()
|
|
10
|
-
|
|
11
|
-
export const getIntegrationGlovoWebhookEventDetailsResponseSchema =
|
|
12
|
-
integrationGlovoWebhookEventDetailsSchema
|
|
13
|
-
export type GetIntegrationGlovoWebhookEventDetailsResponse = IntegrationGlovoWebhookEventDetails
|
|
14
|
-
|
|
15
|
-
export class GetIntegrationGlovoWebhookEventDetails extends AbstractApiRequest<
|
|
16
|
-
void,
|
|
17
|
-
GetIntegrationGlovoWebhookEventDetailsResponse
|
|
18
|
-
> {
|
|
19
|
-
readonly method = 'GET'
|
|
20
|
-
readonly contentType = 'application/json'
|
|
21
|
-
readonly accept = 'application/json'
|
|
22
|
-
readonly inputSchema = getIntegrationGlovoWebhookEventDetailsInputSchema
|
|
23
|
-
readonly outputSchema = getIntegrationGlovoWebhookEventDetailsResponseSchema
|
|
24
|
-
readonly querySchema = undefined
|
|
25
|
-
readonly headersSchema = undefined
|
|
26
|
-
|
|
27
|
-
private readonly integrationGlovoId: string
|
|
28
|
-
private readonly eventId: string
|
|
29
|
-
|
|
30
|
-
constructor(integrationGlovoId: string, eventId: string) {
|
|
31
|
-
super()
|
|
32
|
-
this.integrationGlovoId = integrationGlovoId
|
|
33
|
-
this.eventId = eventId
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getPath(): string {
|
|
37
|
-
return `/integrations/glovo/${this.integrationGlovoId}/webhook_events/${this.eventId}`
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,68 +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
|
-
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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'
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,64 +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
|
-
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
|
-
}
|
|
@@ -1,36 +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
|
-
|
|
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
|
-
}
|
|
@@ -1,60 +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
|
-
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
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,62 +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 { 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
|
-
}
|