@membranehq/sdk 0.15.6 → 0.16.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/dist/bundle.d.ts +5 -0
- package/dist/bundle.js +59 -31
- package/dist/bundle.js.map +1 -1
- package/dist/dts/index.browser.d.ts +1 -0
- package/dist/dts/self-hosting-tokens/index.d.ts +1 -0
- package/dist/dts/self-hosting-tokens/types.d.ts +38 -0
- package/dist/dts/ui.test.d.ts +1 -0
- package/dist/dts/workspace-elements/api/connections-api.d.ts +5 -0
- package/dist/dts/workspace-elements/api/connections-api.test.d.ts +1 -0
- package/dist/dts/workspace-elements/utils/index.d.ts +1 -0
- package/dist/dts/workspace-elements/utils/zod-schema-utils.d.ts +2 -0
- package/dist/dts/workspace-elements/utils/zod-schema-utils.test.d.ts +1 -0
- package/dist/index.browser.d.mts +46 -1
- package/dist/index.browser.d.ts +46 -1
- package/dist/index.browser.js +145 -36
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +139 -37
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +46 -1
- package/dist/index.node.d.ts +46 -1
- package/dist/index.node.js +145 -36
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +139 -37
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/bundle.d.ts
CHANGED
|
@@ -504,6 +504,11 @@ declare const ConnectUIOptions: z.ZodObject<{
|
|
|
504
504
|
connectionParameters: z.ZodOptional<z.ZodAny>;
|
|
505
505
|
allowMultipleConnections: z.ZodOptional<z.ZodBoolean>;
|
|
506
506
|
customState: z.ZodOptional<z.ZodString>;
|
|
507
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
light: "light";
|
|
509
|
+
dark: "dark";
|
|
510
|
+
auto: "auto";
|
|
511
|
+
}>>;
|
|
507
512
|
}, z.core.$strip>;
|
|
508
513
|
type ConnectUIOptions = z.infer<typeof ConnectUIOptions>;
|
|
509
514
|
type ConnectOptions = ConnectPayload & {
|
package/dist/bundle.js
CHANGED
|
@@ -7898,7 +7898,7 @@
|
|
|
7898
7898
|
const version = {
|
|
7899
7899
|
major: 4,
|
|
7900
7900
|
minor: 3,
|
|
7901
|
-
patch:
|
|
7901
|
+
patch: 6,
|
|
7902
7902
|
};
|
|
7903
7903
|
|
|
7904
7904
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
@@ -9260,11 +9260,9 @@
|
|
|
9260
9260
|
if (keyResult instanceof Promise) {
|
|
9261
9261
|
throw new Error("Async schemas not supported in object keys currently");
|
|
9262
9262
|
}
|
|
9263
|
-
// Numeric string fallback: if key
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
keyResult.issues.length &&
|
|
9267
|
-
keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number");
|
|
9263
|
+
// Numeric string fallback: if key is a numeric string and failed, retry with Number(key)
|
|
9264
|
+
// This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
|
|
9265
|
+
const checkNumericKey = typeof key === "string" && number$2.test(key) && keyResult.issues.length;
|
|
9268
9266
|
if (checkNumericKey) {
|
|
9269
9267
|
const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
|
|
9270
9268
|
if (retryResult instanceof Promise) {
|
|
@@ -16917,7 +16915,7 @@
|
|
|
16917
16915
|
}
|
|
16918
16916
|
}
|
|
16919
16917
|
// When ref was extracted to $defs, remove properties that match the definition
|
|
16920
|
-
if (refSchema.$ref) {
|
|
16918
|
+
if (refSchema.$ref && refSeen.def) {
|
|
16921
16919
|
for (const key in schema) {
|
|
16922
16920
|
if (key === "$ref" || key === "allOf")
|
|
16923
16921
|
continue;
|
|
@@ -22189,36 +22187,64 @@
|
|
|
22189
22187
|
WorkspaceElementDependencyType["Parent"] = "PARENT";
|
|
22190
22188
|
})(WorkspaceElementDependencyType || (WorkspaceElementDependencyType = {}));
|
|
22191
22189
|
const BaseWorkspaceElement = object({
|
|
22192
|
-
id: string$1(),
|
|
22193
|
-
name: string$1(),
|
|
22190
|
+
id: string$1().describe('Internal database ID of the element. Assigned by the API; unique per element.'),
|
|
22191
|
+
name: string$1().describe('Display name of the workspace element.'),
|
|
22194
22192
|
});
|
|
22195
22193
|
const BaseMembraneInterfaceEditableProperties = object({
|
|
22196
|
-
uuid: string$1()
|
|
22197
|
-
|
|
22198
|
-
|
|
22199
|
-
|
|
22200
|
-
|
|
22194
|
+
uuid: string$1()
|
|
22195
|
+
.optional()
|
|
22196
|
+
.describe('Stable unique identifier (UUID). Can be provided on create; otherwise generated. Must be unique across elements of this type.'),
|
|
22197
|
+
key: string$1()
|
|
22198
|
+
.optional()
|
|
22199
|
+
.describe('Stable key for referencing the element (e.g. in selectors). Unique per (parent, integration) scope. Generated from name if not provided on create.'),
|
|
22200
|
+
name: string$1().optional().describe('Display name. Optional on create; used to generate key when key is omitted.'),
|
|
22201
|
+
description: string$1().optional().describe('Optional human-readable description.'),
|
|
22202
|
+
meta: record(string$1(), any()).optional().describe('Optional key-value metadata.'),
|
|
22201
22203
|
});
|
|
22202
22204
|
const BaseMembraneInterfaceReadOnlyProperties = object({
|
|
22203
|
-
name: string$1(),
|
|
22204
|
-
state: _enum(WorkspaceElementState)
|
|
22205
|
-
|
|
22206
|
-
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22205
|
+
name: string$1().describe('Display name. Always present in API responses (filled by API if not set on create).'),
|
|
22206
|
+
state: _enum(WorkspaceElementState)
|
|
22207
|
+
.optional()
|
|
22208
|
+
.describe('Current lifecycle or health state (e.g. READY, SETUP_FAILED, CONFIGURATION_ERROR). Set by the engine during setup and validation.'),
|
|
22209
|
+
errors: array(ErrorDataSchema).optional().describe('Validation or setup errors when state is not READY.'),
|
|
22210
|
+
revision: string$1()
|
|
22211
|
+
.optional()
|
|
22212
|
+
.describe('Opaque revision token; changes on each update. Used for optimistic concurrency.'),
|
|
22213
|
+
createdAt: string$1().optional().describe('ISO date when the element was created.'),
|
|
22214
|
+
updatedAt: string$1().optional().describe('ISO date when the element was last updated.'),
|
|
22215
|
+
archivedAt: string$1()
|
|
22216
|
+
.optional()
|
|
22217
|
+
.describe('When set, the element is archived (soft-deleted). Archived elements cannot be patched.'),
|
|
22218
|
+
isDeactivated: boolean$1()
|
|
22219
|
+
.optional()
|
|
22220
|
+
.describe('When true, setup is skipped and the element is treated as inactive (e.g. when dependencies are deactivated or the element is archived).'),
|
|
22221
|
+
isReadOnly: boolean$1()
|
|
22222
|
+
.optional()
|
|
22223
|
+
.describe('When true, the element cannot be modified (e.g. published package elements or elements from another workspace).'),
|
|
22212
22224
|
});
|
|
22213
22225
|
const BaseMembraneInterface = BaseWorkspaceElement.merge(BaseMembraneInterfaceEditableProperties).merge(BaseMembraneInterfaceReadOnlyProperties);
|
|
22214
22226
|
const BaseIntegrationLevelMembraneInterfaceEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
22215
|
-
integrationId: string$1()
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22227
|
+
integrationId: string$1()
|
|
22228
|
+
.optional()
|
|
22229
|
+
.describe('Internal ID of the integration this element belongs to. Omit for universal elements; set for integration-specific elements. Uniqueness of key is scoped per integration.'),
|
|
22230
|
+
integrationUuid: string$1()
|
|
22231
|
+
.optional()
|
|
22232
|
+
.describe('UUID of the integration; alternative to integrationId when creating from export. Resolved to integrationId by the API.'),
|
|
22233
|
+
parentId: string$1()
|
|
22234
|
+
.optional()
|
|
22235
|
+
.describe('Internal ID of the parent workspace element. Used for hierarchy (e.g. integration-level under universal). Child key uniqueness is scoped by parent and integration.'),
|
|
22236
|
+
parentUuid: string$1()
|
|
22237
|
+
.optional()
|
|
22238
|
+
.describe('UUID of the parent element; alternative to parentId when creating (e.g. from export). Resolved to parentId by the API.'),
|
|
22239
|
+
connectionId: string$1()
|
|
22240
|
+
.optional()
|
|
22241
|
+
.describe('Connection ID. Used when filtering by connection in list/selector queries, or when creating or identifying connection-level instances.'),
|
|
22242
|
+
instanceKey: string$1()
|
|
22243
|
+
.optional()
|
|
22244
|
+
.describe('Key identifying a specific connection-level instance when multiple instances exist per (element, connection). Used in selector queries and when creating instances.'),
|
|
22245
|
+
isUniversal: boolean$1()
|
|
22246
|
+
.optional()
|
|
22247
|
+
.describe('When true, the element is universal (shared across all integrations). Requires universal-element access. Omit or false for integration-specific elements.'),
|
|
22222
22248
|
});
|
|
22223
22249
|
const BaseIntegrationLevelMembraneInterfaceReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
|
|
22224
22250
|
isCustomized: boolean$1().optional(),
|
|
@@ -24607,7 +24633,9 @@
|
|
|
24607
24633
|
redirectUri: string$1().optional(),
|
|
24608
24634
|
customState: string$1().optional(),
|
|
24609
24635
|
});
|
|
24610
|
-
ConnectPayload.omit({ input: true, redirectUri: true })
|
|
24636
|
+
ConnectPayload.omit({ input: true, redirectUri: true }).extend({
|
|
24637
|
+
theme: _enum(['light', 'dark', 'auto']).optional(),
|
|
24638
|
+
});
|
|
24611
24639
|
|
|
24612
24640
|
class UI {
|
|
24613
24641
|
constructor(client) {
|