@aloma.io/integration-sdk 3.8.54 → 3.8.56

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 (35) hide show
  1. package/MULTI_RESOURCE_GUIDE.md +24 -21
  2. package/OPENAPI_TO_CONNECTOR.md +146 -16
  3. package/README.md +62 -10
  4. package/build/cli.mjs +122 -33
  5. package/build/openapi-to-connector.d.mts +92 -11
  6. package/build/openapi-to-connector.mjs +968 -168
  7. package/package.json +3 -1
  8. package/src/cli.mts +140 -37
  9. package/src/openapi-to-connector.mts +1092 -176
  10. package/test/scenarios/README.md +148 -0
  11. package/test/scenarios/complex/expected/controller.mts +271 -0
  12. package/test/scenarios/complex/expected/orders-resource.mts +264 -0
  13. package/test/scenarios/complex/expected/products-resource.mts +239 -0
  14. package/test/scenarios/complex/specs/orders.json +362 -0
  15. package/test/scenarios/complex/specs/products.json +308 -0
  16. package/test/scenarios/simple/expected-controller.mts +60 -0
  17. package/test/scenarios/simple/simple-api.json +39 -0
  18. package/test/scenarios.test.mts +286 -0
  19. package/test/verify-scenarios.mjs +298 -0
  20. package/examples/api-without-servers.json +0 -32
  21. package/examples/companies-resource-class.mts +0 -310
  22. package/examples/companies-resource.mts +0 -310
  23. package/examples/complete-example.sh +0 -116
  24. package/examples/create-hubspot-connector.sh +0 -33
  25. package/examples/generate-connector.sh +0 -35
  26. package/examples/generated-controller.mts +0 -81
  27. package/examples/hubspot-companies.json +0 -1889
  28. package/examples/hubspot-contacts.json +0 -1919
  29. package/examples/hubspot-controller-individual-params.mts +0 -323
  30. package/examples/hubspot-controller-with-implementation.mts +0 -315
  31. package/examples/hubspot-controller.mts +0 -192
  32. package/examples/hubspot-lists.json +0 -5525
  33. package/examples/main-controller-with-resources.mts +0 -35
  34. package/examples/stripe.json +0 -182829
  35. package/examples/utility-click.json +0 -8992
@@ -1,35 +0,0 @@
1
- import {AbstractController} from '@aloma.io/integration-sdk';
2
- import CompaniesResource from './companies-resource-class.mts';
3
- // import DealsResource from './deals-resource-class.mts';
4
- // import ContactsResource from './contacts-resource-class.mts';
5
-
6
- export default class Controller extends AbstractController {
7
- companies: CompaniesResource;
8
- // deals: DealsResource;
9
- // contacts: ContactsResource;
10
-
11
- constructor(fetcher: any) {
12
- super(fetcher);
13
-
14
- // Each resource extends AbstractController, so they have access to this.api
15
- this.companies = new CompaniesResource(fetcher);
16
- // this.deals = new DealsResource(fetcher);
17
- // this.contacts = new ContactsResource(fetcher);
18
- }
19
- }
20
-
21
- /**
22
- * Usage example:
23
- *
24
- * const controller = new Controller(fetcher);
25
- *
26
- * // Now you can use organized resource methods:
27
- * await controller.companies.create({ name: 'Acme Corp' });
28
- * await controller.companies.getPage(10, 'cursor123');
29
- * await controller.companies.getById('12345');
30
- *
31
- * // When you add more resources:
32
- * // await controller.deals.list(20);
33
- * // await controller.contacts.search({ email: 'test@example.com' });
34
- */
35
-