@almadar/integrations 2.10.0 → 2.12.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/{BaseIntegration-d17YX8KE.d.ts → BaseIntegration-B9lSTRQm.d.ts} +12 -1
- package/dist/{factory-BcFFy4JA.d.ts → factory-TNgVDujm.d.ts} +1 -1
- package/dist/index.d.ts +53 -5
- package/dist/index.js.map +1 -1
- package/dist/integrations/github/index.d.ts +1 -1
- package/dist/integrations/github/index.js.map +1 -1
- package/dist/mocks/index.d.ts +2 -2
- package/dist/mocks/index.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -82,9 +82,20 @@ interface IntegrationLogger {
|
|
|
82
82
|
* Integration action parameters.
|
|
83
83
|
* Each integration's execute() method receives params as this type.
|
|
84
84
|
* Individual methods cast to specific param shapes from their contracts.
|
|
85
|
+
*
|
|
86
|
+
* Per-key value union is widened to admit `@almadar/core`'s `FieldValue`
|
|
87
|
+
* shape (entity / payload values flowing into call-service args): `Date`
|
|
88
|
+
* for date fields, `IntegrationParams[]` for nested object arrays, and a
|
|
89
|
+
* raw-value array catch-all so `string[]` / `number[]` / mixed payload
|
|
90
|
+
* arrays satisfy the index signature without requiring `as unknown as`
|
|
91
|
+
* casts at the call site. Adapters narrow these to their canonical input
|
|
92
|
+
* types (typically JSON-string serialisation for `Date`).
|
|
85
93
|
*/
|
|
94
|
+
type IntegrationParamValue = string | number | boolean | Date | null | undefined | ReadonlyArray<IntegrationParamValue> | {
|
|
95
|
+
readonly [key: string]: IntegrationParamValue;
|
|
96
|
+
};
|
|
86
97
|
interface IntegrationParams {
|
|
87
|
-
[key: string]:
|
|
98
|
+
[key: string]: IntegrationParamValue;
|
|
88
99
|
}
|
|
89
100
|
/**
|
|
90
101
|
* Validation result
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IntegrationConfig, B as BaseIntegration, d as IntegrationParams, e as IntegrationResult } from './BaseIntegration-
|
|
1
|
+
import { I as IntegrationConfig, B as BaseIntegration, d as IntegrationParams, e as IntegrationResult } from './BaseIntegration-B9lSTRQm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Factory for creating and managing integration instances
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as IntegrationParams, c as IntegrationLogger, b as IntegrationErrorCode, I as IntegrationConfig, B as BaseIntegration, e as IntegrationResult } from './BaseIntegration-
|
|
2
|
-
export { a as IntegrationError, V as ValidationError, f as ValidationResult, v as validateParams } from './BaseIntegration-
|
|
1
|
+
import { d as IntegrationParams, c as IntegrationLogger, b as IntegrationErrorCode, I as IntegrationConfig, B as BaseIntegration, e as IntegrationResult } from './BaseIntegration-B9lSTRQm.js';
|
|
2
|
+
export { a as IntegrationError, V as ValidationError, f as ValidationResult, v as validateParams } from './BaseIntegration-B9lSTRQm.js';
|
|
3
3
|
import { ServiceParams, LogMeta } from '@almadar/core';
|
|
4
|
-
export { I as IntegrationFactory, g as getIntegrationFactory, r as resetIntegrationFactory } from './factory-
|
|
4
|
+
export { I as IntegrationFactory, g as getIntegrationFactory, r as resetIntegrationFactory } from './factory-TNgVDujm.js';
|
|
5
5
|
export { GitHubIntegration } from './integrations/github/index.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -104,6 +104,51 @@ type GitHubActions = {
|
|
|
104
104
|
state: string;
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
|
+
getFile: {
|
|
108
|
+
params: {
|
|
109
|
+
owner: string;
|
|
110
|
+
repo: string;
|
|
111
|
+
path: string;
|
|
112
|
+
ref?: string;
|
|
113
|
+
};
|
|
114
|
+
result: {
|
|
115
|
+
path: string;
|
|
116
|
+
content: string;
|
|
117
|
+
sha: string;
|
|
118
|
+
size: number;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
listCommits: {
|
|
122
|
+
params: {
|
|
123
|
+
owner: string;
|
|
124
|
+
repo: string;
|
|
125
|
+
path?: string;
|
|
126
|
+
ref?: string;
|
|
127
|
+
per_page?: number;
|
|
128
|
+
};
|
|
129
|
+
result: {
|
|
130
|
+
commits: Array<{
|
|
131
|
+
sha: string;
|
|
132
|
+
message: string;
|
|
133
|
+
author: string;
|
|
134
|
+
date: string;
|
|
135
|
+
}>;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
createIssue: {
|
|
139
|
+
params: {
|
|
140
|
+
owner: string;
|
|
141
|
+
repo: string;
|
|
142
|
+
title: string;
|
|
143
|
+
body?: string;
|
|
144
|
+
labels?: string[];
|
|
145
|
+
};
|
|
146
|
+
result: {
|
|
147
|
+
number: number;
|
|
148
|
+
title: string;
|
|
149
|
+
url: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
107
152
|
};
|
|
108
153
|
type StripeActions = {
|
|
109
154
|
createPaymentIntent: {
|
|
@@ -384,9 +429,12 @@ type StorageActions = {
|
|
|
384
429
|
upload: {
|
|
385
430
|
params: {
|
|
386
431
|
bucket: string;
|
|
387
|
-
key
|
|
388
|
-
content
|
|
432
|
+
key?: string;
|
|
433
|
+
content?: string;
|
|
389
434
|
contentType?: string;
|
|
435
|
+
file?: IntegrationParams;
|
|
436
|
+
acl?: 'public' | 'private';
|
|
437
|
+
maxSize?: number;
|
|
390
438
|
metadata?: IntegrationParams;
|
|
391
439
|
};
|
|
392
440
|
result: {
|