@membranehq/sdk 0.6.0 → 0.7.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 (54) hide show
  1. package/dist/bundle.d.ts +177 -804
  2. package/dist/bundle.js +23 -19
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/action-instances-accessors.d.ts +8 -8
  5. package/dist/dts/accessors/actions-accessors.d.ts +7 -7
  6. package/dist/dts/accessors/app-data-schema-instances-accessors.d.ts +3 -3
  7. package/dist/dts/accessors/app-data-schemas-accessors.d.ts +3 -3
  8. package/dist/dts/accessors/app-event-subscriptions-accessors.d.ts +3 -3
  9. package/dist/dts/accessors/app-event-types-accessors.d.ts +3 -3
  10. package/dist/dts/accessors/base-accessors.d.ts +8 -8
  11. package/dist/dts/accessors/connections-accessors.d.ts +8 -8
  12. package/dist/dts/accessors/customers-accessors.d.ts +5 -5
  13. package/dist/dts/accessors/data-link-table-instances-accessors.d.ts +3 -3
  14. package/dist/dts/accessors/data-link-tables-accessors.d.ts +3 -3
  15. package/dist/dts/accessors/data-sources-accessors.d.ts +14 -14
  16. package/dist/dts/accessors/external-event-subscriptions-accessors.d.ts +3 -3
  17. package/dist/dts/accessors/field-mapping-instances-accessors.d.ts +7 -7
  18. package/dist/dts/accessors/field-mappings-accessors.d.ts +7 -7
  19. package/dist/dts/accessors/flow-instances-accessors.d.ts +8 -8
  20. package/dist/dts/accessors/flow-runs-accessors.d.ts +3 -3
  21. package/dist/dts/accessors/flows-accessors.d.ts +7 -7
  22. package/dist/dts/accessors/integrations-accessors.d.ts +3 -3
  23. package/dist/dts/accessors/scenarios-accessors.d.ts +3 -3
  24. package/dist/dts/accessors/screens-accessors.d.ts +3 -3
  25. package/dist/dts/api-client.d.ts +3 -3
  26. package/dist/dts/auth/accessors.d.ts +2 -2
  27. package/dist/dts/client.d.ts +5 -5
  28. package/dist/dts/data-builder/index.d.ts +1 -1
  29. package/dist/dts/data-schema/arbitrary-fields.test.d.ts +1 -0
  30. package/dist/dts/data-schema/types.d.ts +1 -0
  31. package/dist/dts/error-tools/index.d.ts +1 -1
  32. package/dist/dts/errors/index.d.ts +14 -14
  33. package/dist/dts/formulas/base.d.ts +3 -1
  34. package/dist/dts/index.d.ts +2 -1
  35. package/dist/dts/index.umd.d.ts +2 -2
  36. package/dist/dts/integration-elements/connection-level-element.accessor.d.ts +5 -5
  37. package/dist/dts/integration-elements/integration-level-element.accessor.d.ts +5 -5
  38. package/dist/dts/orgs/types.d.ts +1 -0
  39. package/dist/dts/workspace-elements/api/action-instances-api.d.ts +0 -3
  40. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +20 -20
  41. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +40 -40
  42. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +0 -12
  43. package/dist/dts/workspace-elements/api/flows-api.d.ts +10 -623
  44. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +0 -3
  45. package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +12 -12
  46. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +0 -3
  47. package/dist/dts/workspace-elements/errors.d.ts +2 -2
  48. package/dist/index.d.ts +212 -842
  49. package/dist/index.js +84 -73
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.module.d.mts +212 -842
  52. package/dist/index.module.mjs +79 -69
  53. package/dist/index.module.mjs.map +1 -1
  54. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.IntegrationAppClient = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MembraneClient = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
7
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -11299,78 +11299,78 @@
11299
11299
  }
11300
11300
  }
11301
11301
  }
11302
- class IntegrationAppError extends Error {
11302
+ class MembraneError extends Error {
11303
11303
  constructor(arg) {
11304
11304
  const errorData = new ErrorData(arg);
11305
11305
  super(errorData.message);
11306
- this.isIntegrationAppError = true;
11306
+ this.isMembraneError = true;
11307
11307
  this.data = errorData;
11308
11308
  if (!this.data.type) {
11309
11309
  this.data.type = ErrorType.INTERNAL;
11310
11310
  }
11311
11311
  }
11312
11312
  }
11313
- class InternalError extends IntegrationAppError {
11313
+ class InternalError extends MembraneError {
11314
11314
  constructor(arg) {
11315
11315
  super(arg);
11316
11316
  this.data.type = ErrorType.INTERNAL;
11317
11317
  }
11318
11318
  }
11319
- class BadRequestError extends IntegrationAppError {
11319
+ class BadRequestError extends MembraneError {
11320
11320
  constructor(arg) {
11321
11321
  super(arg);
11322
11322
  this.data.type = ErrorType.BAD_REQUEST;
11323
11323
  }
11324
11324
  }
11325
- class ConcurrencyError extends IntegrationAppError {
11325
+ class ConcurrencyError extends MembraneError {
11326
11326
  constructor(arg) {
11327
11327
  super(arg);
11328
11328
  this.data.type = ErrorType.CONCURRENCY;
11329
11329
  }
11330
11330
  }
11331
- class ConfigurationError extends IntegrationAppError {
11331
+ class ConfigurationError extends MembraneError {
11332
11332
  constructor(arg) {
11333
11333
  super(arg);
11334
11334
  this.data.type = ErrorType.CONFIGURATION;
11335
11335
  }
11336
11336
  }
11337
- class FlowInstanceSetupError extends IntegrationAppError {
11337
+ class FlowInstanceSetupError extends MembraneError {
11338
11338
  constructor(arg) {
11339
11339
  super(arg);
11340
11340
  this.data.type = ErrorType.FLOW_INSTANCE_SETUP;
11341
11341
  }
11342
11342
  }
11343
- class FlowRunError extends IntegrationAppError {
11343
+ class FlowRunError extends MembraneError {
11344
11344
  constructor(arg) {
11345
11345
  super(arg);
11346
11346
  this.data.type = ErrorType.FLOW_RUN;
11347
11347
  }
11348
11348
  }
11349
- class ActionRunError extends IntegrationAppError {
11349
+ class ActionRunError extends MembraneError {
11350
11350
  constructor(arg) {
11351
11351
  super(arg);
11352
11352
  this.data.type = ErrorType.ACTION_RUN;
11353
11353
  }
11354
11354
  }
11355
- class ActionInstanceSetupError extends IntegrationAppError {
11355
+ class ActionInstanceSetupError extends MembraneError {
11356
11356
  constructor(arg) {
11357
11357
  super(arg);
11358
11358
  this.data.type = ErrorType.ACTION_INSTANCE_SETUP;
11359
11359
  }
11360
11360
  }
11361
- class UnitRunError extends IntegrationAppError {
11361
+ class UnitRunError extends MembraneError {
11362
11362
  constructor(arg) {
11363
11363
  super(arg);
11364
11364
  this.data.type = ErrorType.UNIT_RUN;
11365
11365
  }
11366
11366
  }
11367
- class ConnectionError extends IntegrationAppError {
11367
+ class ConnectionError extends MembraneError {
11368
11368
  constructor(arg) {
11369
11369
  super(arg);
11370
11370
  this.data.type = ErrorType.CONNECTION;
11371
11371
  }
11372
11372
  }
11373
- class CustomCodeError extends IntegrationAppError {
11373
+ class CustomCodeError extends MembraneError {
11374
11374
  constructor(arg) {
11375
11375
  super(arg);
11376
11376
  this.data.type = ErrorType.CUSTOM_CODE;
@@ -12123,7 +12123,7 @@
12123
12123
  onResolve(message.connection);
12124
12124
  }
12125
12125
  if (message.type == 'newConnectionFailure') {
12126
- const error = new IntegrationAppError((_a = message.errorData) !== null && _a !== void 0 ? _a : message.error);
12126
+ const error = new MembraneError((_a = message.errorData) !== null && _a !== void 0 ? _a : message.error);
12127
12127
  onReject(error);
12128
12128
  }
12129
12129
  onFinally();
@@ -16293,7 +16293,7 @@
16293
16293
  LogRecordType["API"] = "api-request";
16294
16294
  })(LogRecordType || (LogRecordType = {}));
16295
16295
 
16296
- class DependencyError extends IntegrationAppError {
16296
+ class DependencyError extends MembraneError {
16297
16297
  constructor(arg, workspaceElementReference) {
16298
16298
  super(arg);
16299
16299
  this.data.type = ErrorType.DEPENDENCY_ERROR;
@@ -16363,7 +16363,7 @@
16363
16363
  }
16364
16364
  return payload;
16365
16365
  }
16366
- class IntegrationAppApiClient {
16366
+ class MembraneApiClient {
16367
16367
  constructor({ uiUri, apiUri, accessToken, token, fetchToken, fetchCredentials, credentials, } = {}) {
16368
16368
  this.apiUri = apiUri !== null && apiUri !== void 0 ? apiUri : DEFAULT_API_URI;
16369
16369
  this.uiUri = uiUri !== null && uiUri !== void 0 ? uiUri : DEFAULT_UI_URI;
@@ -16478,7 +16478,7 @@
16478
16478
  }
16479
16479
  }
16480
16480
 
16481
- class IntegrationAppClient extends IntegrationAppApiClient {
16481
+ class MembraneClient extends MembraneApiClient {
16482
16482
  constructor(options) {
16483
16483
  super(options);
16484
16484
  }
@@ -16628,7 +16628,11 @@
16628
16628
  }
16629
16629
  }
16630
16630
 
16631
- return IntegrationAppClient;
16631
+ return MembraneClient;
16632
16632
 
16633
16633
  }));
16634
+ // Backward compatibility alias
16635
+ if (typeof window !== "undefined" && window.MembraneClient) {
16636
+ window.IntegrationAppClient = window.MembraneClient;
16637
+ }
16634
16638
  //# sourceMappingURL=bundle.js.map