@daffodil/driver 0.66.1 → 0.68.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/{esm2020 → esm2022}/http-client-cache/noop.service.mjs +4 -4
- package/{esm2020 → esm2022}/magento/graphql/cache.service.mjs +6 -6
- package/{esm2020 → esm2022}/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.mjs +6 -6
- package/esm2022/magento/magento.module.mjs +26 -0
- package/{esm2020 → esm2022}/magento/testing/factories/discount.factory.mjs +5 -5
- package/{esm2020 → esm2022}/magento/testing/factories/money.factory.mjs +5 -5
- package/{esm2020 → esm2022}/magento/testing/factories/page-info.factory.mjs +5 -5
- package/{fesm2015 → fesm2022}/daffodil-driver-magento-testing.mjs +12 -12
- package/{fesm2020 → fesm2022}/daffodil-driver-magento-testing.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/daffodil-driver-magento.mjs +19 -19
- package/{fesm2020 → fesm2022}/daffodil-driver-magento.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/daffodil-driver.mjs +3 -3
- package/{fesm2020 → fesm2022}/daffodil-driver.mjs.map +1 -1
- package/package.json +1 -1
- package/esm2020/magento/magento.module.mjs +0 -26
- package/fesm2015/daffodil-driver-hubspot.mjs.map +0 -1
- package/fesm2015/daffodil-driver-magento-testing.mjs.map +0 -1
- package/fesm2015/daffodil-driver-magento.mjs +0 -528
- package/fesm2015/daffodil-driver-magento.mjs.map +0 -1
- package/fesm2015/daffodil-driver.mjs.map +0 -1
- package/fesm2020/daffodil-driver-hubspot.mjs +0 -56
- package/fesm2020/daffodil-driver-magento-testing.mjs +0 -79
- package/fesm2020/daffodil-driver.mjs +0 -53
- /package/{esm2020 → esm2022}/daffodil-driver.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/bad-input.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/codes.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/network-error.class.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/http-client-cache/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/http-client-cache/service.token.mjs +0 -0
- /package/{esm2020 → esm2022}/http-client-cache/service.type.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/daffodil-driver-hubspot.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/hubspot-forms.provider.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/hubspot-forms.service.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/index.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/models/config.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/models/hubspot-request.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/models/hubspot-response.mjs +0 -0
- /package/{esm2020 → esm2022}/hubspot/transformers/json-builder.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/daffodil-driver-magento.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/errors/error.class.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/errors/network-error.class.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/errors/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/errors/transform-graphql.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/errors/transform.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/fragments/money.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/fragments/page-info.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/fragments/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/graphql/cacheable-operations/cacheable-operations-token.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/graphql/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/graphql/type-policies.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/index.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/models/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/models/responses/discount.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/models/responses/filter-input.type.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/models/responses/money.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/models/responses/page-info.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/models/responses/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/schema/introspection.json +0 -0
- /package/{esm2020 → esm2022}/magento/schema/schema.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/testing/daffodil-driver-magento-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/testing/factories/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/transforms/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/transforms/responses/page-info.mjs +0 -0
- /package/{esm2020 → esm2022}/magento/transforms/responses/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/models/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/models/response.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/{fesm2015 → fesm2022}/daffodil-driver-hubspot.mjs +0 -0
- /package/{fesm2020 → fesm2022}/daffodil-driver-hubspot.mjs.map +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const jsonBuilder = (payload) => Object.keys(payload).map((key) => ({ name: key, value: payload[key] }));
|
|
2
|
-
|
|
3
|
-
class DaffHubspotFormsService {
|
|
4
|
-
constructor(http, document, route, title, config) {
|
|
5
|
-
this.http = http;
|
|
6
|
-
this.document = document;
|
|
7
|
-
this.route = route;
|
|
8
|
-
this.title = title;
|
|
9
|
-
this.config = config;
|
|
10
|
-
}
|
|
11
|
-
submit(payload) {
|
|
12
|
-
return this.http.post(this.generateUrl(this.config.portalId, this.config.guid, this.config.version), this.makeRequest(payload));
|
|
13
|
-
}
|
|
14
|
-
makeRequest(payload) {
|
|
15
|
-
return {
|
|
16
|
-
fields: [
|
|
17
|
-
...jsonBuilder(payload),
|
|
18
|
-
],
|
|
19
|
-
context: {
|
|
20
|
-
hutk: this.getCookie(),
|
|
21
|
-
pageUri: this.getPageURI(),
|
|
22
|
-
pageName: this.title.getTitle(),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
generateUrl(portalId, guid, version) {
|
|
27
|
-
if (version === undefined) {
|
|
28
|
-
version = 'v3';
|
|
29
|
-
}
|
|
30
|
-
return 'https://api.hsforms.com/submissions/' + version + '/integration/submit/'
|
|
31
|
-
+ portalId + '/' + guid;
|
|
32
|
-
}
|
|
33
|
-
getCookie() {
|
|
34
|
-
if (!this.document) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
const name = 'hubspotutk';
|
|
38
|
-
const v = this.document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
|
|
39
|
-
return v ? v[2] : null;
|
|
40
|
-
}
|
|
41
|
-
getPageURI() {
|
|
42
|
-
if (!this.route) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
return this.route.url;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const daffHubspotFormsServiceFactory = (http, document, router, title, config) => new DaffHubspotFormsService(http, document, router, title, config);
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Generated bundle index. Do not edit.
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
export { DaffHubspotFormsService, daffHubspotFormsServiceFactory };
|
|
56
|
-
//# sourceMappingURL=daffodil-driver-hubspot.mjs.map
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { faker } from '@faker-js/faker/locale/en_US';
|
|
4
|
-
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
5
|
-
|
|
6
|
-
class MockMagentoMoney {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.__typename = 'Money';
|
|
9
|
-
this.value = faker.datatype.number({ min: 1, max: 10000 });
|
|
10
|
-
this.currency = faker.finance.currencyCode();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
;
|
|
14
|
-
class MagentoMoneyFactory extends DaffModelFactory {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(MockMagentoMoney);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
MagentoMoneyFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
20
|
-
MagentoMoneyFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoMoneyFactory, providedIn: 'root' });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoMoneyFactory, decorators: [{
|
|
22
|
-
type: Injectable,
|
|
23
|
-
args: [{
|
|
24
|
-
providedIn: 'root',
|
|
25
|
-
}]
|
|
26
|
-
}], ctorParameters: function () { return []; } });
|
|
27
|
-
|
|
28
|
-
class MockMagentoDiscount {
|
|
29
|
-
constructor() {
|
|
30
|
-
this.__typename = 'Discount';
|
|
31
|
-
this.amount = this.money();
|
|
32
|
-
this.label = faker.random.word();
|
|
33
|
-
}
|
|
34
|
-
money() {
|
|
35
|
-
return (new MagentoMoneyFactory()).create();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
;
|
|
39
|
-
class MagentoDiscountFactory extends DaffModelFactory {
|
|
40
|
-
constructor() {
|
|
41
|
-
super(MockMagentoDiscount);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
MagentoDiscountFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoDiscountFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
-
MagentoDiscountFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoDiscountFactory, providedIn: 'root' });
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoDiscountFactory, decorators: [{
|
|
47
|
-
type: Injectable,
|
|
48
|
-
args: [{
|
|
49
|
-
providedIn: 'root',
|
|
50
|
-
}]
|
|
51
|
-
}], ctorParameters: function () { return []; } });
|
|
52
|
-
|
|
53
|
-
class MockMagentoSearchResultPageInfo {
|
|
54
|
-
constructor() {
|
|
55
|
-
this.current_page = 1;
|
|
56
|
-
this.page_size = faker.datatype.number(100);
|
|
57
|
-
this.total_pages = faker.datatype.number(100);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
class MagentoSearchResultPageInfoFactory extends DaffModelFactory {
|
|
61
|
-
constructor() {
|
|
62
|
-
super(MockMagentoSearchResultPageInfo);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
MagentoSearchResultPageInfoFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoSearchResultPageInfoFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
66
|
-
MagentoSearchResultPageInfoFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoSearchResultPageInfoFactory, providedIn: 'root' });
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MagentoSearchResultPageInfoFactory, decorators: [{
|
|
68
|
-
type: Injectable,
|
|
69
|
-
args: [{
|
|
70
|
-
providedIn: 'root',
|
|
71
|
-
}]
|
|
72
|
-
}], ctorParameters: function () { return []; } });
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Generated bundle index. Do not edit.
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
export { MagentoDiscountFactory, MagentoMoneyFactory, MagentoSearchResultPageInfoFactory };
|
|
79
|
-
//# sourceMappingURL=daffodil-driver-magento-testing.mjs.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, InjectionToken, inject } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
var DaffDriverErrorCodes;
|
|
6
|
-
(function (DaffDriverErrorCodes) {
|
|
7
|
-
DaffDriverErrorCodes["BAD_INPUT"] = "DAFF_BAD_INPUT";
|
|
8
|
-
})(DaffDriverErrorCodes || (DaffDriverErrorCodes = {}));
|
|
9
|
-
|
|
10
|
-
class DaffBadInputError extends DaffInheritableError {
|
|
11
|
-
constructor(message) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.message = message;
|
|
14
|
-
this.code = DaffDriverErrorCodes.BAD_INPUT;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';
|
|
19
|
-
/**
|
|
20
|
-
* An error thrown when the a driver encounters a problem with network connectivity.
|
|
21
|
-
*/
|
|
22
|
-
class DaffDriverNetworkError extends DaffInheritableError {
|
|
23
|
-
constructor(message) {
|
|
24
|
-
super(message);
|
|
25
|
-
this.code = DAFF_DRIVER_NETWORK_ERROR_CODE;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* A noop service. Always does nothing for every single method.
|
|
31
|
-
*
|
|
32
|
-
* @inheritdoc
|
|
33
|
-
*/
|
|
34
|
-
class DaffDriverHttpClientCacheNoopService {
|
|
35
|
-
reset() { }
|
|
36
|
-
}
|
|
37
|
-
DaffDriverHttpClientCacheNoopService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
38
|
-
DaffDriverHttpClientCacheNoopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, providedIn: 'root' });
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, decorators: [{
|
|
40
|
-
type: Injectable,
|
|
41
|
-
args: [{
|
|
42
|
-
providedIn: 'root',
|
|
43
|
-
}]
|
|
44
|
-
}] });
|
|
45
|
-
|
|
46
|
-
const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE = new InjectionToken('DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE', { factory: () => inject(DaffDriverHttpClientCacheNoopService) });
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Generated bundle index. Do not edit.
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
export { DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE, DAFF_DRIVER_NETWORK_ERROR_CODE, DaffBadInputError, DaffDriverErrorCodes, DaffDriverHttpClientCacheNoopService, DaffDriverNetworkError };
|
|
53
|
-
//# sourceMappingURL=daffodil-driver.mjs.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{esm2020 → esm2022}/magento/graphql/cacheable-operations/cacheable-operations-token.mjs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|