@indexnetwork/protocol 66.0.0-rc.670.1 → 66.0.0-rc.672.1
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/opportunities/opportunity.cards.d.ts +1 -0
- package/dist/internal/opportunities/opportunity.cards.js +1 -0
- package/dist/internal/opportunities/opportunity.counterparties.d.ts +2 -0
- package/dist/internal/opportunities/opportunity.counterparties.js +4 -0
- package/dist/platform/database/entities.d.ts +1 -0
- package/dist/protocol/negotiation.rules.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export { normalizeTelegramHandle } from './internal/shared/utils/telegram-handle
|
|
|
43
43
|
* Supersedes the capabilities/*.facade.ts + opportunities/public/ pair; the export
|
|
44
44
|
* list is the union of the facades it replaces, so the contract is unchanged.
|
|
45
45
|
*/
|
|
46
|
-
export { pairKeyOf, } from "./internal/opportunities/opportunity.counterparties.js";
|
|
46
|
+
export { pairKeyOf, identityPairKeyOf, } from "./internal/opportunities/opportunity.counterparties.js";
|
|
47
47
|
export type { OpportunityEvidence } from "./protocol/schemas/network-assignment.schema.js";
|
|
48
48
|
export type { CreateIntentCounterpartyData, OpenedNegotiation, } from "./internal/opportunities/opportunity.counterparties.js";
|
|
49
49
|
export { gatherPresenterContext, OpportunityPresenter, } from "./internal/opportunities/opportunity.presentation.js";
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export { normalizeTelegramHandle } from './internal/shared/utils/telegram-handle
|
|
|
48
48
|
* Supersedes the capabilities/*.facade.ts + opportunities/public/ pair; the export
|
|
49
49
|
* list is the union of the facades it replaces, so the contract is unchanged.
|
|
50
50
|
*/
|
|
51
|
-
export { pairKeyOf, } from "./internal/opportunities/opportunity.counterparties.js";
|
|
51
|
+
export { pairKeyOf, identityPairKeyOf, } from "./internal/opportunities/opportunity.counterparties.js";
|
|
52
52
|
export { gatherPresenterContext, OpportunityPresenter, } from "./internal/opportunities/opportunity.presentation.js";
|
|
53
53
|
export { getPrimaryActionLabel, } from "./internal/opportunities/opportunity.labels.js";
|
|
54
54
|
export { buildApiChatCardPresentationCacheKey, buildApiChatContextCacheKey, buildOpportunityCardCacheKey, } from "./internal/opportunities/opportunity.presentation.js";
|
|
@@ -86,6 +86,7 @@ export declare function presentOpportunityCard(deps: OpportunityCardsDeps, oppor
|
|
|
86
86
|
*/
|
|
87
87
|
export declare function listOpportunityCards(deps: OpportunityCardsDeps, input: {
|
|
88
88
|
viewerId: string;
|
|
89
|
+
identityOnly?: boolean;
|
|
89
90
|
statuses: OpportunityStatus[];
|
|
90
91
|
networkId?: string;
|
|
91
92
|
intentId?: string;
|
|
@@ -166,6 +166,7 @@ export async function presentOpportunityCard(deps, opportunity, viewerId, option
|
|
|
166
166
|
export async function listOpportunityCards(deps, input) {
|
|
167
167
|
const { viewerId, intentId } = input;
|
|
168
168
|
const scope = {
|
|
169
|
+
...(input.identityOnly ? { identityOnly: true } : {}),
|
|
169
170
|
...(input.networkId ? { networkId: input.networkId } : {}),
|
|
170
171
|
...(intentId ? { scopeType: 'intent', scopeId: intentId } : {}),
|
|
171
172
|
};
|
|
@@ -15,3 +15,5 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function pairKeyOf(networkId: string, intentA: string, intentB: string): string;
|
|
17
17
|
export type { CreateIntentCounterpartyData, OpenedNegotiation, } from '../../platform/database.js';
|
|
18
|
+
/** A directed intent-to-identity introduction, distinct from every two-intent pair. */
|
|
19
|
+
export declare function identityPairKeyOf(networkId: string, intentId: string, userId: string): string;
|
|
@@ -17,3 +17,7 @@ export function pairKeyOf(networkId, intentA, intentB) {
|
|
|
17
17
|
const [low, high] = intentA <= intentB ? [intentA, intentB] : [intentB, intentA];
|
|
18
18
|
return [networkId, low, high].map((part) => `${part.length}:${part}`).join('');
|
|
19
19
|
}
|
|
20
|
+
/** A directed intent-to-identity introduction, distinct from every two-intent pair. */
|
|
21
|
+
export function identityPairKeyOf(networkId, intentId, userId) {
|
|
22
|
+
return `identity:${[networkId, intentId, userId].map((part) => `${part.length}:${part}`).join('')}`;
|
|
23
|
+
}
|
|
@@ -506,6 +506,7 @@ export interface CreateOpportunityData {
|
|
|
506
506
|
metadata?: Record<string, unknown> | null;
|
|
507
507
|
}
|
|
508
508
|
export interface OpportunityQueryOptions {
|
|
509
|
+
identityOnly?: boolean;
|
|
509
510
|
status?: OpportunityStatus;
|
|
510
511
|
/** When set, filter to opportunities whose status is in this list. Orthogonal to `status` (single) — callers pick one. */
|
|
511
512
|
statuses?: OpportunityStatus[];
|
|
@@ -27,7 +27,7 @@ export interface NegotiationState {
|
|
|
27
27
|
awaitingUserId: string | null;
|
|
28
28
|
outcome: NegotiationOutcome | null;
|
|
29
29
|
settled: boolean;
|
|
30
|
-
/**
|
|
30
|
+
/** Attached intents are active and assigned; both participants remain eligible in the network. */
|
|
31
31
|
eligible: boolean;
|
|
32
32
|
turns: {
|
|
33
33
|
seatUserId: string;
|
|
@@ -40,7 +40,7 @@ export interface NegotiationOpening {
|
|
|
40
40
|
userA: string;
|
|
41
41
|
userB: string;
|
|
42
42
|
intentA: string;
|
|
43
|
-
intentB: string;
|
|
43
|
+
intentB: string | null;
|
|
44
44
|
eligible: boolean;
|
|
45
45
|
}
|
|
46
46
|
export type NegotiationOpeningDecision = {
|