@pinelab/vendure-plugin-e-boekhouden 2.0.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +9 -20
- package/dist/api/e-boekhouden.adapter.d.ts +3 -3
- package/dist/api/e-boekhouden.service.d.ts +14 -5
- package/dist/api/e-boekhouden.service.js +23 -27
- package/dist/custom-fields.d.ts +17 -0
- package/dist/custom-fields.js +69 -0
- package/dist/e-boekhouden.plugin.d.ts +0 -2
- package/dist/e-boekhouden.plugin.js +3 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -4
- package/dist/api/e-boekhouden-config.entity.d.ts +0 -11
- package/dist/api/e-boekhouden-config.entity.js +0 -52
- package/dist/api/e-boekhouden.resolver.d.ts +0 -11
- package/dist/api/e-boekhouden.resolver.js +0 -56
- package/dist/api/schema.graphql.d.ts +0 -1
- package/dist/api/schema.graphql.js +0 -34
- package/dist/ui/e-boekhouden-nav.module.ts +0 -19
- package/dist/ui/e-boekhouden.component.ts +0 -122
- package/dist/ui/e-boekhouden.module.ts +0 -21
- package/dist/ui/generated/graphql.d.ts +0 -79
- package/dist/ui/generated/graphql.js +0 -2
- package/dist/ui/generated/graphql.ts +0 -59
- package/dist/ui/queries.graphql.ts +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# 2.3.0 (2026-07-21)
|
|
2
|
+
|
|
3
|
+
- Moved configurations from DB into code
|
|
4
|
+
|
|
5
|
+
# 2.2.0 (2026-08-05)
|
|
6
|
+
|
|
7
|
+
- Upgraded to Vendure 3.6.3
|
|
8
|
+
|
|
9
|
+
# 2.1.0 (2026-02-05)
|
|
10
|
+
|
|
11
|
+
- Upgraded to Vendure 3.5.3
|
|
12
|
+
|
|
1
13
|
# 2.0.0 (2025-11-25)
|
|
2
14
|
|
|
3
15
|
- Add support for custom VAT code strategy to define the VAT code to send to e-boekhouden
|
package/README.md
CHANGED
|
@@ -33,26 +33,15 @@ plugins: [
|
|
|
33
33
|
]
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
2.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
outputPath: path.join(__dirname, '__admin-ui'),
|
|
46
|
-
extensions: [EboekhoudenPlugin.ui],
|
|
47
|
-
}),
|
|
48
|
-
}),
|
|
49
|
-
];
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
You can read more about Admin UI compilation in the Vendure
|
|
53
|
-
[docs](https://www.vendure.io/docs/plugins/extending-the-admin-ui/#compiling-as-a-deployment-step)
|
|
54
|
-
|
|
55
|
-
4. Start the server and set your credentials via `Settings > E-boekhouden`
|
|
36
|
+
2. Start the server and go to `Settings` > `Channels`, open the channel you want
|
|
37
|
+
to configure and select the **E-boekhouden** tab. Tick `Enabled` and fill in
|
|
38
|
+
your `Username`, `Security code 1`, `Security code 2`, `Account` and
|
|
39
|
+
`Contra account`. Configuration is stored per channel as Channel custom
|
|
40
|
+
fields, so no Admin UI extension needs to be compiled.
|
|
41
|
+
|
|
42
|
+
> The `eBoekhoudenEnabled` toggle controls whether e-Boekhouden is active for a
|
|
43
|
+
> channel. When it is off (or the config is incomplete), the plugin is disabled
|
|
44
|
+
> for that channel.
|
|
56
45
|
|
|
57
46
|
### Development - generate new client
|
|
58
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CMutatieRegel, OMut } from '../client';
|
|
2
2
|
import { Order, RequestContext } from '@vendure/core';
|
|
3
|
-
import {
|
|
3
|
+
import { EBoekhoudenChannelConfig } from './e-boekhouden.service';
|
|
4
4
|
import { OrderTaxSummary } from '@vendure/common/lib/generated-types';
|
|
5
5
|
/**
|
|
6
6
|
* Recalculate taxes based on the taxBase+taxTotal (the totalIncVAT), because Vendure calculates taxes per orderline and
|
|
@@ -18,7 +18,7 @@ export declare class EBoekhoudenAdapter {
|
|
|
18
18
|
* Transforms an order, together with config, to a e-Boekhouden mutation format
|
|
19
19
|
* using the order.taxSummary
|
|
20
20
|
*/
|
|
21
|
-
static toMutation(ctx: RequestContext, order: Order, config:
|
|
22
|
-
static toMutationLine(ctx: RequestContext, tax: OrderTaxSummary, order: Order, config:
|
|
21
|
+
static toMutation(ctx: RequestContext, order: Order, config: EBoekhoudenChannelConfig): OMut;
|
|
22
|
+
static toMutationLine(ctx: RequestContext, tax: OrderTaxSummary, order: Order, config: EBoekhoudenChannelConfig): CMutatieRegel;
|
|
23
23
|
static toDateString(date: Date): string;
|
|
24
24
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ChannelService, EventBus, JobQueue, JobQueueService, OrderService, TransactionalConnection } from '@vendure/core';
|
|
2
2
|
import { OnApplicationBootstrap, OnModuleInit } from '@nestjs/common';
|
|
3
|
-
import { EBoekhoudenConfigEntity } from './e-boekhouden-config.entity';
|
|
4
|
-
import { EBoekhoudenConfigInput } from '../ui/generated/graphql';
|
|
5
3
|
import { EBoekhoudenWsdlClient } from '../client';
|
|
6
4
|
interface JobData {
|
|
7
5
|
channelToken: string;
|
|
@@ -18,12 +16,23 @@ export declare class EBoekhoudenService implements OnApplicationBootstrap, OnMod
|
|
|
18
16
|
constructor(connection: TransactionalConnection, orderService: OrderService, channelService: ChannelService, eventBus: EventBus, jobQueueService: JobQueueService);
|
|
19
17
|
onModuleInit(): Promise<void>;
|
|
20
18
|
onApplicationBootstrap(): Promise<void>;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Get the e-Boekhouden config for the given channel from its custom fields.
|
|
21
|
+
* Returns null when e-Boekhouden is disabled or the config is incomplete for the channel.
|
|
22
|
+
*/
|
|
23
|
+
getConfig(channelToken: string): Promise<EBoekhoudenChannelConfig | null>;
|
|
24
24
|
pushOrder({ orderCode, channelToken }: JobData): Promise<void>;
|
|
25
25
|
private openSession;
|
|
26
26
|
closeSession(sessionId: string): Promise<void>;
|
|
27
27
|
private validate;
|
|
28
28
|
}
|
|
29
|
+
export interface EBoekhoudenChannelConfig {
|
|
30
|
+
channelToken: string;
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
username: string;
|
|
33
|
+
secret1: string;
|
|
34
|
+
secret2: string;
|
|
35
|
+
account: string;
|
|
36
|
+
contraAccount: string;
|
|
37
|
+
}
|
|
29
38
|
export {};
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EBoekhoudenService = void 0;
|
|
13
13
|
const core_1 = require("@vendure/core");
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
|
-
const e_boekhouden_config_entity_1 = require("./e-boekhouden-config.entity");
|
|
16
15
|
const client_1 = require("../client");
|
|
17
16
|
const constants_1 = require("../constants");
|
|
18
17
|
const e_boekhouden_adapter_1 = require("./e-boekhouden.adapter");
|
|
@@ -47,33 +46,30 @@ let EBoekhoudenService = class EBoekhoudenService {
|
|
|
47
46
|
orderCode: event.order.code,
|
|
48
47
|
}));
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (existing) {
|
|
55
|
-
await this.connection
|
|
56
|
-
.getRepository(e_boekhouden_config_entity_1.EBoekhoudenConfigEntity)
|
|
57
|
-
.update(existing.id, input);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
await this.connection
|
|
61
|
-
.getRepository(e_boekhouden_config_entity_1.EBoekhoudenConfigEntity)
|
|
62
|
-
.insert({ ...input, channelToken });
|
|
63
|
-
}
|
|
64
|
-
return this.connection
|
|
65
|
-
.getRepository(e_boekhouden_config_entity_1.EBoekhoudenConfigEntity)
|
|
66
|
-
.findOneOrFail({ where: { channelToken } });
|
|
67
|
-
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the e-Boekhouden config for the given channel from its custom fields.
|
|
51
|
+
* Returns null when e-Boekhouden is disabled or the config is incomplete for the channel.
|
|
52
|
+
*/
|
|
68
53
|
async getConfig(channelToken) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
const channel = await this.channelService.getChannelFromToken(channelToken);
|
|
55
|
+
const { eBoekhoudenEnabled, eBoekhoudenUsername, eBoekhoudenSecret1, eBoekhoudenSecret2, eBoekhoudenAccount, eBoekhoudenContraAccount, } = channel.customFields;
|
|
56
|
+
if (!eBoekhoudenEnabled ||
|
|
57
|
+
!eBoekhoudenUsername ||
|
|
58
|
+
!eBoekhoudenSecret1 ||
|
|
59
|
+
!eBoekhoudenSecret2 ||
|
|
60
|
+
!eBoekhoudenAccount ||
|
|
61
|
+
!eBoekhoudenContraAccount) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
channelToken,
|
|
66
|
+
enabled: eBoekhoudenEnabled,
|
|
67
|
+
username: eBoekhoudenUsername,
|
|
68
|
+
secret1: eBoekhoudenSecret1,
|
|
69
|
+
secret2: eBoekhoudenSecret2,
|
|
70
|
+
account: eBoekhoudenAccount,
|
|
71
|
+
contraAccount: eBoekhoudenContraAccount,
|
|
72
|
+
};
|
|
77
73
|
}
|
|
78
74
|
async pushOrder({ orderCode, channelToken }) {
|
|
79
75
|
const config = await this.getConfig(channelToken);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CustomFieldConfig, PermissionDefinition } from '@vendure/core';
|
|
2
|
+
export declare const eBoekhoudenPermission: PermissionDefinition;
|
|
3
|
+
declare module '@vendure/core' {
|
|
4
|
+
interface CustomChannelFields {
|
|
5
|
+
eBoekhoudenEnabled?: boolean;
|
|
6
|
+
eBoekhoudenUsername?: string;
|
|
7
|
+
eBoekhoudenSecret1?: string;
|
|
8
|
+
eBoekhoudenSecret2?: string;
|
|
9
|
+
eBoekhoudenAccount?: string;
|
|
10
|
+
eBoekhoudenContraAccount?: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Per-channel e-Boekhouden configuration, stored as Channel custom fields.
|
|
15
|
+
* Vendure renders these on the Channel detail page under the "E-boekhouden" tab.
|
|
16
|
+
*/
|
|
17
|
+
export declare const channelCustomFields: CustomFieldConfig[];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.channelCustomFields = exports.eBoekhoudenPermission = void 0;
|
|
4
|
+
const core_1 = require("@vendure/core");
|
|
5
|
+
exports.eBoekhoudenPermission = new core_1.PermissionDefinition({
|
|
6
|
+
name: 'eBoekhouden',
|
|
7
|
+
description: 'Allows enabling e-Boekhouden plugin',
|
|
8
|
+
});
|
|
9
|
+
const uiTab = 'E-boekhouden';
|
|
10
|
+
/**
|
|
11
|
+
* Per-channel e-Boekhouden configuration, stored as Channel custom fields.
|
|
12
|
+
* Vendure renders these on the Channel detail page under the "E-boekhouden" tab.
|
|
13
|
+
*/
|
|
14
|
+
exports.channelCustomFields = [
|
|
15
|
+
{
|
|
16
|
+
name: 'eBoekhoudenEnabled',
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
public: false,
|
|
19
|
+
defaultValue: false,
|
|
20
|
+
label: [{ languageCode: core_1.LanguageCode.en, value: 'Enabled' }],
|
|
21
|
+
requiresPermission: exports.eBoekhoudenPermission.Permission,
|
|
22
|
+
ui: { tab: uiTab },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'eBoekhoudenUsername',
|
|
26
|
+
type: 'string',
|
|
27
|
+
public: false,
|
|
28
|
+
nullable: true,
|
|
29
|
+
label: [{ languageCode: core_1.LanguageCode.en, value: 'Username' }],
|
|
30
|
+
requiresPermission: exports.eBoekhoudenPermission.Permission,
|
|
31
|
+
ui: { tab: uiTab },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'eBoekhoudenSecret1',
|
|
35
|
+
type: 'string',
|
|
36
|
+
public: false,
|
|
37
|
+
nullable: true,
|
|
38
|
+
label: [{ languageCode: core_1.LanguageCode.en, value: 'Security code 1' }],
|
|
39
|
+
requiresPermission: exports.eBoekhoudenPermission.Permission,
|
|
40
|
+
ui: { tab: uiTab, component: 'password-form-input' },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'eBoekhoudenSecret2',
|
|
44
|
+
type: 'string',
|
|
45
|
+
public: false,
|
|
46
|
+
nullable: true,
|
|
47
|
+
label: [{ languageCode: core_1.LanguageCode.en, value: 'Security code 2' }],
|
|
48
|
+
requiresPermission: exports.eBoekhoudenPermission.Permission,
|
|
49
|
+
ui: { tab: uiTab, component: 'password-form-input' },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'eBoekhoudenAccount',
|
|
53
|
+
type: 'string',
|
|
54
|
+
public: false,
|
|
55
|
+
nullable: true,
|
|
56
|
+
label: [{ languageCode: core_1.LanguageCode.en, value: 'Account' }],
|
|
57
|
+
requiresPermission: exports.eBoekhoudenPermission.Permission,
|
|
58
|
+
ui: { tab: uiTab },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'eBoekhoudenContraAccount',
|
|
62
|
+
type: 'string',
|
|
63
|
+
public: false,
|
|
64
|
+
nullable: true,
|
|
65
|
+
label: [{ languageCode: core_1.LanguageCode.en, value: 'Contra account' }],
|
|
66
|
+
requiresPermission: exports.eBoekhoudenPermission.Permission,
|
|
67
|
+
ui: { tab: uiTab },
|
|
68
|
+
},
|
|
69
|
+
];
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { AdminUiExtension } from '@vendure/ui-devkit/compiler';
|
|
2
1
|
import { EBoekhoudenOptions } from './api/types';
|
|
3
2
|
export declare class EBoekhoudenPlugin {
|
|
4
3
|
static options: EBoekhoudenOptions;
|
|
5
4
|
static init(options: EBoekhoudenOptions): typeof EBoekhoudenPlugin;
|
|
6
|
-
static ui: AdminUiExtension;
|
|
7
5
|
}
|
|
@@ -5,18 +5,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
8
|
var EBoekhoudenPlugin_1;
|
|
12
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
10
|
exports.EBoekhoudenPlugin = void 0;
|
|
14
11
|
const core_1 = require("@vendure/core");
|
|
15
|
-
const path_1 = __importDefault(require("path"));
|
|
16
12
|
const e_boekhouden_service_1 = require("./api/e-boekhouden.service");
|
|
17
|
-
const
|
|
18
|
-
const schema_graphql_1 = require("./api/schema.graphql");
|
|
19
|
-
const e_boekhouden_resolver_1 = require("./api/e-boekhouden.resolver");
|
|
13
|
+
const custom_fields_1 = require("./custom-fields");
|
|
20
14
|
let EBoekhoudenPlugin = EBoekhoudenPlugin_1 = class EBoekhoudenPlugin {
|
|
21
15
|
static init(options) {
|
|
22
16
|
this.options = options;
|
|
@@ -24,33 +18,13 @@ let EBoekhoudenPlugin = EBoekhoudenPlugin_1 = class EBoekhoudenPlugin {
|
|
|
24
18
|
}
|
|
25
19
|
};
|
|
26
20
|
exports.EBoekhoudenPlugin = EBoekhoudenPlugin;
|
|
27
|
-
EBoekhoudenPlugin.ui = {
|
|
28
|
-
extensionPath: path_1.default.join(__dirname, 'ui'),
|
|
29
|
-
ngModules: [
|
|
30
|
-
{
|
|
31
|
-
type: 'lazy',
|
|
32
|
-
route: 'e-boekhouden',
|
|
33
|
-
ngModuleFileName: 'e-boekhouden.module.ts',
|
|
34
|
-
ngModuleName: 'EBoekhoudenModule',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
type: 'shared',
|
|
38
|
-
ngModuleFileName: 'e-boekhouden-nav.module.ts',
|
|
39
|
-
ngModuleName: 'EBoekhoudenNavModule',
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
21
|
exports.EBoekhoudenPlugin = EBoekhoudenPlugin = EBoekhoudenPlugin_1 = __decorate([
|
|
44
22
|
(0, core_1.VendurePlugin)({
|
|
45
23
|
imports: [core_1.PluginCommonModule],
|
|
46
|
-
entities: [e_boekhouden_config_entity_1.EBoekhoudenConfigEntity],
|
|
47
24
|
providers: [e_boekhouden_service_1.EBoekhoudenService],
|
|
48
|
-
adminApiExtensions: {
|
|
49
|
-
schema: schema_graphql_1.schema,
|
|
50
|
-
resolvers: [e_boekhouden_resolver_1.EBoekhoudenResolver],
|
|
51
|
-
},
|
|
52
25
|
configuration: (config) => {
|
|
53
|
-
config.authOptions.customPermissions.push(
|
|
26
|
+
config.authOptions.customPermissions.push(custom_fields_1.eBoekhoudenPermission);
|
|
27
|
+
config.customFields.Channel.push(...custom_fields_1.channelCustomFields);
|
|
54
28
|
return config;
|
|
55
29
|
},
|
|
56
30
|
compatibility: '>=2.2.0',
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.recalculateTaxFromTotalIncVAT = void 0;
|
|
18
|
-
__exportStar(require("./ui/generated/graphql"), exports);
|
|
19
18
|
__exportStar(require("./e-boekhouden.plugin"), exports);
|
|
19
|
+
__exportStar(require("./custom-fields"), exports);
|
|
20
20
|
var e_boekhouden_adapter_1 = require("./api/e-boekhouden.adapter");
|
|
21
21
|
Object.defineProperty(exports, "recalculateTaxFromTotalIncVAT", { enumerable: true, get: function () { return e_boekhouden_adapter_1.recalculateTaxFromTotalIncVAT; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinelab/vendure-plugin-e-boekhouden",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Vendure plugin for integration with the e-boekhouden accounting platform",
|
|
5
5
|
"author": "Martijn van de Brug <martijn@pinelab.studio>",
|
|
6
6
|
"homepage": "https://plugins.pinelab.studio/",
|
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
"CHANGELOG.md"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"serve": "nodemon --watch \"src/**\" --ext \"ts,json\" --exec \"ts-node test/dev-server.ts\"",
|
|
21
|
+
"serve": "nodemon --watch \"src/**\" --ext \"ts,json\" --exec \"ts-node --swc test/dev-server.ts\"",
|
|
22
22
|
"start": "ts-node test/dev-server.ts",
|
|
23
|
-
"build": "rimraf dist &&
|
|
23
|
+
"build": "rimraf dist && tsc",
|
|
24
|
+
"build:dashboard": "vite build --config ./vite.config.mts",
|
|
25
|
+
"dev:dashboard": "vite --clearScreen false",
|
|
24
26
|
"test": "vitest run",
|
|
25
27
|
"generate-soap-client": "rimraf src/client/eboekhoudenwsdl && wsdl-tsclient ./src/client/e-boekhouden-wsdl.xml -o ./src/client/",
|
|
26
28
|
"lint": "echo 'No linting configured'"
|
|
@@ -28,5 +30,5 @@
|
|
|
28
30
|
"dependencies": {
|
|
29
31
|
"soap": "^0.43.0"
|
|
30
32
|
},
|
|
31
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "476f36da3aafea41fbf21c70774a30306f1d238f"
|
|
32
34
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DeepPartial, VendureEntity } from '@vendure/core';
|
|
2
|
-
export declare class EBoekhoudenConfigEntity extends VendureEntity {
|
|
3
|
-
constructor(input?: DeepPartial<EBoekhoudenConfigEntity>);
|
|
4
|
-
channelToken: string;
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
username: string;
|
|
7
|
-
secret1: string;
|
|
8
|
-
secret2: string;
|
|
9
|
-
account: string;
|
|
10
|
-
contraAccount: string;
|
|
11
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EBoekhoudenConfigEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const core_1 = require("@vendure/core");
|
|
15
|
-
let EBoekhoudenConfigEntity = class EBoekhoudenConfigEntity extends core_1.VendureEntity {
|
|
16
|
-
constructor(input) {
|
|
17
|
-
super(input);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.EBoekhoudenConfigEntity = EBoekhoudenConfigEntity;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.Column)({ unique: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], EBoekhoudenConfigEntity.prototype, "channelToken", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
27
|
-
__metadata("design:type", Boolean)
|
|
28
|
-
], EBoekhoudenConfigEntity.prototype, "enabled", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], EBoekhoudenConfigEntity.prototype, "username", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], EBoekhoudenConfigEntity.prototype, "secret1", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], EBoekhoudenConfigEntity.prototype, "secret2", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], EBoekhoudenConfigEntity.prototype, "account", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], EBoekhoudenConfigEntity.prototype, "contraAccount", void 0);
|
|
49
|
-
exports.EBoekhoudenConfigEntity = EBoekhoudenConfigEntity = __decorate([
|
|
50
|
-
(0, typeorm_1.Entity)('e_boekhouden_config'),
|
|
51
|
-
__metadata("design:paramtypes", [Object])
|
|
52
|
-
], EBoekhoudenConfigEntity);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RequestContext } from '@vendure/core';
|
|
2
|
-
import { EBoekhoudenService } from './e-boekhouden.service';
|
|
3
|
-
import { PermissionDefinition } from '@vendure/core';
|
|
4
|
-
import { EBoekhoudenConfig, EBoekhoudenConfigInput } from '../ui/generated/graphql';
|
|
5
|
-
export declare const eBoekhoudenPermission: PermissionDefinition;
|
|
6
|
-
export declare class EBoekhoudenResolver {
|
|
7
|
-
private service;
|
|
8
|
-
constructor(service: EBoekhoudenService);
|
|
9
|
-
eBoekhoudenConfig(ctx: RequestContext): Promise<EBoekhoudenConfig | null>;
|
|
10
|
-
updateEBoekhoudenConfig(ctx: RequestContext, input: EBoekhoudenConfigInput): Promise<EBoekhoudenConfig | null>;
|
|
11
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.EBoekhoudenResolver = exports.eBoekhoudenPermission = void 0;
|
|
16
|
-
const graphql_1 = require("@nestjs/graphql");
|
|
17
|
-
const core_1 = require("@vendure/core");
|
|
18
|
-
const e_boekhouden_service_1 = require("./e-boekhouden.service");
|
|
19
|
-
const core_2 = require("@vendure/core");
|
|
20
|
-
exports.eBoekhoudenPermission = new core_2.PermissionDefinition({
|
|
21
|
-
name: 'eBoekhouden',
|
|
22
|
-
description: 'Allows enabling e-Boekhouden plugin',
|
|
23
|
-
});
|
|
24
|
-
let EBoekhoudenResolver = class EBoekhoudenResolver {
|
|
25
|
-
constructor(service) {
|
|
26
|
-
this.service = service;
|
|
27
|
-
}
|
|
28
|
-
async eBoekhoudenConfig(ctx) {
|
|
29
|
-
return this.service.getConfig(ctx.channel.token);
|
|
30
|
-
}
|
|
31
|
-
async updateEBoekhoudenConfig(ctx, input) {
|
|
32
|
-
return this.service.upsertConfig(ctx.channel.token, input);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.EBoekhoudenResolver = EBoekhoudenResolver;
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, graphql_1.Query)(),
|
|
38
|
-
(0, core_1.Allow)(exports.eBoekhoudenPermission.Permission),
|
|
39
|
-
__param(0, (0, core_1.Ctx)()),
|
|
40
|
-
__metadata("design:type", Function),
|
|
41
|
-
__metadata("design:paramtypes", [core_1.RequestContext]),
|
|
42
|
-
__metadata("design:returntype", Promise)
|
|
43
|
-
], EBoekhoudenResolver.prototype, "eBoekhoudenConfig", null);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, graphql_1.Mutation)(),
|
|
46
|
-
(0, core_1.Allow)(exports.eBoekhoudenPermission.Permission),
|
|
47
|
-
__param(0, (0, core_1.Ctx)()),
|
|
48
|
-
__param(1, (0, graphql_1.Args)('input')),
|
|
49
|
-
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [core_1.RequestContext, Object]),
|
|
51
|
-
__metadata("design:returntype", Promise)
|
|
52
|
-
], EBoekhoudenResolver.prototype, "updateEBoekhoudenConfig", null);
|
|
53
|
-
exports.EBoekhoudenResolver = EBoekhoudenResolver = __decorate([
|
|
54
|
-
(0, graphql_1.Resolver)(),
|
|
55
|
-
__metadata("design:paramtypes", [e_boekhouden_service_1.EBoekhoudenService])
|
|
56
|
-
], EBoekhoudenResolver);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const schema: import("graphql").DocumentNode;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.schema = void 0;
|
|
7
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.schema = (0, graphql_tag_1.default) `
|
|
9
|
-
input EBoekhoudenConfigInput {
|
|
10
|
-
enabled: Boolean!
|
|
11
|
-
username: String!
|
|
12
|
-
secret1: String!
|
|
13
|
-
secret2: String!
|
|
14
|
-
account: String!
|
|
15
|
-
contraAccount: String!
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type EBoekhoudenConfig {
|
|
19
|
-
enabled: Boolean!
|
|
20
|
-
username: String!
|
|
21
|
-
secret1: String!
|
|
22
|
-
secret2: String!
|
|
23
|
-
account: String!
|
|
24
|
-
contraAccount: String!
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
extend type Mutation {
|
|
28
|
-
updateEBoekhoudenConfig(input: EBoekhoudenConfigInput!): EBoekhoudenConfig
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
extend type Query {
|
|
32
|
-
eBoekhoudenConfig: EBoekhoudenConfig
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { addNavMenuItem, SharedModule } from '@vendure/admin-ui/core';
|
|
3
|
-
|
|
4
|
-
@NgModule({
|
|
5
|
-
imports: [SharedModule],
|
|
6
|
-
providers: [
|
|
7
|
-
addNavMenuItem(
|
|
8
|
-
{
|
|
9
|
-
id: 'e-boekhouden',
|
|
10
|
-
label: 'e-Boekhouden',
|
|
11
|
-
routerLink: ['/extensions/e-boekhouden'],
|
|
12
|
-
icon: 'dollar-bill',
|
|
13
|
-
requiresPermission: 'eBoekhouden',
|
|
14
|
-
},
|
|
15
|
-
'settings'
|
|
16
|
-
),
|
|
17
|
-
],
|
|
18
|
-
})
|
|
19
|
-
export class EBoekhoudenNavModule {}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
|
2
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
-
import { DataService, NotificationService } from '@vendure/admin-ui/core';
|
|
4
|
-
import {
|
|
5
|
-
eBoekhoudenConfigQuery,
|
|
6
|
-
updateEBoekhoudenConfigMutation,
|
|
7
|
-
} from './queries.graphql';
|
|
8
|
-
import {
|
|
9
|
-
EBoekhoudenConfig,
|
|
10
|
-
UpdateEBoekhoudenConfigMutation,
|
|
11
|
-
UpdateEBoekhoudenConfigMutationVariables,
|
|
12
|
-
} from './generated/graphql';
|
|
13
|
-
|
|
14
|
-
@Component({
|
|
15
|
-
standalone: false,
|
|
16
|
-
selector: 'e-boekhouden-component',
|
|
17
|
-
template: `
|
|
18
|
-
<form class="form" [formGroup]="form">
|
|
19
|
-
<section class="form-block">
|
|
20
|
-
<vdr-form-field label="Enabled" for="enabled">
|
|
21
|
-
<input
|
|
22
|
-
type="checkbox"
|
|
23
|
-
name="enabled"
|
|
24
|
-
clrCheckbox
|
|
25
|
-
formControlName="enabled"
|
|
26
|
-
/>
|
|
27
|
-
</vdr-form-field>
|
|
28
|
-
<vdr-form-field label="Username" for="username">
|
|
29
|
-
<input id="username" type="text" formControlName="username" />
|
|
30
|
-
</vdr-form-field>
|
|
31
|
-
<vdr-form-field label="Secret 1" for="secret1">
|
|
32
|
-
<input id="secret1" type="text" formControlName="secret1" />
|
|
33
|
-
</vdr-form-field>
|
|
34
|
-
<vdr-form-field label="Secret 2" for="secret2">
|
|
35
|
-
<input id="secret2" type="text" formControlName="secret2" />
|
|
36
|
-
</vdr-form-field>
|
|
37
|
-
<vdr-form-field label="Account" for="account">
|
|
38
|
-
<input id="account" type="text" formControlName="account" />
|
|
39
|
-
</vdr-form-field>
|
|
40
|
-
<vdr-form-field label="Contra account" for="contraAccount">
|
|
41
|
-
<input
|
|
42
|
-
id="contraAccount"
|
|
43
|
-
type="text"
|
|
44
|
-
formControlName="contraAccount"
|
|
45
|
-
/>
|
|
46
|
-
</vdr-form-field>
|
|
47
|
-
<button
|
|
48
|
-
class="btn btn-primary"
|
|
49
|
-
(click)="save()"
|
|
50
|
-
[disabled]="form.invalid || form.pristine"
|
|
51
|
-
>
|
|
52
|
-
Save
|
|
53
|
-
</button>
|
|
54
|
-
</section>
|
|
55
|
-
</form>
|
|
56
|
-
`,
|
|
57
|
-
})
|
|
58
|
-
export class EBoekhoudenComponent implements OnInit {
|
|
59
|
-
form: FormGroup;
|
|
60
|
-
testFailed?: string;
|
|
61
|
-
testResultName?: string;
|
|
62
|
-
|
|
63
|
-
constructor(
|
|
64
|
-
private formBuilder: FormBuilder,
|
|
65
|
-
protected dataService: DataService,
|
|
66
|
-
private changeDetector: ChangeDetectorRef,
|
|
67
|
-
private notificationService: NotificationService
|
|
68
|
-
) {
|
|
69
|
-
this.form = this.formBuilder.group({
|
|
70
|
-
enabled: ['enabled'],
|
|
71
|
-
username: ['username'],
|
|
72
|
-
secret1: ['secret1'],
|
|
73
|
-
secret2: ['secret2'],
|
|
74
|
-
account: ['account'],
|
|
75
|
-
contraAccount: ['contraAccount'],
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
async ngOnInit(): Promise<void> {
|
|
80
|
-
await this.dataService
|
|
81
|
-
.query(eBoekhoudenConfigQuery)
|
|
82
|
-
.mapStream((result: any) => result.eBoekhoudenConfig)
|
|
83
|
-
.subscribe((config) => this.setValues(config));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
async save(): Promise<void> {
|
|
87
|
-
try {
|
|
88
|
-
if (this.form.dirty) {
|
|
89
|
-
const formValue = this.form.value;
|
|
90
|
-
const updateEBoekhoudenConfigRresult = await this.dataService
|
|
91
|
-
.mutate<
|
|
92
|
-
UpdateEBoekhoudenConfigMutation,
|
|
93
|
-
UpdateEBoekhoudenConfigMutationVariables
|
|
94
|
-
>(updateEBoekhoudenConfigMutation, {
|
|
95
|
-
input: {
|
|
96
|
-
...formValue,
|
|
97
|
-
},
|
|
98
|
-
})
|
|
99
|
-
.toPromise();
|
|
100
|
-
this.setValues(updateEBoekhoudenConfigRresult?.updateEBoekhoudenConfig);
|
|
101
|
-
}
|
|
102
|
-
this.form.markAsPristine();
|
|
103
|
-
this.changeDetector.markForCheck();
|
|
104
|
-
this.notificationService.success('common.notify-update-success', {
|
|
105
|
-
entity: 'Eboekhouden config',
|
|
106
|
-
});
|
|
107
|
-
} catch (e) {
|
|
108
|
-
this.notificationService.error('common.notify-update-error', {
|
|
109
|
-
entity: 'Eboekhouden config',
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
private setValues(values?: EBoekhoudenConfig | null): void {
|
|
115
|
-
this.form.controls['enabled'].setValue(values?.enabled);
|
|
116
|
-
this.form.controls['username'].setValue(values?.username);
|
|
117
|
-
this.form.controls['secret1'].setValue(values?.secret1);
|
|
118
|
-
this.form.controls['secret2'].setValue(values?.secret2);
|
|
119
|
-
this.form.controls['account'].setValue(values?.account);
|
|
120
|
-
this.form.controls['contraAccount'].setValue(values?.contraAccount);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule } from '@angular/router';
|
|
3
|
-
import { addNavMenuItem, SharedModule } from '@vendure/admin-ui/core';
|
|
4
|
-
import { EBoekhoudenComponent } from './e-boekhouden.component';
|
|
5
|
-
|
|
6
|
-
@NgModule({
|
|
7
|
-
imports: [
|
|
8
|
-
SharedModule,
|
|
9
|
-
RouterModule.forChild([
|
|
10
|
-
{
|
|
11
|
-
path: '',
|
|
12
|
-
pathMatch: 'full',
|
|
13
|
-
component: EBoekhoudenComponent,
|
|
14
|
-
data: { breadcrumb: 'e-Boekhouden' },
|
|
15
|
-
},
|
|
16
|
-
]),
|
|
17
|
-
],
|
|
18
|
-
providers: [],
|
|
19
|
-
declarations: [EBoekhoudenComponent],
|
|
20
|
-
})
|
|
21
|
-
export class EBoekhoudenModule {}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export type Maybe<T> = T | null;
|
|
2
|
-
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
-
export type Exact<T extends {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}> = {
|
|
6
|
-
[K in keyof T]: T[K];
|
|
7
|
-
};
|
|
8
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
-
};
|
|
11
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
-
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
-
};
|
|
14
|
-
/** All built-in and custom scalars, mapped to their actual values */
|
|
15
|
-
export type Scalars = {
|
|
16
|
-
ID: string;
|
|
17
|
-
String: string;
|
|
18
|
-
Boolean: boolean;
|
|
19
|
-
Int: number;
|
|
20
|
-
Float: number;
|
|
21
|
-
};
|
|
22
|
-
export type EBoekhoudenConfig = {
|
|
23
|
-
__typename?: 'EBoekhoudenConfig';
|
|
24
|
-
account: Scalars['String'];
|
|
25
|
-
contraAccount: Scalars['String'];
|
|
26
|
-
enabled: Scalars['Boolean'];
|
|
27
|
-
secret1: Scalars['String'];
|
|
28
|
-
secret2: Scalars['String'];
|
|
29
|
-
username: Scalars['String'];
|
|
30
|
-
};
|
|
31
|
-
export type EBoekhoudenConfigInput = {
|
|
32
|
-
account: Scalars['String'];
|
|
33
|
-
contraAccount: Scalars['String'];
|
|
34
|
-
enabled: Scalars['Boolean'];
|
|
35
|
-
secret1: Scalars['String'];
|
|
36
|
-
secret2: Scalars['String'];
|
|
37
|
-
username: Scalars['String'];
|
|
38
|
-
};
|
|
39
|
-
export type Mutation = {
|
|
40
|
-
__typename?: 'Mutation';
|
|
41
|
-
updateEBoekhoudenConfig?: Maybe<EBoekhoudenConfig>;
|
|
42
|
-
};
|
|
43
|
-
export type MutationUpdateEBoekhoudenConfigArgs = {
|
|
44
|
-
input: EBoekhoudenConfigInput;
|
|
45
|
-
};
|
|
46
|
-
export type Query = {
|
|
47
|
-
__typename?: 'Query';
|
|
48
|
-
eBoekhoudenConfig?: Maybe<EBoekhoudenConfig>;
|
|
49
|
-
};
|
|
50
|
-
export type UpdateEBoekhoudenConfigMutationVariables = Exact<{
|
|
51
|
-
input: EBoekhoudenConfigInput;
|
|
52
|
-
}>;
|
|
53
|
-
export type UpdateEBoekhoudenConfigMutation = {
|
|
54
|
-
__typename?: 'Mutation';
|
|
55
|
-
updateEBoekhoudenConfig?: {
|
|
56
|
-
__typename?: 'EBoekhoudenConfig';
|
|
57
|
-
enabled: boolean;
|
|
58
|
-
username: string;
|
|
59
|
-
secret1: string;
|
|
60
|
-
secret2: string;
|
|
61
|
-
account: string;
|
|
62
|
-
contraAccount: string;
|
|
63
|
-
} | null;
|
|
64
|
-
};
|
|
65
|
-
export type EBoekhoudenConfigQueryVariables = Exact<{
|
|
66
|
-
[key: string]: never;
|
|
67
|
-
}>;
|
|
68
|
-
export type EBoekhoudenConfigQuery = {
|
|
69
|
-
__typename?: 'Query';
|
|
70
|
-
eBoekhoudenConfig?: {
|
|
71
|
-
__typename?: 'EBoekhoudenConfig';
|
|
72
|
-
enabled: boolean;
|
|
73
|
-
username: string;
|
|
74
|
-
secret1: string;
|
|
75
|
-
secret2: string;
|
|
76
|
-
account: string;
|
|
77
|
-
contraAccount: string;
|
|
78
|
-
} | null;
|
|
79
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export type Maybe<T> = T | null;
|
|
2
|
-
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
-
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
4
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
|
5
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
|
6
|
-
/** All built-in and custom scalars, mapped to their actual values */
|
|
7
|
-
export type Scalars = {
|
|
8
|
-
ID: string;
|
|
9
|
-
String: string;
|
|
10
|
-
Boolean: boolean;
|
|
11
|
-
Int: number;
|
|
12
|
-
Float: number;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type EBoekhoudenConfig = {
|
|
16
|
-
__typename?: 'EBoekhoudenConfig';
|
|
17
|
-
account: Scalars['String'];
|
|
18
|
-
contraAccount: Scalars['String'];
|
|
19
|
-
enabled: Scalars['Boolean'];
|
|
20
|
-
secret1: Scalars['String'];
|
|
21
|
-
secret2: Scalars['String'];
|
|
22
|
-
username: Scalars['String'];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type EBoekhoudenConfigInput = {
|
|
26
|
-
account: Scalars['String'];
|
|
27
|
-
contraAccount: Scalars['String'];
|
|
28
|
-
enabled: Scalars['Boolean'];
|
|
29
|
-
secret1: Scalars['String'];
|
|
30
|
-
secret2: Scalars['String'];
|
|
31
|
-
username: Scalars['String'];
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type Mutation = {
|
|
35
|
-
__typename?: 'Mutation';
|
|
36
|
-
updateEBoekhoudenConfig?: Maybe<EBoekhoudenConfig>;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export type MutationUpdateEBoekhoudenConfigArgs = {
|
|
41
|
-
input: EBoekhoudenConfigInput;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export type Query = {
|
|
45
|
-
__typename?: 'Query';
|
|
46
|
-
eBoekhoudenConfig?: Maybe<EBoekhoudenConfig>;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type UpdateEBoekhoudenConfigMutationVariables = Exact<{
|
|
50
|
-
input: EBoekhoudenConfigInput;
|
|
51
|
-
}>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export type UpdateEBoekhoudenConfigMutation = { __typename?: 'Mutation', updateEBoekhoudenConfig?: { __typename?: 'EBoekhoudenConfig', enabled: boolean, username: string, secret1: string, secret2: string, account: string, contraAccount: string } | null };
|
|
55
|
-
|
|
56
|
-
export type EBoekhoudenConfigQueryVariables = Exact<{ [key: string]: never; }>;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export type EBoekhoudenConfigQuery = { __typename?: 'Query', eBoekhoudenConfig?: { __typename?: 'EBoekhoudenConfig', enabled: boolean, username: string, secret1: string, secret2: string, account: string, contraAccount: string } | null };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag';
|
|
2
|
-
|
|
3
|
-
export const updateEBoekhoudenConfigMutation = gql`
|
|
4
|
-
mutation updateEBoekhoudenConfig($input: EBoekhoudenConfigInput!) {
|
|
5
|
-
updateEBoekhoudenConfig(input: $input) {
|
|
6
|
-
enabled
|
|
7
|
-
username
|
|
8
|
-
secret1
|
|
9
|
-
secret2
|
|
10
|
-
account
|
|
11
|
-
contraAccount
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
export const eBoekhoudenConfigQuery = gql`
|
|
17
|
-
query eBoekhoudenConfig {
|
|
18
|
-
eBoekhoudenConfig {
|
|
19
|
-
enabled
|
|
20
|
-
username
|
|
21
|
-
secret1
|
|
22
|
-
secret2
|
|
23
|
-
account
|
|
24
|
-
contraAccount
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`;
|