@daffodil/driver 0.39.13 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/daffodil-driver.d.ts +1 -0
  2. package/{esm2015/daffodil-driver.js → esm2020/daffodil-driver.mjs} +0 -0
  3. package/{esm2015/errors/bad-input.js → esm2020/errors/bad-input.mjs} +0 -0
  4. package/{esm2015/errors/public_api.js → esm2020/errors/public_api.mjs} +0 -0
  5. package/{esm2015/hubspot/daffodil-driver-hubspot.js → esm2020/hubspot/daffodil-driver-hubspot.mjs} +0 -0
  6. package/{esm2015/hubspot/hubspot-forms.provider.js → esm2020/hubspot/hubspot-forms.provider.mjs} +0 -0
  7. package/{esm2015/hubspot/hubspot-forms.service.js → esm2020/hubspot/hubspot-forms.service.mjs} +0 -0
  8. package/{esm2015/hubspot/index.js → esm2020/hubspot/index.mjs} +0 -0
  9. package/{esm2015/hubspot/models/config.js → esm2020/hubspot/models/config.mjs} +0 -0
  10. package/{esm2015/hubspot/models/hubspot-request.js → esm2020/hubspot/models/hubspot-request.mjs} +0 -0
  11. package/{esm2015/hubspot/models/hubspot-response.js → esm2020/hubspot/models/hubspot-response.mjs} +0 -0
  12. package/{esm2015/hubspot/transformers/json-builder.js → esm2020/hubspot/transformers/json-builder.mjs} +0 -0
  13. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  14. package/{esm2015/magento/daffodil-driver-magento.js → esm2020/magento/daffodil-driver-magento.mjs} +0 -0
  15. package/{esm2015/magento/errors/error.class.js → esm2020/magento/errors/error.class.mjs} +0 -0
  16. package/{esm2015/magento/errors/public_api.js → esm2020/magento/errors/public_api.mjs} +0 -0
  17. package/{esm2015/magento/errors/transform-graphql.js → esm2020/magento/errors/transform-graphql.mjs} +0 -0
  18. package/{esm2015/magento/errors/transform.js → esm2020/magento/errors/transform.mjs} +0 -0
  19. package/esm2020/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.mjs +34 -0
  20. package/{esm2015/magento/graphql/cacheable-operations/cacheable-operations-token.js → esm2020/magento/graphql/cacheable-operations/cacheable-operations-token.mjs} +0 -0
  21. package/{esm2015/magento/graphql/public_api.js → esm2020/magento/graphql/public_api.mjs} +0 -0
  22. package/{esm2015/magento/index.js → esm2020/magento/index.mjs} +0 -0
  23. package/{esm2015/magento/models/public_api.js → esm2020/magento/models/public_api.mjs} +0 -0
  24. package/{esm2015/magento/models/responses/discount.js → esm2020/magento/models/responses/discount.mjs} +0 -0
  25. package/{esm2015/magento/models/responses/money.js → esm2020/magento/models/responses/money.mjs} +0 -0
  26. package/{esm2015/magento/models/responses/public_api.js → esm2020/magento/models/responses/public_api.mjs} +0 -0
  27. package/{esm2015 → esm2020}/magento/schema/introspection.json +0 -0
  28. package/{esm2015/magento/schema/schema.js → esm2020/magento/schema/schema.mjs} +0 -0
  29. package/{esm2015/magento/testing/daffodil-driver-magento-testing.js → esm2020/magento/testing/daffodil-driver-magento-testing.mjs} +0 -0
  30. package/esm2020/magento/testing/factories/discount.factory.mjs +30 -0
  31. package/esm2020/magento/testing/factories/money.factory.mjs +26 -0
  32. package/{esm2015/magento/testing/factories/public_api.js → esm2020/magento/testing/factories/public_api.mjs} +0 -0
  33. package/{esm2015/magento/testing/index.js → esm2020/magento/testing/index.mjs} +0 -0
  34. package/{esm2015/models/public_api.js → esm2020/models/public_api.mjs} +0 -0
  35. package/{esm2015/models/response.interface.js → esm2020/models/response.interface.mjs} +0 -0
  36. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  37. package/fesm2015/{daffodil-driver-hubspot.js → daffodil-driver-hubspot.mjs} +1 -1
  38. package/fesm2015/daffodil-driver-hubspot.mjs.map +1 -0
  39. package/fesm2015/daffodil-driver-magento-testing.mjs +58 -0
  40. package/fesm2015/daffodil-driver-magento-testing.mjs.map +1 -0
  41. package/fesm2015/daffodil-driver-magento.mjs +200 -0
  42. package/fesm2015/daffodil-driver-magento.mjs.map +1 -0
  43. package/fesm2015/{daffodil-driver.js → daffodil-driver.mjs} +1 -1
  44. package/fesm2015/daffodil-driver.mjs.map +1 -0
  45. package/fesm2020/daffodil-driver-hubspot.mjs +56 -0
  46. package/fesm2020/daffodil-driver-hubspot.mjs.map +1 -0
  47. package/fesm2020/daffodil-driver-magento-testing.mjs +58 -0
  48. package/fesm2020/daffodil-driver-magento-testing.mjs.map +1 -0
  49. package/{fesm2015/daffodil-driver-magento.js → fesm2020/daffodil-driver-magento.mjs} +14 -11
  50. package/fesm2020/daffodil-driver-magento.mjs.map +1 -0
  51. package/fesm2020/daffodil-driver.mjs +16 -0
  52. package/fesm2020/daffodil-driver.mjs.map +1 -0
  53. package/hubspot/daffodil-driver-hubspot.d.ts +1 -0
  54. package/hubspot/package.json +5 -6
  55. package/magento/daffodil-driver-magento.d.ts +1 -0
  56. package/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.d.ts +3 -0
  57. package/magento/package.json +5 -6
  58. package/magento/testing/daffodil-driver-magento-testing.d.ts +1 -0
  59. package/magento/testing/factories/discount.factory.d.ts +3 -0
  60. package/magento/testing/factories/money.factory.d.ts +3 -0
  61. package/magento/testing/package.json +5 -6
  62. package/package.json +46 -10
  63. package/bundles/daffodil-driver-hubspot.umd.js +0 -384
  64. package/bundles/daffodil-driver-hubspot.umd.js.map +0 -1
  65. package/bundles/daffodil-driver-hubspot.umd.min.js +0 -16
  66. package/bundles/daffodil-driver-hubspot.umd.min.js.map +0 -1
  67. package/bundles/daffodil-driver-magento-testing.umd.js +0 -386
  68. package/bundles/daffodil-driver-magento-testing.umd.js.map +0 -1
  69. package/bundles/daffodil-driver-magento-testing.umd.min.js +0 -16
  70. package/bundles/daffodil-driver-magento-testing.umd.min.js.map +0 -1
  71. package/bundles/daffodil-driver-magento.umd.js +0 -536
  72. package/bundles/daffodil-driver-magento.umd.js.map +0 -1
  73. package/bundles/daffodil-driver-magento.umd.min.js +0 -2
  74. package/bundles/daffodil-driver-magento.umd.min.js.map +0 -1
  75. package/bundles/daffodil-driver.umd.js +0 -345
  76. package/bundles/daffodil-driver.umd.js.map +0 -1
  77. package/bundles/daffodil-driver.umd.min.js +0 -16
  78. package/bundles/daffodil-driver.umd.min.js.map +0 -1
  79. package/daffodil-driver.metadata.json +0 -1
  80. package/esm2015/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.js +0 -33
  81. package/esm2015/magento/testing/factories/discount.factory.js +0 -29
  82. package/esm2015/magento/testing/factories/money.factory.js +0 -25
  83. package/fesm2015/daffodil-driver-hubspot.js.map +0 -1
  84. package/fesm2015/daffodil-driver-magento-testing.js +0 -55
  85. package/fesm2015/daffodil-driver-magento-testing.js.map +0 -1
  86. package/fesm2015/daffodil-driver-magento.js.map +0 -1
  87. package/fesm2015/daffodil-driver.js.map +0 -1
  88. package/hubspot/daffodil-driver-hubspot.metadata.json +0 -1
  89. package/magento/daffodil-driver-magento.metadata.json +0 -1
  90. package/magento/testing/daffodil-driver-magento-testing.metadata.json +0 -1
@@ -0,0 +1,58 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import * as 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.random.word();
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: "13.3.0", ngImport: i0, type: MagentoMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20
+ MagentoMoneyFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoMoneyFactory, providedIn: 'root' });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", 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: "13.3.0", ngImport: i0, type: MagentoDiscountFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
+ MagentoDiscountFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoDiscountFactory, providedIn: 'root' });
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoDiscountFactory, decorators: [{
47
+ type: Injectable,
48
+ args: [{
49
+ providedIn: 'root',
50
+ }]
51
+ }], ctorParameters: function () { return []; } });
52
+
53
+ /**
54
+ * Generated bundle index. Do not edit.
55
+ */
56
+
57
+ export { MagentoDiscountFactory, MagentoMoneyFactory };
58
+ //# sourceMappingURL=daffodil-driver-magento-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-driver-magento-testing.mjs","sources":["../../../libs/driver/magento/testing/src/factories/money.factory.ts","../../../libs/driver/magento/testing/src/factories/discount.factory.ts","../../../libs/driver/magento/testing/src/daffodil-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoMoney } from '@daffodil/driver/magento';\n\nexport class MockMagentoMoney implements MagentoMoney {\n\t__typename = 'Money';\n value = faker.datatype.number({ min: 1, max: 10000 });\n currency = faker.random.word();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoMoneyFactory extends DaffModelFactory<MagentoMoney> {\n constructor() {\n super(MockMagentoMoney);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoDiscount,\n MagentoMoney,\n} from '@daffodil/driver/magento';\n\nimport { MagentoMoneyFactory } from './money.factory';\n\nexport class MockMagentoDiscount implements MagentoDiscount {\n\t__typename = 'Discount';\n amount = this.money();\n label = faker.random.word();\n\n private money(): MagentoMoney {\n return (new MagentoMoneyFactory()).create();\n }\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoDiscountFactory extends DaffModelFactory<MagentoDiscount> {\n constructor() {\n super(MockMagentoDiscount);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAMa,gBAAgB,CAAA;AAA7B,IAAA,WAAA,GAAA;QACC,IAAU,CAAA,UAAA,GAAG,OAAO,CAAC;AACpB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AACtD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAChC;AAAA,CAAA;AAAA,CAAC;AAKI,MAAO,mBAAoB,SAAQ,gBAA8B,CAAA;AACrE,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACzB;;gHAHU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,m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1,5 +1,6 @@
1
1
  import { DaffInheritableError, daffIsError } from '@daffodil/core';
2
- import { InjectionToken, ɵɵdefineInjectable, ɵɵinject, Injectable, Inject } from '@angular/core';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, Injectable, Inject } from '@angular/core';
3
4
  import { ApolloLink } from '@apollo/client/core';
4
5
 
5
6
  var possibleTypes = {
@@ -177,19 +178,21 @@ class DaffMagentoApolloCacheableOperationsLinkGenerator {
177
178
  });
178
179
  }
179
180
  }
180
- DaffMagentoApolloCacheableOperationsLinkGenerator.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoApolloCacheableOperationsLinkGenerator_Factory() { return new DaffMagentoApolloCacheableOperationsLinkGenerator(ɵɵinject(DAFF_MAGENTO_CACHEABLE_OPERATIONS)); }, token: DaffMagentoApolloCacheableOperationsLinkGenerator, providedIn: "root" });
181
- DaffMagentoApolloCacheableOperationsLinkGenerator.decorators = [
182
- { type: Injectable, args: [{
183
- providedIn: 'root',
184
- },] }
185
- ];
186
- DaffMagentoApolloCacheableOperationsLinkGenerator.ctorParameters = () => [
187
- { type: Array, decorators: [{ type: Inject, args: [DAFF_MAGENTO_CACHEABLE_OPERATIONS,] }] }
188
- ];
181
+ DaffMagentoApolloCacheableOperationsLinkGenerator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, deps: [{ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS }], target: i0.ɵɵFactoryTarget.Injectable });
182
+ DaffMagentoApolloCacheableOperationsLinkGenerator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, providedIn: 'root' });
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, decorators: [{
184
+ type: Injectable,
185
+ args: [{
186
+ providedIn: 'root',
187
+ }]
188
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
189
+ type: Inject,
190
+ args: [DAFF_MAGENTO_CACHEABLE_OPERATIONS]
191
+ }] }]; } });
189
192
 
190
193
  /**
191
194
  * Generated bundle index. Do not edit.
192
195
  */
193
196
 
194
197
  export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverMagentoError, DaffMagentoApolloCacheableOperationsLinkGenerator, daffMagentoTransformGraphQlError, daffTransformMagentoError, provideDaffMagentoCacheableOperation, provideManyDaffMagentoCacheableOperations, schema };
195
- //# sourceMappingURL=daffodil-driver-magento.js.map
198
+ //# sourceMappingURL=daffodil-driver-magento.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.ts","../../../libs/driver/magento/src/errors/error.class.ts","../../../libs/driver/magento/src/errors/transform-graphql.ts","../../../libs/driver/magento/src/errors/transform.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/cacheable-operations-token.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const schema = introspectionQueryResultData;\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_MAGENTO_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_ERROR';\n\n/**\n * A very general error thrown when a more specific error type cannot be determined.\n */\nexport class DaffDriverMagentoError extends DaffInheritableError implements DaffError {\n\tpublic readonly code: string = DAFF_DRIVER_MAGENTO_ERROR_CODE;\n\n\tconstructor(message?: string) {\n\t super(message);\n\t}\n}\n","import { GraphQLError } from 'graphql';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\n\nexport function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(\n error: GraphQLError,\n map: T,\n): DaffError {\n const ErrorClass = map[error.extensions.category] || DaffDriverMagentoError;\n\n return new ErrorClass(error.message) ;\n};\n","import {\n DaffError,\n DaffErrorCodeMap,\n daffIsError,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\nimport { daffMagentoTransformGraphQlError } from './transform-graphql';\n\n/**\n * Transforms the passed error according to the lookup in the passed map.\n */\n// TODO: return array of errors\nexport function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError {\n // TODO: handle network errors\n if (error.graphQLErrors) {\n return error.graphQLErrors.map(err => daffMagentoTransformGraphQlError<T>(err, map))[0];\n } else if (daffIsError(error)) {\n return error;\n } else {\n return new DaffDriverMagentoError(error.message);\n }\n};\n","import { InjectionToken } from '@angular/core';\n\n/**\n * A multi-provider injection token of the operation names of magento queries that should\n * be cached. This is needed because queries need to be converted into GET queries in order for Magento\n * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is\n * intended for internal daffodil use only.\n */\nexport const DAFF_MAGENTO_CACHEABLE_OPERATIONS = new InjectionToken<string[]>('DAFF_MAGENTO_CACHEABLE_OPERATIONS', { factory: () => []});\n\n/**\n * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideDaffMagentoCacheableOperation(operationName: string) {\n return {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: operationName,\n multi: true,\n };\n}\n\n/**\n * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideManyDaffMagentoCacheableOperations(...operationNames: string[]) {\n return operationNames.map(name => ({\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: name,\n multi: true,\n }));\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffApolloCacheableOperationLinkGenerator } from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoApolloCacheableOperationsLinkGenerator implements DaffApolloCacheableOperationLinkGenerator {\n constructor(\n\t\t@Inject(DAFF_MAGENTO_CACHEABLE_OPERATIONS) private apolloGetRequests: string[],\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if(this.apolloGetRequests.indexOf(operation.operationName) > -1) {\n operation.setContext({ method: 'GET' });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,MAAM,GAAG;;ACGf,MAAM,8BAA8B,GAAG,4BAA4B;AAE1E;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG/D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHD,IAAI,CAAA,IAAA,GAAW,8BAA8B,CAAC;KAI7D;AACD;;ACPe,SAAA,gCAAgC,CAC9C,KAAmB,EACnB,GAAM,EAAA;AAEN,IAAA,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,sBAAsB,CAAC;AAE5E,IAAA,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAE;AACxC,CAAC;AAAA;;ACPD;;AAEG;AACH;AACgB,SAAA,yBAAyB,CAA6B,KAAU,EAAE,GAAM,EAAA;;IAEtF,IAAI,KAAK,CAAC,aAAa,EAAE;QACvB,OAAO,KAAK,CAAC,aAAa,CAAC,G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ACzC,aAAA;AACD,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5B,SAAC,CAAC,CAAC;KACJ;;AAZU,iDAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iDAAiD,kBAEpD,iCAAiC,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAF9B,iDAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iDAAiD,cAFhD,MAAM,EAAA,CAAA,CAAA;2FAEP,iDAAiD,EAAA,UAAA,EAAA,CAAA;kBAH7D,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;0BAGE,MAAM;2BAAC,iCAAiC,CAAA;;;ACpB3C;;AAEG;;;;"}
@@ -0,0 +1,16 @@
1
+ import { DaffInheritableError } from '@daffodil/core';
2
+
3
+ class DaffBadInputError extends DaffInheritableError {
4
+ constructor(message) {
5
+ super(message);
6
+ this.message = message;
7
+ this.code = 'DAFF_BAD_INPUT';
8
+ }
9
+ }
10
+
11
+ /**
12
+ * Generated bundle index. Do not edit.
13
+ */
14
+
15
+ export { DaffBadInputError };
16
+ //# sourceMappingURL=daffodil-driver.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_BAD_INPUT';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAKM,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,gBAAgB,CAAC;KAI/C;AACF;;ACXD;;AAEG;;;;"}
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@daffodil/driver/hubspot" />
4
5
  export * from './index';
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@daffodil/driver/hubspot",
3
- "main": "../bundles/daffodil-driver-hubspot.umd.js",
4
- "module": "../fesm2015/daffodil-driver-hubspot.js",
5
- "es2015": "../fesm2015/daffodil-driver-hubspot.js",
6
- "esm2015": "../esm2015/hubspot/daffodil-driver-hubspot.js",
7
- "fesm2015": "../fesm2015/daffodil-driver-hubspot.js",
3
+ "module": "../fesm2015/daffodil-driver-hubspot.mjs",
4
+ "es2020": "../fesm2020/daffodil-driver-hubspot.mjs",
5
+ "esm2020": "../esm2020/hubspot/daffodil-driver-hubspot.mjs",
6
+ "fesm2020": "../fesm2020/daffodil-driver-hubspot.mjs",
7
+ "fesm2015": "../fesm2015/daffodil-driver-hubspot.mjs",
8
8
  "typings": "daffodil-driver-hubspot.d.ts",
9
- "metadata": "daffodil-driver-hubspot.metadata.json",
10
9
  "sideEffects": false
11
10
  }
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@daffodil/driver/magento" />
4
5
  export * from './index';
@@ -1,5 +1,6 @@
1
1
  import { ApolloLink } from '@apollo/client/core';
2
2
  import { DaffApolloCacheableOperationLinkGenerator } from '@daffodil/core/graphql';
3
+ import * as i0 from "@angular/core";
3
4
  /**
4
5
  * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
5
6
  *
@@ -9,4 +10,6 @@ export declare class DaffMagentoApolloCacheableOperationsLinkGenerator implement
9
10
  private apolloGetRequests;
10
11
  constructor(apolloGetRequests: string[]);
11
12
  getLink(): ApolloLink;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator>;
12
15
  }
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@daffodil/driver/magento",
3
- "main": "../bundles/daffodil-driver-magento.umd.js",
4
- "module": "../fesm2015/daffodil-driver-magento.js",
5
- "es2015": "../fesm2015/daffodil-driver-magento.js",
6
- "esm2015": "../esm2015/magento/daffodil-driver-magento.js",
7
- "fesm2015": "../fesm2015/daffodil-driver-magento.js",
3
+ "module": "../fesm2015/daffodil-driver-magento.mjs",
4
+ "es2020": "../fesm2020/daffodil-driver-magento.mjs",
5
+ "esm2020": "../esm2020/magento/daffodil-driver-magento.mjs",
6
+ "fesm2020": "../fesm2020/daffodil-driver-magento.mjs",
7
+ "fesm2015": "../fesm2015/daffodil-driver-magento.mjs",
8
8
  "typings": "daffodil-driver-magento.d.ts",
9
- "metadata": "daffodil-driver-magento.metadata.json",
10
9
  "sideEffects": false
11
10
  }
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@daffodil/driver/magento/testing" />
4
5
  export * from './index';
@@ -1,5 +1,6 @@
1
1
  import { DaffModelFactory } from '@daffodil/core/testing';
2
2
  import { MagentoDiscount, MagentoMoney } from '@daffodil/driver/magento';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class MockMagentoDiscount implements MagentoDiscount {
4
5
  __typename: string;
5
6
  amount: MagentoMoney;
@@ -8,4 +9,6 @@ export declare class MockMagentoDiscount implements MagentoDiscount {
8
9
  }
9
10
  export declare class MagentoDiscountFactory extends DaffModelFactory<MagentoDiscount> {
10
11
  constructor();
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<MagentoDiscountFactory, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<MagentoDiscountFactory>;
11
14
  }
@@ -1,5 +1,6 @@
1
1
  import { DaffModelFactory } from '@daffodil/core/testing';
2
2
  import { MagentoMoney } from '@daffodil/driver/magento';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class MockMagentoMoney implements MagentoMoney {
4
5
  __typename: string;
5
6
  value: any;
@@ -7,4 +8,6 @@ export declare class MockMagentoMoney implements MagentoMoney {
7
8
  }
8
9
  export declare class MagentoMoneyFactory extends DaffModelFactory<MagentoMoney> {
9
10
  constructor();
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<MagentoMoneyFactory, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<MagentoMoneyFactory>;
10
13
  }
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@daffodil/driver/magento/testing",
3
- "main": "../../bundles/daffodil-driver-magento-testing.umd.js",
4
- "module": "../../fesm2015/daffodil-driver-magento-testing.js",
5
- "es2015": "../../fesm2015/daffodil-driver-magento-testing.js",
6
- "esm2015": "../../esm2015/magento/testing/daffodil-driver-magento-testing.js",
7
- "fesm2015": "../../fesm2015/daffodil-driver-magento-testing.js",
3
+ "module": "../../fesm2015/daffodil-driver-magento-testing.mjs",
4
+ "es2020": "../../fesm2020/daffodil-driver-magento-testing.mjs",
5
+ "esm2020": "../../esm2020/magento/testing/daffodil-driver-magento-testing.mjs",
6
+ "fesm2020": "../../fesm2020/daffodil-driver-magento-testing.mjs",
7
+ "fesm2015": "../../fesm2015/daffodil-driver-magento-testing.mjs",
8
8
  "typings": "daffodil-driver-magento-testing.d.ts",
9
- "metadata": "daffodil-driver-magento-testing.metadata.json",
10
9
  "sideEffects": false
11
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daffodil/driver",
3
- "version": "0.39.13",
3
+ "version": "0.40.1",
4
4
  "description": "A consistent, sane api driver that works with different ecommerce systems.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,19 +13,55 @@
13
13
  },
14
14
  "homepage": "https://github.com/graycoreio/daffodil",
15
15
  "peerDependencies": {
16
- "@angular/common": "^11.0.0",
17
- "@angular/core": "^11.0.0",
16
+ "@angular/common": "^13.0.0",
17
+ "@angular/core": "^13.0.0",
18
18
  "rxjs": "6.6.3"
19
19
  },
20
- "main": "bundles/daffodil-driver.umd.js",
21
- "module": "fesm2015/daffodil-driver.js",
22
- "es2015": "fesm2015/daffodil-driver.js",
23
- "esm2015": "esm2015/daffodil-driver.js",
24
- "fesm2015": "fesm2015/daffodil-driver.js",
20
+ "module": "fesm2015/daffodil-driver.mjs",
21
+ "es2020": "fesm2020/daffodil-driver.mjs",
22
+ "esm2020": "esm2020/daffodil-driver.mjs",
23
+ "fesm2020": "fesm2020/daffodil-driver.mjs",
24
+ "fesm2015": "fesm2015/daffodil-driver.mjs",
25
25
  "typings": "daffodil-driver.d.ts",
26
- "metadata": "daffodil-driver.metadata.json",
26
+ "exports": {
27
+ "./package.json": {
28
+ "default": "./package.json"
29
+ },
30
+ ".": {
31
+ "types": "./daffodil-driver.d.ts",
32
+ "esm2020": "./esm2020/daffodil-driver.mjs",
33
+ "es2020": "./fesm2020/daffodil-driver.mjs",
34
+ "es2015": "./fesm2015/daffodil-driver.mjs",
35
+ "node": "./fesm2015/daffodil-driver.mjs",
36
+ "default": "./fesm2020/daffodil-driver.mjs"
37
+ },
38
+ "./hubspot": {
39
+ "types": "./hubspot/daffodil-driver-hubspot.d.ts",
40
+ "esm2020": "./esm2020/hubspot/daffodil-driver-hubspot.mjs",
41
+ "es2020": "./fesm2020/daffodil-driver-hubspot.mjs",
42
+ "es2015": "./fesm2015/daffodil-driver-hubspot.mjs",
43
+ "node": "./fesm2015/daffodil-driver-hubspot.mjs",
44
+ "default": "./fesm2020/daffodil-driver-hubspot.mjs"
45
+ },
46
+ "./magento": {
47
+ "types": "./magento/daffodil-driver-magento.d.ts",
48
+ "esm2020": "./esm2020/magento/daffodil-driver-magento.mjs",
49
+ "es2020": "./fesm2020/daffodil-driver-magento.mjs",
50
+ "es2015": "./fesm2015/daffodil-driver-magento.mjs",
51
+ "node": "./fesm2015/daffodil-driver-magento.mjs",
52
+ "default": "./fesm2020/daffodil-driver-magento.mjs"
53
+ },
54
+ "./magento/testing": {
55
+ "types": "./magento/testing/daffodil-driver-magento-testing.d.ts",
56
+ "esm2020": "./esm2020/magento/testing/daffodil-driver-magento-testing.mjs",
57
+ "es2020": "./fesm2020/daffodil-driver-magento-testing.mjs",
58
+ "es2015": "./fesm2015/daffodil-driver-magento-testing.mjs",
59
+ "node": "./fesm2015/daffodil-driver-magento-testing.mjs",
60
+ "default": "./fesm2020/daffodil-driver-magento-testing.mjs"
61
+ }
62
+ },
27
63
  "sideEffects": false,
28
64
  "dependencies": {
29
- "tslib": "^2.0.0"
65
+ "tslib": "^2.3.0"
30
66
  }
31
67
  }