@membranehq/sdk 0.7.4 → 0.7.5

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 (83) hide show
  1. package/dist/bundle.d.ts +2063 -13949
  2. package/dist/bundle.js +3949 -4253
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +28 -28
  5. package/dist/dts/accessors/integrations-accessors.d.ts +28 -28
  6. package/dist/dts/config/index.d.ts +1 -11
  7. package/dist/dts/date-time/business-day.d.ts +2 -0
  8. package/dist/dts/date-time/business-day.test.d.ts +1 -0
  9. package/dist/dts/date-time/index.d.ts +1 -0
  10. package/dist/dts/entity-repository.d.ts +13 -64
  11. package/dist/dts/http-requests.d.ts +2 -14
  12. package/dist/dts/iframe.d.ts +4 -12
  13. package/dist/dts/scenario-templates/index.d.ts +60 -484
  14. package/dist/dts/workspace-elements/api/action-instances-api.d.ts +17 -248
  15. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +23 -339
  16. package/dist/dts/workspace-elements/api/actions-api.d.ts +52 -639
  17. package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +8 -169
  18. package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +19 -51
  19. package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +15 -325
  20. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +13 -248
  21. package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +28 -90
  22. package/dist/dts/workspace-elements/api/connections-api.d.ts +56 -892
  23. package/dist/dts/workspace-elements/api/customers-api.d.ts +8 -68
  24. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +21 -369
  25. package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +17 -45
  26. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +79 -1341
  27. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +52 -767
  28. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +29 -502
  29. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +29 -506
  30. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +21 -381
  31. package/dist/dts/workspace-elements/api/external-events-api.d.ts +20 -425
  32. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +109 -2321
  33. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +47 -702
  34. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +66 -1229
  35. package/dist/dts/workspace-elements/api/flows-api.d.ts +149 -1836
  36. package/dist/dts/workspace-elements/api/integrations-api.d.ts +45 -287
  37. package/dist/dts/workspace-elements/api/scenarios-api.d.ts +27 -450
  38. package/dist/dts/workspace-elements/api/screens-api.d.ts +11 -31
  39. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +6 -60
  40. package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +3 -28
  41. package/dist/dts/workspace-elements/base/actions/index.d.ts +10 -82
  42. package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +4 -47
  43. package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +3 -36
  44. package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +6 -75
  45. package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +6 -69
  46. package/dist/dts/workspace-elements/base/connections/types.d.ts +11 -56
  47. package/dist/dts/workspace-elements/base/connectors/types.d.ts +1 -11
  48. package/dist/dts/workspace-elements/base/customers/index.d.ts +1 -25
  49. package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +141 -1471
  50. package/dist/dts/workspace-elements/base/data-collections/types.d.ts +1 -29
  51. package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +6 -61
  52. package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +3 -32
  53. package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +60 -973
  54. package/dist/dts/workspace-elements/base/data-sources/index.d.ts +8 -104
  55. package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +4 -26
  56. package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +4 -30
  57. package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +9 -161
  58. package/dist/dts/workspace-elements/base/external-events/types.d.ts +7 -121
  59. package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +9 -76
  60. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +13 -133
  61. package/dist/dts/workspace-elements/base/flow-instances/schemas.d.ts +16 -194
  62. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +15 -132
  63. package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +29 -284
  64. package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +13 -93
  65. package/dist/dts/workspace-elements/base/flows/index.d.ts +20 -240
  66. package/dist/dts/workspace-elements/base/flows/nodes/base.d.ts +7 -56
  67. package/dist/dts/workspace-elements/base/integrations/types.d.ts +23 -539
  68. package/dist/dts/workspace-elements/base/scenarios/index.d.ts +11 -119
  69. package/dist/dts/workspace-elements/base/screens/types.d.ts +6 -31
  70. package/dist/dts/workspace-elements/types.d.ts +15 -153
  71. package/dist/index.browser.d.mts +5926 -24800
  72. package/dist/index.browser.d.ts +5926 -24800
  73. package/dist/index.browser.js +287 -281
  74. package/dist/index.browser.js.map +1 -1
  75. package/dist/index.browser.mjs +285 -279
  76. package/dist/index.browser.mjs.map +1 -1
  77. package/dist/index.node.d.mts +5956 -24840
  78. package/dist/index.node.d.ts +5956 -24840
  79. package/dist/index.node.js +287 -281
  80. package/dist/index.node.js.map +1 -1
  81. package/dist/index.node.mjs +285 -279
  82. package/dist/index.node.mjs.map +1 -1
  83. package/package.json +2 -2
@@ -43,11 +43,34 @@ export declare class ConnectionAccessor {
43
43
  }): Promise<{
44
44
  id: string;
45
45
  name: string;
46
+ userId: string;
47
+ integrationId: string;
46
48
  createdAt: string;
47
49
  updatedAt: string;
48
- integrationId: string;
49
- userId: string;
50
+ isTest?: boolean | undefined;
51
+ disconnected?: boolean | undefined;
52
+ isDefunct?: boolean | undefined;
53
+ state?: import("..").WorkspaceElementState | undefined;
50
54
  error?: import("../errors").ErrorDataSchema | undefined;
55
+ authOptionKey?: string | undefined;
56
+ lastActiveAt?: string | undefined;
57
+ nextCredentialsRefreshAt?: string | undefined;
58
+ archivedAt?: string | undefined;
59
+ isDeactivated?: boolean | undefined;
60
+ meta?: Record<string, any> | undefined;
61
+ user?: {
62
+ id: string;
63
+ name: string;
64
+ internalId: string;
65
+ meta?: Record<string, any> | undefined;
66
+ fields?: Record<string, any> | undefined;
67
+ credentials?: any;
68
+ lastActiveAt?: string | undefined;
69
+ isTest?: boolean | undefined;
70
+ isBillable?: boolean | undefined;
71
+ createdAt?: string | undefined;
72
+ archivedAt?: string | undefined;
73
+ } | undefined;
51
74
  integration?: {
52
75
  id: string;
53
76
  name: string;
@@ -61,12 +84,11 @@ export declare class ConnectionAccessor {
61
84
  revision?: string | undefined;
62
85
  createdAt?: string | undefined;
63
86
  updatedAt?: string | undefined;
64
- archivedAt?: string | undefined;
65
- isDeactivated?: boolean | undefined;
66
- parameters?: any;
67
87
  connectorId?: string | undefined;
68
88
  connectorVersion?: string | undefined;
69
89
  oAuthCallbackUri?: string | undefined;
90
+ parameters?: any;
91
+ archivedAt?: string | undefined;
70
92
  hasMissingParameters?: boolean | undefined;
71
93
  hasDocumentation?: boolean | undefined;
72
94
  hasOperations?: boolean | undefined;
@@ -79,31 +101,9 @@ export declare class ConnectionAccessor {
79
101
  hasUdm?: boolean | undefined;
80
102
  isTest?: boolean | undefined;
81
103
  appUuid?: string | undefined;
104
+ isDeactivated?: boolean | undefined;
82
105
  authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
83
106
  } | undefined;
84
- meta?: Record<string, any> | undefined;
85
- state?: import("..").WorkspaceElementState | undefined;
86
- archivedAt?: string | undefined;
87
- isDeactivated?: boolean | undefined;
88
- authOptionKey?: string | undefined;
89
- user?: {
90
- id: string;
91
- name: string;
92
- internalId: string;
93
- meta?: Record<string, any> | undefined;
94
- createdAt?: string | undefined;
95
- archivedAt?: string | undefined;
96
- credentials?: any;
97
- fields?: Record<string, any> | undefined;
98
- isTest?: boolean | undefined;
99
- lastActiveAt?: string | undefined;
100
- isBillable?: boolean | undefined;
101
- } | undefined;
102
- isTest?: boolean | undefined;
103
- disconnected?: boolean | undefined;
104
- isDefunct?: boolean | undefined;
105
- lastActiveAt?: string | undefined;
106
- nextCredentialsRefreshAt?: string | undefined;
107
107
  } | undefined>;
108
108
  openReconnectUI({}?: OpenConfigurationOptions): Promise<void>;
109
109
  refreshCredentials(): Promise<void>;
@@ -47,11 +47,34 @@ export declare class IntegrationAccessor extends ElementAccessor<Integration, Up
47
47
  })): Promise<{
48
48
  id: string;
49
49
  name: string;
50
+ userId: string;
51
+ integrationId: string;
50
52
  createdAt: string;
51
53
  updatedAt: string;
52
- integrationId: string;
53
- userId: string;
54
+ isTest?: boolean | undefined;
55
+ disconnected?: boolean | undefined;
56
+ isDefunct?: boolean | undefined;
57
+ state?: import("..").WorkspaceElementState | undefined;
54
58
  error?: import("..").ErrorDataSchema | undefined;
59
+ authOptionKey?: string | undefined;
60
+ lastActiveAt?: string | undefined;
61
+ nextCredentialsRefreshAt?: string | undefined;
62
+ archivedAt?: string | undefined;
63
+ isDeactivated?: boolean | undefined;
64
+ meta?: Record<string, any> | undefined;
65
+ user?: {
66
+ id: string;
67
+ name: string;
68
+ internalId: string;
69
+ meta?: Record<string, any> | undefined;
70
+ fields?: Record<string, any> | undefined;
71
+ credentials?: any;
72
+ lastActiveAt?: string | undefined;
73
+ isTest?: boolean | undefined;
74
+ isBillable?: boolean | undefined;
75
+ createdAt?: string | undefined;
76
+ archivedAt?: string | undefined;
77
+ } | undefined;
55
78
  integration?: {
56
79
  id: string;
57
80
  name: string;
@@ -65,12 +88,11 @@ export declare class IntegrationAccessor extends ElementAccessor<Integration, Up
65
88
  revision?: string | undefined;
66
89
  createdAt?: string | undefined;
67
90
  updatedAt?: string | undefined;
68
- archivedAt?: string | undefined;
69
- isDeactivated?: boolean | undefined;
70
- parameters?: any;
71
91
  connectorId?: string | undefined;
72
92
  connectorVersion?: string | undefined;
73
93
  oAuthCallbackUri?: string | undefined;
94
+ parameters?: any;
95
+ archivedAt?: string | undefined;
74
96
  hasMissingParameters?: boolean | undefined;
75
97
  hasDocumentation?: boolean | undefined;
76
98
  hasOperations?: boolean | undefined;
@@ -83,31 +105,9 @@ export declare class IntegrationAccessor extends ElementAccessor<Integration, Up
83
105
  hasUdm?: boolean | undefined;
84
106
  isTest?: boolean | undefined;
85
107
  appUuid?: string | undefined;
108
+ isDeactivated?: boolean | undefined;
86
109
  authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
87
110
  } | undefined;
88
- meta?: Record<string, any> | undefined;
89
- state?: import("..").WorkspaceElementState | undefined;
90
- archivedAt?: string | undefined;
91
- isDeactivated?: boolean | undefined;
92
- authOptionKey?: string | undefined;
93
- user?: {
94
- id: string;
95
- name: string;
96
- internalId: string;
97
- meta?: Record<string, any> | undefined;
98
- createdAt?: string | undefined;
99
- archivedAt?: string | undefined;
100
- credentials?: any;
101
- fields?: Record<string, any> | undefined;
102
- isTest?: boolean | undefined;
103
- lastActiveAt?: string | undefined;
104
- isBillable?: boolean | undefined;
105
- } | undefined;
106
- isTest?: boolean | undefined;
107
- disconnected?: boolean | undefined;
108
- isDefunct?: boolean | undefined;
109
- lastActiveAt?: string | undefined;
110
- nextCredentialsRefreshAt?: string | undefined;
111
111
  } | undefined>;
112
112
  createConnection({ parameters, name }: {
113
113
  parameters?: any;
@@ -5,17 +5,7 @@ export declare const membraneConfigSchema: z.ZodObject<{
5
5
  workspaceSecret: z.ZodString;
6
6
  apiUri: z.ZodOptional<z.ZodString>;
7
7
  testCustomerId: z.ZodOptional<z.ZodString>;
8
- }, "strip", z.ZodTypeAny, {
9
- workspaceKey: string;
10
- workspaceSecret: string;
11
- apiUri?: string | undefined;
12
- testCustomerId?: string | undefined;
13
- }, {
14
- workspaceKey: string;
15
- workspaceSecret: string;
16
- apiUri?: string | undefined;
17
- testCustomerId?: string | undefined;
18
- }>;
8
+ }, z.core.$strip>;
19
9
  export type MembraneConfig = z.infer<typeof membraneConfigSchema>;
20
10
  export type PartialMembraneConfig = Partial<MembraneConfig>;
21
11
  export interface LoadConfigOptions {
@@ -0,0 +1,2 @@
1
+ export declare function isBusinessDay(date: Date): boolean;
2
+ export declare function getBusinessDaysBetween(startDate: Date, endDate: Date): Set<string>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
1
  export * from './parse';
2
+ export * from './business-day';
@@ -1,90 +1,39 @@
1
1
  import { z } from 'zod';
2
- export declare const zodBooleanCoercion: () => z.ZodEffects<z.ZodBoolean, boolean, unknown>;
2
+ export declare const zodBooleanCoercion: () => z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>;
3
3
  export declare const IncludeArchivedQuery: z.ZodObject<{
4
- includeArchived: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
5
- }, "strip", z.ZodTypeAny, {
6
- includeArchived?: boolean | undefined;
7
- }, {
8
- includeArchived?: unknown;
9
- }>;
4
+ includeArchived: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
5
+ }, z.core.$strip>;
10
6
  export type IncludeArchivedQuery = z.infer<typeof IncludeArchivedQuery>;
11
7
  export declare const SearchQuery: z.ZodObject<{
12
8
  search: z.ZodOptional<z.ZodString>;
13
- }, "strip", z.ZodTypeAny, {
14
- search?: string | undefined;
15
- }, {
16
- search?: string | undefined;
17
- }>;
9
+ }, z.core.$strip>;
18
10
  export type SearchQuery = z.infer<typeof SearchQuery>;
19
11
  export declare const PaginationQuery: z.ZodObject<{
20
- limit: z.ZodOptional<z.ZodNumber>;
12
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
21
13
  cursor: z.ZodOptional<z.ZodString>;
22
- }, "strip", z.ZodTypeAny, {
23
- limit?: number | undefined;
24
- cursor?: string | undefined;
25
- }, {
26
- limit?: number | undefined;
27
- cursor?: string | undefined;
28
- }>;
14
+ }, z.core.$strip>;
29
15
  export type PaginationQuery = z.infer<typeof PaginationQuery>;
30
16
  export declare const CommonListElementsQuery: z.ZodObject<{
31
17
  search: z.ZodOptional<z.ZodString>;
32
- } & {
33
- limit: z.ZodOptional<z.ZodNumber>;
18
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
34
19
  cursor: z.ZodOptional<z.ZodString>;
35
- } & {
36
- includeArchived: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
37
- }, "strip", z.ZodTypeAny, {
38
- search?: string | undefined;
39
- includeArchived?: boolean | undefined;
40
- limit?: number | undefined;
41
- cursor?: string | undefined;
42
- }, {
43
- search?: string | undefined;
44
- includeArchived?: unknown;
45
- limit?: number | undefined;
46
- cursor?: string | undefined;
47
- }>;
20
+ includeArchived: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
21
+ }, z.core.$strip>;
48
22
  export type CommonListElementsQuery = z.infer<typeof CommonListElementsQuery>;
49
23
  export declare const CommonInstancesListQuery: z.ZodObject<{
50
24
  search: z.ZodOptional<z.ZodString>;
51
- } & {
52
- limit: z.ZodOptional<z.ZodNumber>;
25
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
53
26
  cursor: z.ZodOptional<z.ZodString>;
54
- } & {
55
- includeArchived: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
56
- } & {
27
+ includeArchived: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
57
28
  userId: z.ZodOptional<z.ZodString>;
58
29
  instanceKey: z.ZodOptional<z.ZodString>;
59
- }, "strip", z.ZodTypeAny, {
60
- search?: string | undefined;
61
- includeArchived?: boolean | undefined;
62
- limit?: number | undefined;
63
- cursor?: string | undefined;
64
- userId?: string | undefined;
65
- instanceKey?: string | undefined;
66
- }, {
67
- search?: string | undefined;
68
- includeArchived?: unknown;
69
- limit?: number | undefined;
70
- cursor?: string | undefined;
71
- userId?: string | undefined;
72
- instanceKey?: string | undefined;
73
- }>;
30
+ }, z.core.$strip>;
74
31
  export type CommonInstancesListQuery = z.infer<typeof CommonInstancesListQuery>;
75
32
  export declare const CommonIntegrationOrConnectionQuery: z.ZodObject<{
76
33
  connectionId: z.ZodOptional<z.ZodString>;
77
34
  integrationId: z.ZodOptional<z.ZodString>;
78
35
  integrationKey: z.ZodOptional<z.ZodString>;
79
- }, "strip", z.ZodTypeAny, {
80
- integrationId?: string | undefined;
81
- connectionId?: string | undefined;
82
- integrationKey?: string | undefined;
83
- }, {
84
- integrationId?: string | undefined;
85
- connectionId?: string | undefined;
86
- integrationKey?: string | undefined;
87
- }>;
36
+ }, z.core.$strip>;
88
37
  export type CommonIntegrationOrConnectionQuery = z.infer<typeof CommonIntegrationOrConnectionQuery>;
89
38
  export declare class PaginationResponse<T> {
90
39
  items: T[];
@@ -7,24 +7,12 @@ export declare enum HttpRequestMethod {
7
7
  DELETE = "DELETE"
8
8
  }
9
9
  export declare const HttpRequestSpec: z.ZodObject<{
10
- method: z.ZodOptional<z.ZodPipeline<z.ZodString, z.ZodNativeEnum<typeof HttpRequestMethod>>>;
10
+ method: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<typeof HttpRequestMethod>>>;
11
11
  uri: z.ZodAny;
12
12
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
13
13
  query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
14
14
  body: z.ZodOptional<z.ZodAny>;
15
- }, "strip", z.ZodTypeAny, {
16
- headers?: Record<string, any> | undefined;
17
- method?: HttpRequestMethod | undefined;
18
- body?: any;
19
- uri?: any;
20
- query?: Record<string, any> | undefined;
21
- }, {
22
- headers?: Record<string, any> | undefined;
23
- method?: string | undefined;
24
- body?: any;
25
- uri?: any;
26
- query?: Record<string, any> | undefined;
27
- }>;
15
+ }, z.core.$strip>;
28
16
  export type HttpRequestSpec = z.infer<typeof HttpRequestSpec>;
29
17
  export declare const HTTP_REQUEST_SCHEMA: {
30
18
  type: string;
@@ -1,16 +1,8 @@
1
- import { z } from 'zod';
2
1
  export declare const POPUP_ELEMENT_ID = "__integration-app-popup";
3
- export declare const OpenConfigurationOptions: z.ZodObject<{
4
- onClose: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
5
- showPoweredBy: z.ZodOptional<z.ZodBoolean>;
6
- }, "strip", z.ZodTypeAny, {
7
- onClose?: ((...args: unknown[]) => unknown) | undefined;
8
- showPoweredBy?: boolean | undefined;
9
- }, {
10
- onClose?: ((...args: unknown[]) => unknown) | undefined;
11
- showPoweredBy?: boolean | undefined;
12
- }>;
13
- export type OpenConfigurationOptions = z.infer<typeof OpenConfigurationOptions>;
2
+ export interface OpenConfigurationOptions {
3
+ onClose?: (...args: any[]) => void;
4
+ showPoweredBy?: boolean;
5
+ }
14
6
  export type OpenIframeOptions = OpenConfigurationOptions & {
15
7
  [key: string]: (...args: any[]) => void;
16
8
  };