@transcend-io/cli 4.84.0 → 4.86.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/README.md +24 -23
- package/build/cli-cron-pull-identifiers.js +18 -10
- package/build/cli-cron-pull-identifiers.js.map +1 -1
- package/build/cli-mark-request-data-silos-completed.js +32 -1
- package/build/cli-mark-request-data-silos-completed.js.map +1 -1
- package/build/cli-request-export.js +7 -2
- package/build/cli-request-export.js.map +1 -1
- package/build/codecs.d.ts +2 -1
- package/build/codecs.d.ts.map +1 -1
- package/build/codecs.js +1 -0
- package/build/codecs.js.map +1 -1
- package/build/cron/index.d.ts +1 -1
- package/build/cron/index.d.ts.map +1 -1
- package/build/cron/index.js +1 -1
- package/build/cron/index.js.map +1 -1
- package/build/cron/markRequestDataSiloIdsCompleted.d.ts +6 -3
- package/build/cron/markRequestDataSiloIdsCompleted.d.ts.map +1 -1
- package/build/cron/markRequestDataSiloIdsCompleted.js +8 -38
- package/build/cron/markRequestDataSiloIdsCompleted.js.map +1 -1
- package/build/cron/pullCustomSiloOutstandingIdentifiers.d.ts +33 -0
- package/build/cron/pullCustomSiloOutstandingIdentifiers.d.ts.map +1 -0
- package/build/cron/pullCustomSiloOutstandingIdentifiers.js +56 -0
- package/build/cron/pullCustomSiloOutstandingIdentifiers.js.map +1 -0
- package/build/requests/index.d.ts +1 -1
- package/build/requests/index.d.ts.map +1 -1
- package/build/requests/index.js +1 -1
- package/build/requests/index.js.map +1 -1
- package/build/requests/{pullRequestsToCsv.d.ts → pullPrivacyRequests.d.ts} +11 -6
- package/build/requests/pullPrivacyRequests.d.ts.map +1 -0
- package/build/requests/{pullRequestsToCsv.js → pullPrivacyRequests.js} +7 -12
- package/build/requests/pullPrivacyRequests.js.map +1 -0
- package/build/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/build/cron/pullCronIdentifiersToCsv.d.ts +0 -24
- package/build/cron/pullCronIdentifiersToCsv.d.ts.map +0 -1
- package/build/cron/pullCronIdentifiersToCsv.js +0 -53
- package/build/cron/pullCronIdentifiersToCsv.js.map +0 -1
- package/build/requests/pullRequestsToCsv.d.ts.map +0 -1
- package/build/requests/pullRequestsToCsv.js.map +0 -1
package/README.md
CHANGED
|
@@ -1157,47 +1157,47 @@ The API key must be associated to the ID of the integration/data silo that is be
|
|
|
1157
1157
|
|
|
1158
1158
|
#### Arguments
|
|
1159
1159
|
|
|
1160
|
-
| Argument | Description
|
|
1161
|
-
| ------------ |
|
|
1162
|
-
| auth | The Transcend API key with the scopes necessary for the command.
|
|
1163
|
-
| dataSiloId | The ID of the data silo to pull in.
|
|
1164
|
-
|
|
|
1165
|
-
| file | Path to the CSV file where identifiers will be written to.
|
|
1166
|
-
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting.
|
|
1167
|
-
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra.
|
|
1168
|
-
| pageLimit | The page limit to use when pulling in pages of identifiers.
|
|
1160
|
+
| Argument | Description | Type | Default | Required |
|
|
1161
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------------ | -------- |
|
|
1162
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
1163
|
+
| dataSiloId | The ID of the data silo to pull in. | string - UUID | N/A | true |
|
|
1164
|
+
| actions | The [request action](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to restart. | RequestAction[] | N/A | true |
|
|
1165
|
+
| file | Path to the CSV file where identifiers will be written to. | string - file-path | ./cron-identifiers.csv | false |
|
|
1166
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
1167
|
+
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
|
|
1168
|
+
| pageLimit | The page limit to use when pulling in pages of identifiers. | number | 100 | false |
|
|
1169
1169
|
|
|
1170
1170
|
#### Usage
|
|
1171
1171
|
|
|
1172
1172
|
```sh
|
|
1173
|
-
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --
|
|
1173
|
+
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE
|
|
1174
1174
|
```
|
|
1175
1175
|
|
|
1176
1176
|
Pull to a specific file location
|
|
1177
1177
|
|
|
1178
1178
|
```sh
|
|
1179
|
-
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --
|
|
1179
|
+
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE \
|
|
1180
1180
|
--file=/Users/transcend/Desktop/test.csv
|
|
1181
1181
|
```
|
|
1182
1182
|
|
|
1183
1183
|
For self-hosted sombras that use an internal key:
|
|
1184
1184
|
|
|
1185
1185
|
```sh
|
|
1186
|
-
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --
|
|
1186
|
+
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE \
|
|
1187
1187
|
--sombraAuth=$SOMBRA_INTERNAL_KEY
|
|
1188
1188
|
```
|
|
1189
1189
|
|
|
1190
1190
|
Specifying the backend URL, needed for US hosted backend infrastructure.
|
|
1191
1191
|
|
|
1192
1192
|
```sh
|
|
1193
|
-
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --
|
|
1193
|
+
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE \
|
|
1194
1194
|
--transcendUrl=https://api.us.transcend.io
|
|
1195
1195
|
```
|
|
1196
1196
|
|
|
1197
1197
|
Specifying the page limit, defaults to 100.
|
|
1198
1198
|
|
|
1199
1199
|
```sh
|
|
1200
|
-
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --
|
|
1200
|
+
yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE \
|
|
1201
1201
|
--pageLimit=300
|
|
1202
1202
|
```
|
|
1203
1203
|
|
|
@@ -1207,7 +1207,7 @@ This command takes the output of `tr-cron-pull-identifiers` and notifies Transce
|
|
|
1207
1207
|
This is used in the workflow like:
|
|
1208
1208
|
|
|
1209
1209
|
1. Pull identifiers to CSV:
|
|
1210
|
-
`yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --
|
|
1210
|
+
`yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE --file=./outstanding-requests.csv`
|
|
1211
1211
|
2. Run your process to operate on that CSV of requests.
|
|
1212
1212
|
3. Notify Transcend of completion
|
|
1213
1213
|
`yarn tr-cron-mark-identifiers-completed --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --file=./outstanding-requests.csv`
|
|
@@ -1280,13 +1280,14 @@ The API key must have the following scopes:
|
|
|
1280
1280
|
|
|
1281
1281
|
#### Arguments
|
|
1282
1282
|
|
|
1283
|
-
| Argument | Description
|
|
1284
|
-
| ------------ |
|
|
1285
|
-
| auth | The Transcend API key with the scopes necessary for the command.
|
|
1286
|
-
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting.
|
|
1287
|
-
| file | Path to the CSV file where requests will be written to.
|
|
1288
|
-
| actions | The
|
|
1289
|
-
|
|
1283
|
+
| Argument | Description | Type | Default | Required |
|
|
1284
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ----------------------------------- | -------- |
|
|
1285
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
1286
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
1287
|
+
| file | Path to the CSV file where requests will be written to. | string - file-path | ./manual-enrichment-identifiers.csv | false |
|
|
1288
|
+
| actions | The [request action](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to pull for. | RequestAction[] | N/A | false |
|
|
1289
|
+
|
|
1290
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
1290
1291
|
|
|
1291
1292
|
#### Usage
|
|
1292
1293
|
|
|
@@ -1390,7 +1391,7 @@ yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherI
|
|
|
1390
1391
|
### tr-mark-request-data-silos-completed
|
|
1391
1392
|
|
|
1392
1393
|
This command takes in a CSV of Request IDs as well as a Data Silo ID and marks all associated privacy request jobs as completed.
|
|
1393
|
-
This command is useful with the "Bulk Response" UI.
|
|
1394
|
+
This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".
|
|
1394
1395
|
|
|
1395
1396
|
#### Authentication
|
|
1396
1397
|
|
|
@@ -7,9 +7,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
8
8
|
const colors_1 = __importDefault(require("colors"));
|
|
9
9
|
const logger_1 = require("./logger");
|
|
10
|
+
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
10
11
|
const cron_1 = require("./cron");
|
|
11
12
|
const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
12
13
|
const constants_1 = require("./constants");
|
|
14
|
+
const requests_1 = require("./requests");
|
|
13
15
|
/**
|
|
14
16
|
* Pull the set of active identifiers for a cron job silo.
|
|
15
17
|
*
|
|
@@ -18,40 +20,46 @@ const constants_1 = require("./constants");
|
|
|
18
20
|
* Dev Usage:
|
|
19
21
|
* yarn ts-node ./src/cli-cron-pull-identifiers.ts --auth=$TRANSCEND_API_KEY \
|
|
20
22
|
* --dataSiloId=92636cda-b7c6-48c6-b1b1-2df574596cbc \
|
|
21
|
-
* --
|
|
23
|
+
* --actions=ERASURE \
|
|
22
24
|
* --file=/Users/michaelfarrell/Desktop/test.csv
|
|
23
25
|
*
|
|
24
26
|
* Standard usage:
|
|
25
27
|
* yarn tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY \
|
|
26
28
|
* --dataSiloId=92636cda-b7c6-48c6-b1b1-2df574596cbc \
|
|
27
|
-
* --
|
|
29
|
+
* --actions=ERASURE \
|
|
28
30
|
* --file=/Users/michaelfarrell/Desktop/test.csv
|
|
29
31
|
*/
|
|
30
32
|
async function main() {
|
|
31
33
|
// Parse command line arguments
|
|
32
|
-
const { file = './cron-identifiers.csv', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, auth, sombraAuth, dataSiloId,
|
|
34
|
+
const { file = './cron-identifiers.csv', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, auth, sombraAuth, dataSiloId, actions, pageLimit = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
33
35
|
// Ensure auth is passed
|
|
34
36
|
if (!auth) {
|
|
35
37
|
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
|
|
36
38
|
process.exit(1);
|
|
37
39
|
}
|
|
38
|
-
// Validate
|
|
40
|
+
// Validate actions
|
|
41
|
+
const parsedActions = (0, requests_1.splitCsvToList)(actions);
|
|
42
|
+
const invalidActions = parsedActions.filter(
|
|
39
43
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
(type) => !Object.values(privacy_types_1.RequestAction).includes(type));
|
|
45
|
+
if (invalidActions.length > 0) {
|
|
46
|
+
logger_1.logger.error(colors_1.default.red(`Failed to parse actions:"${invalidActions.join(',')}".\n` +
|
|
42
47
|
`Expected one of: \n${Object.values(privacy_types_1.RequestAction).join('\n')}`));
|
|
43
48
|
process.exit(1);
|
|
44
49
|
}
|
|
45
|
-
//
|
|
46
|
-
await (0, cron_1.
|
|
47
|
-
file,
|
|
50
|
+
// Pull down outstanding identifiers
|
|
51
|
+
const { identifiersFormattedForCsv } = await (0, cron_1.pullCustomSiloOutstandingIdentifiers)({
|
|
48
52
|
transcendUrl,
|
|
49
53
|
pageLimit: parseInt(pageLimit, 10),
|
|
50
|
-
|
|
54
|
+
actions: parsedActions,
|
|
51
55
|
auth,
|
|
52
56
|
sombraAuth,
|
|
53
57
|
dataSiloId,
|
|
54
58
|
});
|
|
59
|
+
// Write CSV
|
|
60
|
+
const headers = (0, uniq_1.default)(identifiersFormattedForCsv.map((d) => Object.keys(d)).flat());
|
|
61
|
+
(0, cron_1.writeCsv)(file, identifiersFormattedForCsv, headers);
|
|
62
|
+
logger_1.logger.info(colors_1.default.green(`Successfully wrote ${identifiersFormattedForCsv.length} identifiers to file "${file}"`));
|
|
55
63
|
}
|
|
56
64
|
main();
|
|
57
65
|
//# sourceMappingURL=cli-cron-pull-identifiers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-cron-pull-identifiers.js","sourceRoot":"","sources":["../src/cli-cron-pull-identifiers.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"cli-cron-pull-identifiers.js","sourceRoot":"","sources":["../src/cli-cron-pull-identifiers.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,uDAA+B;AAC/B,iCAAwE;AACxE,+DAA4D;AAC5D,2CAAoD;AACpD,yCAA4C;AAE5C;;;;;;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KACX,CAAC,CAAC;IAEL,YAAY;IACZ,MAAM,OAAO,GAAG,IAAA,cAAI,EAClB,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAC7D,CAAC;IACF,IAAA,eAAQ,EAAC,IAAI,EAAE,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACpD,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,sBAAsB,0BAA0B,CAAC,MAAM,yBAAyB,IAAI,GAAG,CACxF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
3
26
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
27
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
28
|
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
8
31
|
const colors_1 = __importDefault(require("colors"));
|
|
32
|
+
const t = __importStar(require("io-ts"));
|
|
9
33
|
const logger_1 = require("./logger");
|
|
10
34
|
const cron_1 = require("./cron");
|
|
11
35
|
const constants_1 = require("./constants");
|
|
36
|
+
const requests_1 = require("./requests");
|
|
37
|
+
const RequestIdRow = t.type({
|
|
38
|
+
'Request Id': t.string,
|
|
39
|
+
});
|
|
12
40
|
/**
|
|
13
41
|
* Given a set of Request IDs and a Data Silo ID, mark the RequestDataSilos as completed
|
|
14
42
|
*
|
|
@@ -38,9 +66,12 @@ async function main() {
|
|
|
38
66
|
logger_1.logger.error(colors_1.default.red('A Data Silo ID must be provided. You can specify using --dataSiloId=2560bb81-b837-4c6f-a57e-dcef87069d43'));
|
|
39
67
|
process.exit(1);
|
|
40
68
|
}
|
|
69
|
+
// Read from CSV
|
|
70
|
+
logger_1.logger.info(colors_1.default.magenta(`Reading "${file}" from disk`));
|
|
71
|
+
const activeResults = (0, requests_1.readCsv)(file, RequestIdRow);
|
|
41
72
|
// Upload privacy requests
|
|
42
73
|
await (0, cron_1.markRequestDataSiloIdsCompleted)({
|
|
43
|
-
|
|
74
|
+
requestIds: activeResults.map((request) => request['Request Id']),
|
|
44
75
|
transcendUrl,
|
|
45
76
|
auth,
|
|
46
77
|
dataSiloId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-mark-request-data-silos-completed.js","sourceRoot":"","sources":["../src/cli-mark-request-data-silos-completed.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-mark-request-data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AC;QACjE,YAAY;QACZ,IAAI;QACJ,UAAU;KACX,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -7,9 +7,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
8
8
|
const colors_1 = __importDefault(require("colors"));
|
|
9
9
|
const logger_1 = require("./logger");
|
|
10
|
+
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
10
11
|
const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
11
12
|
const requests_1 = require("./requests");
|
|
12
13
|
const constants_1 = require("./constants");
|
|
14
|
+
const cron_1 = require("./cron");
|
|
13
15
|
/**
|
|
14
16
|
* Pull down the metadata for a set of Privacy requests.
|
|
15
17
|
*
|
|
@@ -56,8 +58,7 @@ async function main() {
|
|
|
56
58
|
process.exit(1);
|
|
57
59
|
}
|
|
58
60
|
// Pull privacy requests
|
|
59
|
-
await (0, requests_1.
|
|
60
|
-
file,
|
|
61
|
+
const { requestsFormattedForCsv } = await (0, requests_1.pullPrivacyRequests)({
|
|
61
62
|
transcendUrl,
|
|
62
63
|
pageLimit: parseInt(pageLimit, 10),
|
|
63
64
|
actions: parsedActions,
|
|
@@ -67,6 +68,10 @@ async function main() {
|
|
|
67
68
|
createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
|
|
68
69
|
showTests: showTests === 'true' ? true : showTests === 'false' ? false : undefined,
|
|
69
70
|
});
|
|
71
|
+
// Write to CSV
|
|
72
|
+
const headers = (0, uniq_1.default)(requestsFormattedForCsv.map((d) => Object.keys(d)).flat());
|
|
73
|
+
(0, cron_1.writeCsv)(file, requestsFormattedForCsv, headers);
|
|
74
|
+
logger_1.logger.info(colors_1.default.green(`Successfully wrote ${requestsFormattedForCsv.length} requests to file "${file}"`));
|
|
70
75
|
}
|
|
71
76
|
main();
|
|
72
77
|
//# sourceMappingURL=cli-request-export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-request-export.js","sourceRoot":"","sources":["../src/cli-request-export.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA2E;AAC3E,
|
|
1
|
+
{"version":3,"file":"cli-request-export.js","sourceRoot":"","sources":["../src/cli-request-export.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,uDAA+B;AAC/B,+DAA2E;AAC3E,yCAAiE;AACjE,2CAAoD;AACpD,iCAAkC;AAElC;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,gCAAgC,EACvC,YAAY,GAAG,iCAAqB,EACpC,IAAI,EACJ,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,EAAE,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,SAAS,GAAG,KAAK,GAClB,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAA8B,CAAC;IAE9D,wBAAwB;IACxB,IAAI,CAAC,IAAI,EAAE;QACT,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,uFAAuF,CACxF,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,mBAAmB;IACnB,MAAM,aAAa,GAAG,IAAA,yBAAc,EAAC,OAAO,CAAoB,CAAC;IACjE,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM;IACzC,8DAA8D;IAC9D,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,QAAQ,CAAC,IAAW,CAAC,CAC9D,CAAC;IACF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,G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AC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;KAC1E,CAAC,CAAC;IAEH,eAAe;IACf,MAAM,OAAO,GAAG,IAAA,cAAI,EAClB,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAC1D,CAAC;IACF,IAAA,eAAQ,EAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACjD,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,sBAAsB,uBAAuB,CAAC,MAAM,sBAAsB,IAAI,GAAG,CAClF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/build/codecs.d.ts
CHANGED
|
@@ -63474,7 +63474,8 @@ export type AIIntegrationC<T extends t.Mixed> = t.TypeC<{
|
|
|
63474
63474
|
/** The codec of OpenAI routeName */
|
|
63475
63475
|
export type OpenAIRouteNameC = t.UnionC<[
|
|
63476
63476
|
t.LiteralC<'/v1/chat/completions'>,
|
|
63477
|
-
t.LiteralC<'/v1/embeddings'
|
|
63477
|
+
t.LiteralC<'/v1/embeddings'>,
|
|
63478
|
+
t.LiteralC<'/v1/completions'>
|
|
63478
63479
|
]>;
|
|
63479
63480
|
/**
|
|
63480
63481
|
* The names of the OpenAI routes that we support setting policies for
|