@odatano/core 0.3.2 → 0.3.3
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/@cds-models/CardanoODataService/index.d.ts +1969 -0
- package/@cds-models/CardanoODataService/index.d.ts.map +1 -0
- package/@cds-models/CardanoODataService/index.js +329 -0
- package/@cds-models/CardanoODataService/index.js.map +1 -0
- package/@cds-models/CardanoODataService/index.ts +646 -0
- package/@cds-models/CardanoTransactionService/index.d.ts +1860 -0
- package/@cds-models/CardanoTransactionService/index.d.ts.map +1 -0
- package/@cds-models/CardanoTransactionService/index.js +328 -0
- package/@cds-models/CardanoTransactionService/index.js.map +1 -0
- package/@cds-models/CardanoTransactionService/index.ts +602 -0
- package/@cds-models/CardanoWatcherAdminService/index.js +113 -0
- package/@cds-models/CardanoWatcherAdminService/index.js.map +1 -0
- package/@cds-models/CardanoWatcherAdminService/index.ts +263 -0
- package/@cds-models/_/index.d.ts +66 -0
- package/@cds-models/_/index.d.ts.map +1 -0
- package/@cds-models/_/index.js +42 -0
- package/@cds-models/_/index.js.map +1 -0
- package/@cds-models/_/index.ts +96 -0
- package/@cds-models/cds/outbox/index.js +8 -0
- package/@cds-models/cds/outbox/index.js.map +1 -0
- package/@cds-models/cds/outbox/index.ts +27 -0
- package/@cds-models/cds/xt/MTXServices/index.js +8 -0
- package/@cds-models/cds/xt/MTXServices/index.js.map +1 -0
- package/@cds-models/cds/xt/MTXServices/index.ts +4 -0
- package/@cds-models/index.d.ts +168 -0
- package/@cds-models/index.d.ts.map +1 -0
- package/@cds-models/index.js +113 -0
- package/@cds-models/index.js.map +1 -0
- package/@cds-models/index.ts +84 -0
- package/@cds-models/odatano/cardano/index.d.ts +2882 -0
- package/@cds-models/odatano/cardano/index.d.ts.map +1 -0
- package/@cds-models/odatano/cardano/index.js +554 -0
- package/@cds-models/odatano/cardano/index.js.map +1 -0
- package/@cds-models/odatano/cardano/index.ts +802 -0
- package/@cds-models/odatano/reeve/index.js +83 -0
- package/@cds-models/odatano/reeve/index.js.map +1 -0
- package/@cds-models/odatano/reeve/index.ts +57 -0
- package/@cds-models/odatano/transactions/index.js +56 -0
- package/@cds-models/odatano/transactions/index.js.map +1 -0
- package/@cds-models/odatano/transactions/index.ts +18 -0
- package/@cds-models/odatano/watch/index.js +120 -0
- package/@cds-models/odatano/watch/index.js.map +1 -0
- package/@cds-models/odatano/watch/index.ts +110 -0
- package/@cds-models/sap/common/index.d.ts +678 -0
- package/@cds-models/sap/common/index.d.ts.map +1 -0
- package/@cds-models/sap/common/index.js +270 -0
- package/@cds-models/sap/common/index.js.map +1 -0
- package/@cds-models/sap/common/index.ts +249 -0
- package/package.json +1 -1
- package/src/plugin.d.ts.map +1 -1
- package/src/plugin.js +5 -0
- package/src/plugin.js.map +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.WatcherConfigs = exports.WatcherConfig = exports.BlockchainEvents = exports.BlockchainEvent = exports.TransactionSubmissions = exports.TransactionSubmission = exports.WatchedAddresses = exports.WatchedAddress = void 0;
|
|
37
|
+
exports._WatchedAddressAspect = _WatchedAddressAspect;
|
|
38
|
+
exports._TransactionSubmissionAspect = _TransactionSubmissionAspect;
|
|
39
|
+
exports._BlockchainEventAspect = _BlockchainEventAspect;
|
|
40
|
+
exports._WatcherConfigAspect = _WatcherConfigAspect;
|
|
41
|
+
const __ = __importStar(require("./../_"));
|
|
42
|
+
/**
|
|
43
|
+
* Cardano Watcher Admin Service
|
|
44
|
+
* Manages blockchain address monitoring and transaction tracking
|
|
45
|
+
*/
|
|
46
|
+
class default_1 {
|
|
47
|
+
}
|
|
48
|
+
exports.default = default_1;
|
|
49
|
+
function _WatchedAddressAspect(Base) {
|
|
50
|
+
var _a;
|
|
51
|
+
return _a = class WatchedAddress extends Base {
|
|
52
|
+
},
|
|
53
|
+
_a.kind = 'entity',
|
|
54
|
+
_a;
|
|
55
|
+
}
|
|
56
|
+
class WatchedAddress extends _WatchedAddressAspect(__.Entity) {
|
|
57
|
+
}
|
|
58
|
+
exports.WatchedAddress = WatchedAddress;
|
|
59
|
+
Object.defineProperty(WatchedAddress, 'name', { value: 'CardanoWatcherAdminService.WatchedAddresses' });
|
|
60
|
+
Object.defineProperty(WatchedAddress, 'is_singular', { value: true });
|
|
61
|
+
class WatchedAddresses extends Array {
|
|
62
|
+
}
|
|
63
|
+
exports.WatchedAddresses = WatchedAddresses;
|
|
64
|
+
Object.defineProperty(WatchedAddresses, 'name', { value: 'CardanoWatcherAdminService.WatchedAddresses' });
|
|
65
|
+
function _TransactionSubmissionAspect(Base) {
|
|
66
|
+
var _a;
|
|
67
|
+
return _a = class TransactionSubmission extends Base {
|
|
68
|
+
},
|
|
69
|
+
_a.kind = 'entity',
|
|
70
|
+
_a;
|
|
71
|
+
}
|
|
72
|
+
class TransactionSubmission extends _TransactionSubmissionAspect(__.Entity) {
|
|
73
|
+
}
|
|
74
|
+
exports.TransactionSubmission = TransactionSubmission;
|
|
75
|
+
Object.defineProperty(TransactionSubmission, 'name', { value: 'CardanoWatcherAdminService.TransactionSubmissions' });
|
|
76
|
+
Object.defineProperty(TransactionSubmission, 'is_singular', { value: true });
|
|
77
|
+
class TransactionSubmissions extends Array {
|
|
78
|
+
}
|
|
79
|
+
exports.TransactionSubmissions = TransactionSubmissions;
|
|
80
|
+
Object.defineProperty(TransactionSubmissions, 'name', { value: 'CardanoWatcherAdminService.TransactionSubmissions' });
|
|
81
|
+
function _BlockchainEventAspect(Base) {
|
|
82
|
+
var _a;
|
|
83
|
+
return _a = class BlockchainEvent extends Base {
|
|
84
|
+
},
|
|
85
|
+
_a.kind = 'entity',
|
|
86
|
+
_a;
|
|
87
|
+
}
|
|
88
|
+
class BlockchainEvent extends _BlockchainEventAspect(__.Entity) {
|
|
89
|
+
}
|
|
90
|
+
exports.BlockchainEvent = BlockchainEvent;
|
|
91
|
+
Object.defineProperty(BlockchainEvent, 'name', { value: 'CardanoWatcherAdminService.BlockchainEvents' });
|
|
92
|
+
Object.defineProperty(BlockchainEvent, 'is_singular', { value: true });
|
|
93
|
+
class BlockchainEvents extends Array {
|
|
94
|
+
}
|
|
95
|
+
exports.BlockchainEvents = BlockchainEvents;
|
|
96
|
+
Object.defineProperty(BlockchainEvents, 'name', { value: 'CardanoWatcherAdminService.BlockchainEvents' });
|
|
97
|
+
function _WatcherConfigAspect(Base) {
|
|
98
|
+
var _a;
|
|
99
|
+
return _a = class WatcherConfig extends Base {
|
|
100
|
+
},
|
|
101
|
+
_a.kind = 'entity',
|
|
102
|
+
_a;
|
|
103
|
+
}
|
|
104
|
+
class WatcherConfig extends _WatcherConfigAspect(__.Entity) {
|
|
105
|
+
}
|
|
106
|
+
exports.WatcherConfig = WatcherConfig;
|
|
107
|
+
Object.defineProperty(WatcherConfig, 'name', { value: 'CardanoWatcherAdminService.WatcherConfigs' });
|
|
108
|
+
Object.defineProperty(WatcherConfig, 'is_singular', { value: true });
|
|
109
|
+
class WatcherConfigs extends Array {
|
|
110
|
+
}
|
|
111
|
+
exports.WatcherConfigs = WatcherConfigs;
|
|
112
|
+
Object.defineProperty(WatcherConfigs, 'name', { value: 'CardanoWatcherAdminService.WatcherConfigs' });
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
2
|
+
import * as _odatano_watch from './../odatano/watch';
|
|
3
|
+
import * as __ from './../_';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Cardano Watcher Admin Service
|
|
7
|
+
* Manages blockchain address monitoring and transaction tracking
|
|
8
|
+
*/
|
|
9
|
+
export default class {
|
|
10
|
+
declare static readonly startWatcher: typeof startWatcher;
|
|
11
|
+
declare static readonly stopWatcher: typeof stopWatcher;
|
|
12
|
+
declare static readonly getWatcherStatus: typeof getWatcherStatus;
|
|
13
|
+
declare static readonly addWatchedAddress: typeof addWatchedAddress;
|
|
14
|
+
declare static readonly removeWatchedAddress: typeof removeWatchedAddress;
|
|
15
|
+
declare static readonly addWatchedTransaction: typeof addWatchedTransaction;
|
|
16
|
+
declare static readonly removeWatchedTransaction: typeof removeWatchedTransaction;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function _WatchedAddressAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
|
|
20
|
+
return class WatchedAddress extends Base {
|
|
21
|
+
declare address?: __.Key<_odatano_watch.Bech32>
|
|
22
|
+
declare description?: string | null
|
|
23
|
+
declare active?: boolean | null
|
|
24
|
+
declare lastCheckedBlock?: number | null
|
|
25
|
+
declare network?: string | null
|
|
26
|
+
declare events?: __.Composition.of.many<BlockchainEvents>
|
|
27
|
+
declare hasEvents?: boolean | null
|
|
28
|
+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
|
|
29
|
+
declare static readonly keys: __.KeysOf<WatchedAddress>;
|
|
30
|
+
declare static readonly elements: __.ElementsOf<WatchedAddress>;
|
|
31
|
+
declare static readonly actions: globalThis.Record<never, never>;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export class WatchedAddress extends _WatchedAddressAspect(__.Entity) {}
|
|
35
|
+
Object.defineProperty(WatchedAddress, 'name', { value: 'CardanoWatcherAdminService.WatchedAddresses' })
|
|
36
|
+
Object.defineProperty(WatchedAddress, 'is_singular', { value: true })
|
|
37
|
+
export class WatchedAddresses extends Array<WatchedAddress> {$count?: number}
|
|
38
|
+
Object.defineProperty(WatchedAddresses, 'name', { value: 'CardanoWatcherAdminService.WatchedAddresses' })
|
|
39
|
+
|
|
40
|
+
export function _TransactionSubmissionAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
|
|
41
|
+
return class TransactionSubmission extends Base {
|
|
42
|
+
declare txHash?: __.Key<_odatano_watch.Blake2b256>
|
|
43
|
+
declare description?: string | null
|
|
44
|
+
declare active?: boolean | null
|
|
45
|
+
declare currentStatus?: string | null
|
|
46
|
+
declare confirmations?: number | null
|
|
47
|
+
declare network?: string | null
|
|
48
|
+
declare events?: __.Composition.of.many<BlockchainEvents>
|
|
49
|
+
declare hasEvents?: boolean | null
|
|
50
|
+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
|
|
51
|
+
declare static readonly keys: __.KeysOf<TransactionSubmission>;
|
|
52
|
+
declare static readonly elements: __.ElementsOf<TransactionSubmission>;
|
|
53
|
+
declare static readonly actions: globalThis.Record<never, never>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export class TransactionSubmission extends _TransactionSubmissionAspect(__.Entity) {}
|
|
57
|
+
Object.defineProperty(TransactionSubmission, 'name', { value: 'CardanoWatcherAdminService.TransactionSubmissions' })
|
|
58
|
+
Object.defineProperty(TransactionSubmission, 'is_singular', { value: true })
|
|
59
|
+
export class TransactionSubmissions extends Array<TransactionSubmission> {$count?: number}
|
|
60
|
+
Object.defineProperty(TransactionSubmissions, 'name', { value: 'CardanoWatcherAdminService.TransactionSubmissions' })
|
|
61
|
+
|
|
62
|
+
export function _BlockchainEventAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
|
|
63
|
+
return class BlockchainEvent extends Base {
|
|
64
|
+
declare id?: __.Key<string>
|
|
65
|
+
declare type?: string
|
|
66
|
+
declare description?: string | null
|
|
67
|
+
declare blockHeight?: number | null
|
|
68
|
+
declare blockHash?: _odatano_watch.Blake2b256 | null
|
|
69
|
+
declare txHash?: _odatano_watch.Blake2b256 | null
|
|
70
|
+
declare address?: __.Association.to<WatchedAddress> | null
|
|
71
|
+
declare address_address?: _odatano_watch.Bech32 | null
|
|
72
|
+
declare submission?: __.Association.to<TransactionSubmission> | null
|
|
73
|
+
declare submission_txHash?: _odatano_watch.Blake2b256 | null
|
|
74
|
+
declare payload?: string | null
|
|
75
|
+
declare processed?: boolean | null
|
|
76
|
+
declare processedAt?: __.CdsTimestamp | null
|
|
77
|
+
declare error?: string | null
|
|
78
|
+
declare network?: string | null
|
|
79
|
+
declare createdAt?: __.CdsTimestamp | null
|
|
80
|
+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
|
|
81
|
+
declare static readonly keys: __.KeysOf<BlockchainEvent>;
|
|
82
|
+
declare static readonly elements: __.ElementsOf<BlockchainEvent>;
|
|
83
|
+
declare static readonly actions: globalThis.Record<never, never>;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export class BlockchainEvent extends _BlockchainEventAspect(__.Entity) {}
|
|
87
|
+
Object.defineProperty(BlockchainEvent, 'name', { value: 'CardanoWatcherAdminService.BlockchainEvents' })
|
|
88
|
+
Object.defineProperty(BlockchainEvent, 'is_singular', { value: true })
|
|
89
|
+
export class BlockchainEvents extends Array<BlockchainEvent> {$count?: number}
|
|
90
|
+
Object.defineProperty(BlockchainEvents, 'name', { value: 'CardanoWatcherAdminService.BlockchainEvents' })
|
|
91
|
+
|
|
92
|
+
export function _WatcherConfigAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
|
|
93
|
+
return class WatcherConfig extends Base {
|
|
94
|
+
declare configKey?: __.Key<string>
|
|
95
|
+
declare value?: string | null
|
|
96
|
+
declare description?: string | null
|
|
97
|
+
declare updatedAt?: __.CdsTimestamp | null
|
|
98
|
+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
|
|
99
|
+
declare static readonly keys: __.KeysOf<WatcherConfig>;
|
|
100
|
+
declare static readonly elements: __.ElementsOf<WatcherConfig>;
|
|
101
|
+
declare static readonly actions: globalThis.Record<never, never>;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export class WatcherConfig extends _WatcherConfigAspect(__.Entity) {}
|
|
105
|
+
Object.defineProperty(WatcherConfig, 'name', { value: 'CardanoWatcherAdminService.WatcherConfigs' })
|
|
106
|
+
Object.defineProperty(WatcherConfig, 'is_singular', { value: true })
|
|
107
|
+
export class WatcherConfigs extends Array<WatcherConfig> {$count?: number}
|
|
108
|
+
Object.defineProperty(WatcherConfigs, 'name', { value: 'CardanoWatcherAdminService.WatcherConfigs' })
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
export declare const startWatcher: {
|
|
112
|
+
// positional
|
|
113
|
+
(): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
114
|
+
// named
|
|
115
|
+
({}: globalThis.Record<never, never>): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
116
|
+
// metadata (do not use)
|
|
117
|
+
__parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null, __self: never
|
|
118
|
+
kind: 'action'
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export declare const stopWatcher: {
|
|
122
|
+
// positional
|
|
123
|
+
(): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
124
|
+
// named
|
|
125
|
+
({}: globalThis.Record<never, never>): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
126
|
+
// metadata (do not use)
|
|
127
|
+
__parameters: globalThis.Record<never, never>, __returns: globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null, __self: never
|
|
128
|
+
kind: 'action'
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export declare const getWatcherStatus: {
|
|
132
|
+
// positional
|
|
133
|
+
(): globalThis.Promise< {
|
|
134
|
+
isRunning?: boolean | null,
|
|
135
|
+
addressPolling?: boolean | null,
|
|
136
|
+
transactionPolling?: boolean | null,
|
|
137
|
+
network?: string | null,
|
|
138
|
+
pollingIntervals?: {
|
|
139
|
+
address?: number | null,
|
|
140
|
+
transaction?: number | null,
|
|
141
|
+
} | null,
|
|
142
|
+
watchCounts?: {
|
|
143
|
+
addresses?: number | null,
|
|
144
|
+
submissions?: number | null,
|
|
145
|
+
newTransactions?: number | null,
|
|
146
|
+
} | null,
|
|
147
|
+
} | null> | {
|
|
148
|
+
isRunning?: boolean | null,
|
|
149
|
+
addressPolling?: boolean | null,
|
|
150
|
+
transactionPolling?: boolean | null,
|
|
151
|
+
network?: string | null,
|
|
152
|
+
pollingIntervals?: {
|
|
153
|
+
address?: number | null,
|
|
154
|
+
transaction?: number | null,
|
|
155
|
+
} | null,
|
|
156
|
+
watchCounts?: {
|
|
157
|
+
addresses?: number | null,
|
|
158
|
+
submissions?: number | null,
|
|
159
|
+
newTransactions?: number | null,
|
|
160
|
+
} | null,
|
|
161
|
+
} | null
|
|
162
|
+
// named
|
|
163
|
+
({}: globalThis.Record<never, never>): globalThis.Promise< {
|
|
164
|
+
isRunning?: boolean | null,
|
|
165
|
+
addressPolling?: boolean | null,
|
|
166
|
+
transactionPolling?: boolean | null,
|
|
167
|
+
network?: string | null,
|
|
168
|
+
pollingIntervals?: {
|
|
169
|
+
address?: number | null,
|
|
170
|
+
transaction?: number | null,
|
|
171
|
+
} | null,
|
|
172
|
+
watchCounts?: {
|
|
173
|
+
addresses?: number | null,
|
|
174
|
+
submissions?: number | null,
|
|
175
|
+
newTransactions?: number | null,
|
|
176
|
+
} | null,
|
|
177
|
+
} | null> | {
|
|
178
|
+
isRunning?: boolean | null,
|
|
179
|
+
addressPolling?: boolean | null,
|
|
180
|
+
transactionPolling?: boolean | null,
|
|
181
|
+
network?: string | null,
|
|
182
|
+
pollingIntervals?: {
|
|
183
|
+
address?: number | null,
|
|
184
|
+
transaction?: number | null,
|
|
185
|
+
} | null,
|
|
186
|
+
watchCounts?: {
|
|
187
|
+
addresses?: number | null,
|
|
188
|
+
submissions?: number | null,
|
|
189
|
+
newTransactions?: number | null,
|
|
190
|
+
} | null,
|
|
191
|
+
} | null
|
|
192
|
+
// metadata (do not use)
|
|
193
|
+
__parameters: globalThis.Record<never, never>, __returns: globalThis.Promise< {
|
|
194
|
+
isRunning?: boolean | null,
|
|
195
|
+
addressPolling?: boolean | null,
|
|
196
|
+
transactionPolling?: boolean | null,
|
|
197
|
+
network?: string | null,
|
|
198
|
+
pollingIntervals?: {
|
|
199
|
+
address?: number | null,
|
|
200
|
+
transaction?: number | null,
|
|
201
|
+
} | null,
|
|
202
|
+
watchCounts?: {
|
|
203
|
+
addresses?: number | null,
|
|
204
|
+
submissions?: number | null,
|
|
205
|
+
newTransactions?: number | null,
|
|
206
|
+
} | null,
|
|
207
|
+
} | null> | {
|
|
208
|
+
isRunning?: boolean | null,
|
|
209
|
+
addressPolling?: boolean | null,
|
|
210
|
+
transactionPolling?: boolean | null,
|
|
211
|
+
network?: string | null,
|
|
212
|
+
pollingIntervals?: {
|
|
213
|
+
address?: number | null,
|
|
214
|
+
transaction?: number | null,
|
|
215
|
+
} | null,
|
|
216
|
+
watchCounts?: {
|
|
217
|
+
addresses?: number | null,
|
|
218
|
+
submissions?: number | null,
|
|
219
|
+
newTransactions?: number | null,
|
|
220
|
+
} | null,
|
|
221
|
+
} | null, __self: never
|
|
222
|
+
kind: 'action'
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export declare const addWatchedAddress: {
|
|
226
|
+
// positional
|
|
227
|
+
(address: _odatano_watch.Bech32 | null, description: string | null, network: string | null): globalThis.Promise<WatchedAddress | null> | WatchedAddress | null
|
|
228
|
+
// named
|
|
229
|
+
({address, description, network}: {address?: _odatano_watch.Bech32 | null, description?: string | null, network?: string | null}): globalThis.Promise<WatchedAddress | null> | WatchedAddress | null
|
|
230
|
+
// metadata (do not use)
|
|
231
|
+
__parameters: {address?: _odatano_watch.Bech32 | null, description?: string | null, network?: string | null}, __returns: globalThis.Promise<WatchedAddress | null> | WatchedAddress | null, __self: never
|
|
232
|
+
kind: 'action'
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export declare const removeWatchedAddress: {
|
|
236
|
+
// positional
|
|
237
|
+
(address: _odatano_watch.Bech32 | null): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
238
|
+
// named
|
|
239
|
+
({address}: {address?: _odatano_watch.Bech32 | null}): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
240
|
+
// metadata (do not use)
|
|
241
|
+
__parameters: {address?: _odatano_watch.Bech32 | null}, __returns: globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null, __self: never
|
|
242
|
+
kind: 'action'
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export declare const addWatchedTransaction: {
|
|
246
|
+
// positional
|
|
247
|
+
(txHash: _odatano_watch.Blake2b256 | null, description: string | null, network: string | null): globalThis.Promise<TransactionSubmission | null> | TransactionSubmission | null
|
|
248
|
+
// named
|
|
249
|
+
({txHash, description, network}: {txHash?: _odatano_watch.Blake2b256 | null, description?: string | null, network?: string | null}): globalThis.Promise<TransactionSubmission | null> | TransactionSubmission | null
|
|
250
|
+
// metadata (do not use)
|
|
251
|
+
__parameters: {txHash?: _odatano_watch.Blake2b256 | null, description?: string | null, network?: string | null}, __returns: globalThis.Promise<TransactionSubmission | null> | TransactionSubmission | null, __self: never
|
|
252
|
+
kind: 'action'
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export declare const removeWatchedTransaction: {
|
|
256
|
+
// positional
|
|
257
|
+
(txHash: _odatano_watch.Blake2b256 | null): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
258
|
+
// named
|
|
259
|
+
({txHash}: {txHash?: _odatano_watch.Blake2b256 | null}): globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null
|
|
260
|
+
// metadata (do not use)
|
|
261
|
+
__parameters: {txHash?: _odatano_watch.Blake2b256 | null}, __returns: globalThis.Promise<_odatano_watch.WatcherActionResult | null> | _odatano_watch.WatcherActionResult | null, __self: never
|
|
262
|
+
kind: 'action'
|
|
263
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type } from '@sap/cds';
|
|
2
|
+
export type ElementsOf<T> = {
|
|
3
|
+
[name in keyof Required<T>]: type;
|
|
4
|
+
};
|
|
5
|
+
export declare namespace Association {
|
|
6
|
+
type to<T> = T;
|
|
7
|
+
namespace to {
|
|
8
|
+
type many<T extends readonly any[]> = T;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare namespace Composition {
|
|
12
|
+
type of<T> = T;
|
|
13
|
+
namespace of {
|
|
14
|
+
type many<T extends readonly any[]> = T;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare class Entity {
|
|
18
|
+
static data<T extends Entity>(this: T, _input: Object): T;
|
|
19
|
+
}
|
|
20
|
+
export type EntitySet<T> = T[] & {
|
|
21
|
+
data(input: object[]): T[];
|
|
22
|
+
data(input: object): T;
|
|
23
|
+
};
|
|
24
|
+
export type DraftEntity<T> = T & {
|
|
25
|
+
IsActiveEntity?: boolean | null;
|
|
26
|
+
HasActiveEntity?: boolean | null;
|
|
27
|
+
HasDraftEntity?: boolean | null;
|
|
28
|
+
DraftAdministrativeData_DraftUUID?: string | null;
|
|
29
|
+
};
|
|
30
|
+
export type DraftOf<T> = {
|
|
31
|
+
new (...args: any[]): DraftEntity<T>;
|
|
32
|
+
};
|
|
33
|
+
export type DraftsOf<T> = typeof Array<DraftEntity<T>>;
|
|
34
|
+
export type DeepRequired<T> = {
|
|
35
|
+
[K in keyof T]: DeepRequired<Unkey<T[K]>>;
|
|
36
|
+
} & Exclude<Required<T>, null>;
|
|
37
|
+
declare const key: unique symbol;
|
|
38
|
+
export type Key<T> = T & {
|
|
39
|
+
[key]?: true;
|
|
40
|
+
};
|
|
41
|
+
export type KeysOf<T> = {
|
|
42
|
+
[K in keyof T as NonNullable<T[K]> extends Key<unknown> ? K : never]-?: Key<{}>;
|
|
43
|
+
};
|
|
44
|
+
export type Unkey<T> = T extends Key<infer U> ? U : T;
|
|
45
|
+
/**
|
|
46
|
+
* Dates and timestamps are strings during runtime, so cds-typer represents them as such.
|
|
47
|
+
*/
|
|
48
|
+
export type CdsDate = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
|
|
49
|
+
/**
|
|
50
|
+
* @see {@link CdsDate}
|
|
51
|
+
*/
|
|
52
|
+
export type CdsDateTime = string;
|
|
53
|
+
/**
|
|
54
|
+
* @see {@link CdsDate}
|
|
55
|
+
*/
|
|
56
|
+
export type CdsTime = `${number}${number}:${number}${number}:${number}${number}`;
|
|
57
|
+
/**
|
|
58
|
+
* @see {@link CdsDate}
|
|
59
|
+
*/
|
|
60
|
+
export type CdsTimestamp = string;
|
|
61
|
+
export type CdsMap = {
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
export declare const createEntityProxy: (fqParts: any, opts?: {}) => any;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createEntityProxy = exports.Entity = void 0;
|
|
7
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
8
|
+
const cds_1 = __importDefault(require("@sap/cds"));
|
|
9
|
+
class Entity {
|
|
10
|
+
static data(_input) {
|
|
11
|
+
return {}; // mock
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Entity = Entity;
|
|
15
|
+
const key = Symbol('key'); // to avoid .key showing up in IDE's auto-completion
|
|
16
|
+
const createEntityProxy = function (fqParts, opts = {}) {
|
|
17
|
+
const { target, customProps } = { target: {}, customProps: [], ...opts };
|
|
18
|
+
const fq = fqParts.filter((p) => !!p).join('.');
|
|
19
|
+
return new Proxy(target, {
|
|
20
|
+
get: function (target, prop) {
|
|
21
|
+
if (cds_1.default.entities) {
|
|
22
|
+
target.__proto__ = cds_1.default.entities(fqParts[0])[fqParts[1]];
|
|
23
|
+
// overwrite/simplify getter after cds.entities is accessible
|
|
24
|
+
this.get = (target, prop) => target[prop];
|
|
25
|
+
return target[prop];
|
|
26
|
+
}
|
|
27
|
+
// we already know the name so we skip the cds.entities proxy access
|
|
28
|
+
if (prop === 'name')
|
|
29
|
+
return fq;
|
|
30
|
+
// custom properties access on 'target' as well as cached _entity property access goes here
|
|
31
|
+
if (Object.hasOwn(target, prop))
|
|
32
|
+
return target[prop];
|
|
33
|
+
// inline enums have to be caught here for first time access, as they do not exist on the entity
|
|
34
|
+
if (customProps.includes(prop))
|
|
35
|
+
return target[prop];
|
|
36
|
+
// last but not least we pass the property access to cds.entities
|
|
37
|
+
throw new Error(`Property ${prop} does not exist on entity '${fq}' or cds.entities is not yet defined. Ensure the CDS runtime is fully booted before accessing properties.`);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
exports.createEntityProxy = createEntityProxy;
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA,uFAAuF;AACvF,mDAA0B;AAmB1B,MAAa,MAAM;IACf,MAAM,CAAC,IAAI,CAA4B,MAAa;QAChD,OAAO,EAAO,CAAA,CAAC,OAAO;IAC1B,CAAC;CACJ;AAJD,wBAIC;AAqBD,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA,CAAE,oDAAoD;AA6BxE,MAAM,iBAAiB,GAAG,UAAU,OAAY,EAAE,IAAI,GAAG,EAAE;IAC9D,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAW,EAAE,GAAG,IAAI,EAAE,CAAA;IACjF,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACpD,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE;QACrB,GAAG,EAAE,UAAU,MAAU,EAAE,IAAQ;YAC/B,IAAI,aAAG,CAAC,QAAQ,EAAE,CAAC;gBACf,MAAM,CAAC,SAAS,GAAG,aAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;gBACvD,6DAA6D;gBAC7D,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;gBACzC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;YACvB,CAAC;YACD,oEAAoE;YACpE,IAAI,IAAI,KAAK,MAAM;gBAAE,OAAO,EAAE,CAAA;YAC9B,2FAA2F;YAC3F,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC;gBAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;YACpD,gGAAgG;YAChG,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAa,CAAC;gBAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;YAC5D,iEAAiE;YACjE,MAAM,IAAI,KAAK,CAAC,YAAY,IAAI,8BAA8B,EAAE,2GAA2G,CAAC,CAAA;QAChL,CAAC;KACJ,CAAC,CAAA;AACN,CAAC,CAAA;AArBY,QAAA,iBAAiB,qBAqB7B"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
2
|
+
import cds from '@sap/cds'
|
|
3
|
+
import { type } from '@sap/cds'
|
|
4
|
+
|
|
5
|
+
export type ElementsOf<T> = {[name in keyof Required<T>]: type }
|
|
6
|
+
|
|
7
|
+
export namespace Association {
|
|
8
|
+
export type to <T> = T;
|
|
9
|
+
export namespace to {
|
|
10
|
+
export type many <T extends readonly any[]> = T;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export namespace Composition {
|
|
15
|
+
export type of <T> = T;
|
|
16
|
+
export namespace of {
|
|
17
|
+
export type many <T extends readonly any[]> = T;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class Entity {
|
|
22
|
+
static data<T extends Entity> (this:T, _input:Object) : T {
|
|
23
|
+
return {} as T // mock
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type EntitySet<T> = T[] & {
|
|
28
|
+
data (input:object[]) : T[]
|
|
29
|
+
data (input:object) : T
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type DraftEntity<T> = T & {
|
|
33
|
+
IsActiveEntity?: boolean | null
|
|
34
|
+
HasActiveEntity?: boolean | null
|
|
35
|
+
HasDraftEntity?: boolean | null
|
|
36
|
+
DraftAdministrativeData_DraftUUID?: string | null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type DraftOf<T> = { new(...args: any[]): DraftEntity<T> }
|
|
40
|
+
export type DraftsOf<T> = typeof Array<DraftEntity<T>>
|
|
41
|
+
|
|
42
|
+
export type DeepRequired<T> = {
|
|
43
|
+
[K in keyof T]: DeepRequired<Unkey<T[K]>>
|
|
44
|
+
} & Exclude<Required<T>, null>;
|
|
45
|
+
|
|
46
|
+
const key = Symbol('key') // to avoid .key showing up in IDE's auto-completion
|
|
47
|
+
export type Key<T> = T & {[key]?: true}
|
|
48
|
+
|
|
49
|
+
export type KeysOf<T> = {
|
|
50
|
+
[K in keyof T as NonNullable<T[K]> extends Key<unknown> ? K : never]-?: Key<{}> // T[K]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type Unkey<T> = T extends Key<infer U> ? U : T
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Dates and timestamps are strings during runtime, so cds-typer represents them as such.
|
|
57
|
+
*/
|
|
58
|
+
export type CdsDate = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
|
|
59
|
+
/**
|
|
60
|
+
* @see {@link CdsDate}
|
|
61
|
+
*/
|
|
62
|
+
export type CdsDateTime = string;
|
|
63
|
+
/**
|
|
64
|
+
* @see {@link CdsDate}
|
|
65
|
+
*/
|
|
66
|
+
export type CdsTime = `${number}${number}:${number}${number}:${number}${number}`;
|
|
67
|
+
/**
|
|
68
|
+
* @see {@link CdsDate}
|
|
69
|
+
*/
|
|
70
|
+
export type CdsTimestamp = string;
|
|
71
|
+
|
|
72
|
+
export type CdsMap = { [key: string]: unknown };
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
export const createEntityProxy = function (fqParts: any, opts = {}) {
|
|
76
|
+
const { target, customProps } = { target: {}, customProps: [] as any[], ...opts }
|
|
77
|
+
const fq = fqParts.filter((p: any) => !!p).join('.')
|
|
78
|
+
return new Proxy(target, {
|
|
79
|
+
get: function (target:any, prop:any) {
|
|
80
|
+
if (cds.entities) {
|
|
81
|
+
target.__proto__ = cds.entities(fqParts[0])[fqParts[1]]
|
|
82
|
+
// overwrite/simplify getter after cds.entities is accessible
|
|
83
|
+
this.get = (target, prop) => target[prop]
|
|
84
|
+
return target[prop]
|
|
85
|
+
}
|
|
86
|
+
// we already know the name so we skip the cds.entities proxy access
|
|
87
|
+
if (prop === 'name') return fq
|
|
88
|
+
// custom properties access on 'target' as well as cached _entity property access goes here
|
|
89
|
+
if (Object.hasOwn(target, prop)) return target[prop]
|
|
90
|
+
// inline enums have to be caught here for first time access, as they do not exist on the entity
|
|
91
|
+
if (customProps.includes(prop as never)) return target[prop]
|
|
92
|
+
// last but not least we pass the property access to cds.entities
|
|
93
|
+
throw new Error(`Property ${prop} does not exist on entity '${fq}' or cds.entities is not yet defined. Ensure the CDS runtime is fully booted before accessing properties.`)
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
2
|
+
const { createEntityProxy } = require('./../../_')
|
|
3
|
+
// Messages
|
|
4
|
+
module.exports.Message = createEntityProxy(['cds.outbox', 'Messages'], { target: { is_singular: true } })
|
|
5
|
+
module.exports.Messages = createEntityProxy(['cds.outbox', 'Messages'], { target: { is_singular: false }})
|
|
6
|
+
// events
|
|
7
|
+
// actions
|
|
8
|
+
// enums
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wCAkBC;AArBD,uFAAuF;AACvF,8CAAgC;AAEhC,SAAgB,cAAc,CAA+C,IAAW;;IACtF,YAAO,MAAM,OAAQ,SAAQ,IAAI;SAgBhC;QAJiB,OAAI,GAAiC,QAAS;WAI9D;AACJ,CAAC;AACD,MAAa,OAAQ,SAAQ,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC;CAAG;AAAzD,0BAAyD;AACzD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAA;AACxE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;AAC9D,MAAa,QAAS,SAAQ,KAAc;CAAkB;AAA9D,4BAA8D;AAC9D,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
2
|
+
import * as __ from './../../_';
|
|
3
|
+
|
|
4
|
+
export function _MessageAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
|
|
5
|
+
return class Message extends Base {
|
|
6
|
+
declare ID?: __.Key<string>
|
|
7
|
+
declare timestamp?: __.CdsTimestamp | null
|
|
8
|
+
declare target?: string | null
|
|
9
|
+
declare msg?: string | null
|
|
10
|
+
declare attempts?: number | null
|
|
11
|
+
declare partition?: number | null
|
|
12
|
+
declare lastError?: string | null
|
|
13
|
+
declare lastAttemptTimestamp?: __.CdsTimestamp | null
|
|
14
|
+
declare status?: string | null
|
|
15
|
+
declare task?: string | null
|
|
16
|
+
declare appid?: string | null
|
|
17
|
+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
|
|
18
|
+
declare static readonly keys: __.KeysOf<Message>;
|
|
19
|
+
declare static readonly elements: __.ElementsOf<Message>;
|
|
20
|
+
declare static readonly actions: globalThis.Record<never, never>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export class Message extends _MessageAspect(__.Entity) {}
|
|
24
|
+
Object.defineProperty(Message, 'name', { value: 'cds.outbox.Messages' })
|
|
25
|
+
Object.defineProperty(Message, 'is_singular', { value: true })
|
|
26
|
+
export class Messages extends Array<Message> {$count?: number}
|
|
27
|
+
Object.defineProperty(Messages, 'name', { value: 'cds.outbox.Messages' })
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// This is an automatically generated file. Please do not change its contents manually!
|
|
4
|
+
/** Dummy service for bootstrapping MTX services */
|
|
5
|
+
class default_1 {
|
|
6
|
+
}
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,uFAAuF;AACvF,mDAAmD;AACnD;CACC;AADD,4BACC"}
|