@canonmsg/backend-contracts 2.1.0 → 2.3.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.
@@ -0,0 +1,25 @@
1
+ export const CANON_ENVIRONMENT_CONTRACTS = Object.freeze({
2
+ 'canon-dev-v1': Object.freeze({
3
+ name: 'dev',
4
+ projectId: 'canonmail-dev',
5
+ region: 'europe-west1',
6
+ }),
7
+ 'canon-prod-v1': Object.freeze({
8
+ name: 'prod',
9
+ projectId: 'canonmail-prod',
10
+ region: 'europe-west1',
11
+ }),
12
+ 'canon-legacy-v1': Object.freeze({
13
+ name: 'legacy',
14
+ projectId: 'project-007a8e71-ba01-49e6-8aa',
15
+ region: 'us-central1',
16
+ }),
17
+ });
18
+ export function getCanonEnvironmentContract(value) {
19
+ const environmentId = value.trim();
20
+ const contract = CANON_ENVIRONMENT_CONTRACTS[environmentId];
21
+ if (!contract) {
22
+ throw new Error(`Unsupported Canon environment ID: ${value}`);
23
+ }
24
+ return Object.freeze({ environmentId, ...contract });
25
+ }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './diffRedaction.js';
2
+ export * from './environment.js';
2
3
  export * from './media.js';
3
4
  export * from './message.js';
4
5
  export * from './runtimeCardFields.js';
@@ -6,3 +7,6 @@ export * from './runtimeCardStorage.js';
6
7
  export * from './turnProtocol.js';
7
8
  export * from './agentBehaviorPolicy.js';
8
9
  export * from './contactRequest.js';
10
+ export * from './verbContract.js';
11
+ export * from './verbSchemas.js';
12
+ export * from './verbWire.js';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './diffRedaction.js';
2
+ export * from './environment.js';
2
3
  export * from './media.js';
3
4
  export * from './message.js';
4
5
  export * from './runtimeCardFields.js';
@@ -6,3 +7,6 @@ export * from './runtimeCardStorage.js';
6
7
  export * from './turnProtocol.js';
7
8
  export * from './agentBehaviorPolicy.js';
8
9
  export * from './contactRequest.js';
10
+ export * from './verbContract.js';
11
+ export * from './verbSchemas.js';
12
+ export * from './verbWire.js';