@squadbase/connectors 0.0.13 → 0.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/connectors",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Squadbase Connectors",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,8 @@
30
30
  "sync:dev1": "API_BASE_URL=https://dev1-api.squadbase.dev/v0 dotenv tsx scripts/sync-connectors.ts",
31
31
  "sync:dev2": "API_BASE_URL=https://dev2-api.squadbase.dev/v0 dotenv tsx scripts/sync-connectors.ts",
32
32
  "sync:prod": "API_BASE_URL=https://api.squadbase.dev/v0 dotenv tsx scripts/sync-connectors.ts",
33
- "test": "vitest"
33
+ "test": "vitest",
34
+ "test:e2e": "dotenv -e e2e/fixtures/secrets/.env -- vitest run --config vitest.config.e2e.ts"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "ai": "^6.0.0",
@@ -1,93 +0,0 @@
1
- // src/parameter-definition.ts
2
- var ParameterDefinition = class {
3
- slug;
4
- name;
5
- description;
6
- envVarBaseKey;
7
- type;
8
- secret;
9
- required;
10
- constructor(config) {
11
- this.slug = config.slug;
12
- this.name = config.name;
13
- this.description = config.description;
14
- this.envVarBaseKey = config.envVarBaseKey;
15
- this.type = config.type;
16
- this.secret = config.secret;
17
- this.required = config.required;
18
- }
19
- /**
20
- * Get the parameter value from a ConnectorConnectionObject.
21
- */
22
- getValue(connection) {
23
- const param = connection.parameters.find(
24
- (p) => p.parameterSlug === this.slug
25
- );
26
- if (!param || param.value == null) {
27
- throw new Error(
28
- `Parameter "${this.slug}" not found or has no value in connection "${connection.id}"`
29
- );
30
- }
31
- return param.value;
32
- }
33
- /**
34
- * Try to get the parameter value. Returns undefined if not found (for optional params).
35
- */
36
- tryGetValue(connection) {
37
- const param = connection.parameters.find(
38
- (p) => p.parameterSlug === this.slug
39
- );
40
- if (!param || param.value == null) return void 0;
41
- return param.value;
42
- }
43
- };
44
-
45
- // src/connectors/kintone/parameters.ts
46
- var parameters = {
47
- baseUrl: new ParameterDefinition({
48
- slug: "base-url",
49
- name: "kintone Base URL",
50
- description: "The base URL of your kintone environment (e.g., https://example.cybozu.com).",
51
- envVarBaseKey: "KINTONE_BASE_URL",
52
- type: "text",
53
- secret: false,
54
- required: true
55
- }),
56
- username: new ParameterDefinition({
57
- slug: "username",
58
- name: "kintone Username",
59
- description: "The username (login name) for kintone authentication.",
60
- envVarBaseKey: "KINTONE_USERNAME",
61
- type: "text",
62
- secret: false,
63
- required: true
64
- }),
65
- password: new ParameterDefinition({
66
- slug: "password",
67
- name: "kintone Password",
68
- description: "The password for kintone authentication.",
69
- envVarBaseKey: "KINTONE_PASSWORD",
70
- type: "text",
71
- secret: true,
72
- required: true
73
- })
74
- };
75
-
76
- // src/connectors/openai/parameters.ts
77
- var parameters2 = {
78
- apiKey: new ParameterDefinition({
79
- slug: "api-key",
80
- name: "OpenAI API Key",
81
- description: "The OpenAI API key for authentication (starts with sk-).",
82
- envVarBaseKey: "OPENAI_API_KEY",
83
- type: "text",
84
- secret: true,
85
- required: true
86
- })
87
- };
88
-
89
- export {
90
- ParameterDefinition,
91
- parameters,
92
- parameters2
93
- };