@deliverart/sdk-js-integration 0.0.5 → 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.
Files changed (114) hide show
  1. package/dist/index.cjs +5367 -1540
  2. package/dist/index.d.cts +3759 -3714
  3. package/dist/index.d.ts +3759 -3714
  4. package/dist/index.js +5218 -1385
  5. package/package.json +12 -27
  6. package/.changeset/config.json +0 -11
  7. package/.github/workflows/workflow.yml +0 -47
  8. package/.prettierrc +0 -7
  9. package/CHANGELOG.md +0 -25
  10. package/README.md +0 -3
  11. package/eslint.config.js +0 -37
  12. package/src/activatable-integration-data-schemas.ts +0 -50
  13. package/src/activatable-integration-types.ts +0 -17
  14. package/src/activatable-integration.ts +0 -86
  15. package/src/activation-request.ts +0 -53
  16. package/src/cancellation-request-types.ts +0 -42
  17. package/src/cancellation-request.ts +0 -21
  18. package/src/index.ts +0 -9
  19. package/src/integration-schemas.ts +0 -31
  20. package/src/requests/DeleteIntegration.ts +0 -27
  21. package/src/requests/GetIntegrationDetails.ts +0 -30
  22. package/src/requests/GetIntegrations.ts +0 -63
  23. package/src/requests/UpdateIntegration.ts +0 -36
  24. package/src/requests/activation-requests/ActivateIntegrationActivationRequest.ts +0 -38
  25. package/src/requests/activation-requests/AnnotateIntegrationActivationRequest.ts +0 -46
  26. package/src/requests/activation-requests/CreateIntegrationActivationRequest.ts +0 -80
  27. package/src/requests/activation-requests/DeleteIntegrationActivationRequest.ts +0 -27
  28. package/src/requests/activation-requests/GetIntegrationActivationRequestDetails.ts +0 -37
  29. package/src/requests/activation-requests/GetIntegrationActivationRequests.ts +0 -86
  30. package/src/requests/activation-requests/RespondIntegrationActivationRequest.ts +0 -58
  31. package/src/requests/activation-requests/SendIntegrationActivationRequestToPartner.ts +0 -38
  32. package/src/requests/activation-requests/UpdateIntegrationActivationRequest.ts +0 -91
  33. package/src/requests/activation-requests/index.ts +0 -9
  34. package/src/requests/cancellation-requests/CancelIntegrationCancellationRequest.ts +0 -38
  35. package/src/requests/cancellation-requests/CreateIntegrationCancellationRequest.ts +0 -41
  36. package/src/requests/cancellation-requests/DeleteIntegrationCancellationRequest.ts +0 -27
  37. package/src/requests/cancellation-requests/GetIntegrationCancellationRequestDetails.ts +0 -37
  38. package/src/requests/cancellation-requests/GetIntegrationCancellationRequests.ts +0 -72
  39. package/src/requests/cancellation-requests/index.ts +0 -5
  40. package/src/requests/index.ts +0 -7
  41. package/src/requests/services/cassa_in_cloud/CreateIntegrationCassaInCloud.ts +0 -42
  42. package/src/requests/services/cassa_in_cloud/DeleteIntegrationCassaInCloud.ts +0 -27
  43. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudClientLogRequestDetails.ts +0 -40
  44. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudClientLogRequests.ts +0 -64
  45. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudDetails.ts +0 -36
  46. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudList.ts +0 -61
  47. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudSyncMenuProcessDetails.ts +0 -40
  48. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudSyncMenuProcesses.ts +0 -69
  49. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudWebHookEventDetails.ts +0 -40
  50. package/src/requests/services/cassa_in_cloud/GetIntegrationCassaInCloudWebHookEvents.ts +0 -69
  51. package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncCustomers.ts +0 -27
  52. package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncOrganizations.ts +0 -27
  53. package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncProducts.ts +0 -27
  54. package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncSalesModes.ts +0 -27
  55. package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncStock.ts +0 -27
  56. package/src/requests/services/cassa_in_cloud/IntegrationCassaInCloudSyncTimetables.ts +0 -27
  57. package/src/requests/services/cassa_in_cloud/UpdateIntegrationCassaInCloud.ts +0 -39
  58. package/src/requests/services/cassa_in_cloud/index.ts +0 -17
  59. package/src/requests/services/deliveroo/CreateIntegrationDeliveroo.ts +0 -40
  60. package/src/requests/services/deliveroo/DeleteIntegrationDeliveroo.ts +0 -27
  61. package/src/requests/services/deliveroo/GetIntegrationDeliverooClientLogRequestDetails.ts +0 -40
  62. package/src/requests/services/deliveroo/GetIntegrationDeliverooClientLogRequests.ts +0 -64
  63. package/src/requests/services/deliveroo/GetIntegrationDeliverooDetails.ts +0 -36
  64. package/src/requests/services/deliveroo/GetIntegrationDeliverooList.ts +0 -61
  65. package/src/requests/services/deliveroo/GetIntegrationDeliverooMenuVersionDetails.ts +0 -35
  66. package/src/requests/services/deliveroo/GetIntegrationDeliverooMenuVersions.ts +0 -62
  67. package/src/requests/services/deliveroo/GetIntegrationDeliverooSyncMenuProcessDetails.ts +0 -40
  68. package/src/requests/services/deliveroo/GetIntegrationDeliverooSyncMenuProcesses.ts +0 -69
  69. package/src/requests/services/deliveroo/GetIntegrationDeliverooWebhookEventDetails.ts +0 -40
  70. package/src/requests/services/deliveroo/GetIntegrationDeliverooWebhookEvents.ts +0 -69
  71. package/src/requests/services/deliveroo/IntegrationDeliverooSyncMenu.ts +0 -27
  72. package/src/requests/services/deliveroo/IntegrationDeliverooSyncOpeningHours.ts +0 -27
  73. package/src/requests/services/deliveroo/UpdateIntegrationDeliveroo.ts +0 -39
  74. package/src/requests/services/deliveroo/UpdateIntegrationDeliverooSiteStatus.ts +0 -43
  75. package/src/requests/services/deliveroo/index.ts +0 -16
  76. package/src/requests/services/glovo/CreateIntegrationGlovo.ts +0 -39
  77. package/src/requests/services/glovo/DeleteIntegrationGlovo.ts +0 -27
  78. package/src/requests/services/glovo/GetIntegrationGlovoClientLogRequestDetails.ts +0 -39
  79. package/src/requests/services/glovo/GetIntegrationGlovoClientLogRequests.ts +0 -64
  80. package/src/requests/services/glovo/GetIntegrationGlovoDetails.ts +0 -36
  81. package/src/requests/services/glovo/GetIntegrationGlovoList.ts +0 -55
  82. package/src/requests/services/glovo/GetIntegrationGlovoMenuUpdateDetails.ts +0 -39
  83. package/src/requests/services/glovo/GetIntegrationGlovoMenuUpdates.ts +0 -66
  84. package/src/requests/services/glovo/GetIntegrationGlovoMenuVersionDetails.ts +0 -35
  85. package/src/requests/services/glovo/GetIntegrationGlovoMenuVersions.ts +0 -62
  86. package/src/requests/services/glovo/GetIntegrationGlovoWebhookEventDetails.ts +0 -39
  87. package/src/requests/services/glovo/GetIntegrationGlovoWebhookEvents.ts +0 -68
  88. package/src/requests/services/glovo/IntegrationGlovoSyncMenu.ts +0 -27
  89. package/src/requests/services/glovo/UpdateIntegrationGlovo.ts +0 -39
  90. package/src/requests/services/glovo/UpdateIntegrationGlovoStoreStatus.ts +0 -43
  91. package/src/requests/services/glovo/index.ts +0 -15
  92. package/src/requests/services/index.ts +0 -4
  93. package/src/requests/services/justeat/CreateIntegrationJustEat.ts +0 -39
  94. package/src/requests/services/justeat/DeleteIntegrationJustEat.ts +0 -27
  95. package/src/requests/services/justeat/GetIntegrationJustEatClientLogRequestDetails.ts +0 -40
  96. package/src/requests/services/justeat/GetIntegrationJustEatClientLogRequests.ts +0 -64
  97. package/src/requests/services/justeat/GetIntegrationJustEatDetails.ts +0 -36
  98. package/src/requests/services/justeat/GetIntegrationJustEatList.ts +0 -60
  99. package/src/requests/services/justeat/GetIntegrationJustEatMenuVersionDetails.ts +0 -35
  100. package/src/requests/services/justeat/GetIntegrationJustEatMenuVersions.ts +0 -62
  101. package/src/requests/services/justeat/GetIntegrationJustEatSyncMenuProcessDetails.ts +0 -40
  102. package/src/requests/services/justeat/GetIntegrationJustEatSyncMenuProcesses.ts +0 -69
  103. package/src/requests/services/justeat/IntegrationJustEatSyncMenu.ts +0 -27
  104. package/src/requests/services/justeat/IntegrationJustEatSyncOpeningTimes.ts +0 -27
  105. package/src/requests/services/justeat/UpdateIntegrationJustEat.ts +0 -39
  106. package/src/requests/services/justeat/UpdateIntegrationJustEatRestaurantStatus.ts +0 -44
  107. package/src/requests/services/justeat/index.ts +0 -14
  108. package/src/schemas.ts +0 -104
  109. package/src/service-schemas/cassa_in_cloud.ts +0 -154
  110. package/src/service-schemas/deliveroo.ts +0 -159
  111. package/src/service-schemas/glovo.ts +0 -153
  112. package/src/service-schemas/justeat.ts +0 -121
  113. package/src/types.ts +0 -296
  114. 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,4 +0,0 @@
1
- export * from './cassa_in_cloud'
2
- export * from './deliveroo'
3
- export * from './glovo'
4
- export * from './justeat'
@@ -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
- }