OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

openbanking.accounts.sync

Initiate a synchronisation run to refresh bank account metadata from Powens.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @platform.finance
  • Tags: open-banking, powens, accounts
  • field.key.label
    openbanking.accounts.sync
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    openbanking.accounts.sync
    field.description.label

    Initiate a synchronisation run to refresh bank account metadata from Powens.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @platform.finance
  • Tags: open-banking, powens, accounts
  • field.tags.label
    open-banking,powens,accounts
    field.owners.label
    @platform.finance
    field.stability.label
    experimental

    Initiate a synchronisation run to refresh bank account metadata from Powens.

    Goal

    Keep canonical bank account records aligned with the external open banking provider.

    Context

    Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.

    Source Definition

    import {
    	type AnyOperationSpec,
    	defineCommand,
    	defineQuery,
    } from '@lssm-tech/lib.contracts-spec/operations';
    import type { OperationSpecRegistry } from '@lssm-tech/lib.contracts-spec/operations/registry';
    import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
    import { BankAccountRecord } from '../models';
    import { OPENBANKING_TELEMETRY_EVENTS } from '../telemetry';
    
    export const OpenBankingSyncAccounts = defineCommand({
    	meta: {
    		key: 'openbanking.accounts.sync',
    		version: '1.0.0',
    		description:
    			'Initiate a synchronisation run to refresh bank account metadata from Powens.',
    		goal: 'Keep canonical bank account records aligned with the external open banking provider.',
    		context:
    			'Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.',
    		owners: ['@platform.finance'],
    		tags: ['open-banking', 'powens', 'accounts'],
    		stability: 'experimental',
    	},
    	io: {
    		input: OpenBankingSyncAccountsInput,
    		output: OpenBankingSyncAccountsOutput,
    	},
    	policy: {
    		auth: 'admin',
    	},
    	telemetry: {
    		success: {
    			event: { key: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },
    			properties: ({ input, output }) => {
    				const payload = input as {
    					tenantId?: string;
    					connectionId?: string;
    				};
    				const result = output as {
    					synced?: number;
    					failed?: number;
    				} | null;
    				return {
    					tenantId: payload?.tenantId,
    					connectionId: payload?.connectionId,
    					synced: result?.synced,
    					failed: result?.failed,
    				};
    			},
    		},
    		failure: {
    			event: { key: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },
    			properties: ({ input, error }) => {
    				const payload = input as {
    					tenantId?: string;
    					connectionId?: string;
    				};
    				return {
    					tenantId: payload?.tenantId,
    					connectionId: payload?.connectionId,
    					error:
    						error instanceof Error ? error.message : String(error ?? 'unknown'),
    				};
    			},
    		},
    	},
    });