@financeable/aggregation 0.13.3 → 0.14.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/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +240 -0
- package/RUNTIMES.md +48 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/examples/applicationsCreate.example.ts +179 -0
- package/examples/package-lock.json +610 -0
- package/examples/package.json +18 -0
- package/hooks/hooks.js +84 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/oauth2scopes.d.ts +13 -0
- package/hooks/oauth2scopes.d.ts.map +1 -0
- package/hooks/oauth2scopes.js +6 -0
- package/hooks/oauth2scopes.js.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.js +48 -0
- package/index.js.map +1 -0
- package/jsr.json +27 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +38 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +35 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.js +379 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.js +82 -0
- package/lib/env.js.map +1 -0
- package/lib/files.d.ts +13 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +77 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +67 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +217 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.js +218 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +26 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +111 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +38 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +153 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.js +62 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.js +274 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.js +145 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/abnstatus.d.ts +10 -0
- package/models/components/abnstatus.d.ts.map +1 -0
- package/models/components/abnstatus.js +48 -0
- package/models/components/abnstatus.js.map +1 -0
- package/models/components/addressattributes.js +98 -0
- package/models/components/addressattributes.js.map +1 -0
- package/models/components/apierrorlinks.js +50 -0
- package/models/components/apierrorlinks.js.map +1 -0
- package/models/components/applicationresource.js +57 -0
- package/models/components/applicationresource.js.map +1 -0
- package/models/components/applicationstatus.js +53 -0
- package/models/components/applicationstatus.js.map +1 -0
- package/models/components/australianstatesandterritories.js +55 -0
- package/models/components/australianstatesandterritories.js.map +1 -0
- package/models/components/badrequesterror.js +69 -0
- package/models/components/badrequesterror.js.map +1 -0
- package/models/components/businessapplicationjsonapirelationships.js +126 -0
- package/models/components/businessapplicationjsonapirelationships.js.map +1 -0
- package/models/components/businessapplicationpayload.js +79 -0
- package/models/components/businessapplicationpayload.js.map +1 -0
- package/models/components/businessapplicationresource.js +82 -0
- package/models/components/businessapplicationresource.js.map +1 -0
- package/models/components/businessloanbusinessapplicationrelationships.js +221 -0
- package/models/components/businessloanbusinessapplicationrelationships.js.map +1 -0
- package/models/components/commercialapplicationjsonapirelationships.js +153 -0
- package/models/components/commercialapplicationjsonapirelationships.js.map +1 -0
- package/models/components/commercialsecuredapplicationpayload.js +88 -0
- package/models/components/commercialsecuredapplicationpayload.js.map +1 -0
- package/models/components/commercialsecuredapplicationresource.js +81 -0
- package/models/components/commercialsecuredapplicationresource.js.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.js +223 -0
- package/models/components/commercialsecuredloanassetattributes.js.map +1 -0
- package/models/components/commercialsecuredloanassettype.js +73 -0
- package/models/components/commercialsecuredloanassettype.js.map +1 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +101 -6
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js +309 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -0
- package/models/components/commercialsecuredloantypeofsale.js +53 -0
- package/models/components/commercialsecuredloantypeofsale.js.map +1 -0
- package/models/components/consumerapplicationjsonapirelationships.js +127 -0
- package/models/components/consumerapplicationjsonapirelationships.js.map +1 -0
- package/models/components/consumersecuredapplicationpayload.js +89 -0
- package/models/components/consumersecuredapplicationpayload.js.map +1 -0
- package/models/components/consumersecuredapplicationresource.js +82 -0
- package/models/components/consumersecuredapplicationresource.js.map +1 -0
- package/models/components/consumersecuredloanassetattributes.js +225 -0
- package/models/components/consumersecuredloanassetattributes.js.map +1 -0
- package/models/components/consumersecuredloanassettype.js +61 -0
- package/models/components/consumersecuredloanassettype.js.map +1 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +105 -10
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js +344 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
- package/models/components/consumersecuredloantypeofsale.js +53 -0
- package/models/components/consumersecuredloantypeofsale.js.map +1 -0
- package/models/components/createsupportingdocumentsresponse.js +82 -0
- package/models/components/createsupportingdocumentsresponse.js.map +1 -0
- package/models/components/currencycodeiso4217.js +48 -0
- package/models/components/currencycodeiso4217.js.map +1 -0
- package/models/components/customerassetattributes.js +66 -0
- package/models/components/customerassetattributes.js.map +1 -0
- package/models/components/customerassettype.js +55 -0
- package/models/components/customerassettype.js.map +1 -0
- package/models/components/customerattributes.js +68 -0
- package/models/components/customerattributes.js.map +1 -0
- package/models/components/customerattributescreateitem.js +73 -0
- package/models/components/customerattributescreateitem.js.map +1 -0
- package/models/components/customeridtype.js +47 -0
- package/models/components/customeridtype.js.map +1 -0
- package/models/components/customerliabilityattributes.js +77 -0
- package/models/components/customerliabilityattributes.js.map +1 -0
- package/models/components/customerliabilityrepaymentfrequency.js +50 -0
- package/models/components/customerliabilityrepaymentfrequency.js.map +1 -0
- package/models/components/customerliabilitytype.js +53 -0
- package/models/components/customerliabilitytype.js.map +1 -0
- package/models/components/customertitle.js +51 -0
- package/models/components/customertitle.js.map +1 -0
- package/models/components/documenttype.js +64 -0
- package/models/components/documenttype.js.map +1 -0
- package/models/components/employerattributes.d.ts +58 -0
- package/models/components/employerattributes.d.ts.map +1 -0
- package/models/components/employerattributes.js +69 -0
- package/models/components/employerattributes.js.map +1 -0
- package/models/components/employmentstatus.d.ts +10 -0
- package/models/components/employmentstatus.d.ts.map +1 -0
- package/models/components/employmentstatus.js +47 -0
- package/models/components/employmentstatus.js.map +1 -0
- package/models/components/employmenttype.d.ts +15 -0
- package/models/components/employmenttype.d.ts.map +1 -0
- package/models/components/employmenttype.js +52 -0
- package/models/components/employmenttype.js.map +1 -0
- package/models/components/entityattributes.d.ts +4 -4
- package/models/components/entityattributes.d.ts.map +1 -1
- package/models/components/entityattributes.js +90 -0
- package/models/components/entityattributes.js.map +1 -0
- package/models/components/entityattributesinput.js +55 -0
- package/models/components/entityattributesinput.js.map +1 -0
- package/models/components/entitytype.d.ts +152 -0
- package/models/components/entitytype.d.ts.map +1 -0
- package/models/components/entitytype.js +190 -0
- package/models/components/entitytype.js.map +1 -0
- package/models/components/errorsource.js +52 -0
- package/models/components/errorsource.js.map +1 -0
- package/models/components/expenseattributes.js +55 -0
- package/models/components/expenseattributes.js.map +1 -0
- package/models/components/expensefrequency.js +48 -0
- package/models/components/expensefrequency.js.map +1 -0
- package/models/components/expensetype.js +65 -0
- package/models/components/expensetype.js.map +1 -0
- package/models/components/forbiddenerror.js +74 -0
- package/models/components/forbiddenerror.js.map +1 -0
- package/models/components/frequencytype.js +53 -0
- package/models/components/frequencytype.js.map +1 -0
- package/models/components/incomeattributes.js +55 -0
- package/models/components/incomeattributes.js.map +1 -0
- package/models/components/incomefrequency.js +49 -0
- package/models/components/incomefrequency.js.map +1 -0
- package/models/components/incometype.js +55 -0
- package/models/components/incometype.js.map +1 -0
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +98 -0
- package/models/components/index.js.map +1 -0
- package/models/components/industry.d.ts +27 -0
- package/models/components/industry.d.ts.map +1 -0
- package/models/components/industry.js +65 -0
- package/models/components/industry.js.map +1 -0
- package/models/components/linkobject.js +66 -0
- package/models/components/linkobject.js.map +1 -0
- package/models/components/livingarrangements.js +51 -0
- package/models/components/livingarrangements.js.map +1 -0
- package/models/components/loandetailsattributes.js +256 -0
- package/models/components/loandetailsattributes.js.map +1 -0
- package/models/components/maritalstatus.js +49 -0
- package/models/components/maritalstatus.js.map +1 -0
- package/models/components/monetaryquantity.js +71 -0
- package/models/components/monetaryquantity.js.map +1 -0
- package/models/components/occupation.d.ts +201 -0
- package/models/components/occupation.d.ts.map +1 -0
- package/models/components/occupation.js +239 -0
- package/models/components/occupation.js.map +1 -0
- package/models/components/paginationlinks.js +53 -0
- package/models/components/paginationlinks.js.map +1 -0
- package/models/components/paginationmeta.js +60 -0
- package/models/components/paginationmeta.js.map +1 -0
- package/models/components/percentagequantity.js +67 -0
- package/models/components/percentagequantity.js.map +1 -0
- package/models/components/personalapplicationjsonapirelationships.js +101 -0
- package/models/components/personalapplicationjsonapirelationships.js.map +1 -0
- package/models/components/personalapplicationpayload.js +79 -0
- package/models/components/personalapplicationpayload.js.map +1 -0
- package/models/components/personalapplicationresource.js +82 -0
- package/models/components/personalapplicationresource.js.map +1 -0
- package/models/components/personalloanpersonalapplicationrelationships.d.ts +105 -10
- package/models/components/personalloanpersonalapplicationrelationships.d.ts.map +1 -1
- package/models/components/personalloanpersonalapplicationrelationships.js +311 -0
- package/models/components/personalloanpersonalapplicationrelationships.js.map +1 -0
- package/models/components/relationshipresourcenotfound.js +74 -0
- package/models/components/relationshipresourcenotfound.js.map +1 -0
- package/models/components/repaymentstructure.js +53 -0
- package/models/components/repaymentstructure.js.map +1 -0
- package/models/components/residencystatus.js +52 -0
- package/models/components/residencystatus.js.map +1 -0
- package/models/components/resourcenotfound.js +74 -0
- package/models/components/resourcenotfound.js.map +1 -0
- package/models/components/security.js +49 -0
- package/models/components/security.js.map +1 -0
- package/models/components/supportingdocumentattributes.js +53 -0
- package/models/components/supportingdocumentattributes.js.map +1 -0
- package/models/components/supportingdocumentattributesinput.js +51 -0
- package/models/components/supportingdocumentattributesinput.js.map +1 -0
- package/models/components/supportingdocumentrelationships.js +269 -0
- package/models/components/supportingdocumentrelationships.js.map +1 -0
- package/models/components/supportingdocumentresource.js +61 -0
- package/models/components/supportingdocumentresource.js.map +1 -0
- package/models/components/tokenrequest.js +68 -0
- package/models/components/tokenrequest.js.map +1 -0
- package/models/components/tokenresponse.js +60 -0
- package/models/components/tokenresponse.js.map +1 -0
- package/models/components/uploadmimetype.js +55 -0
- package/models/components/uploadmimetype.js.map +1 -0
- package/models/errors/apierror.d.ts +10 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +34 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/financeableerror.d.ts +19 -0
- package/models/errors/financeableerror.d.ts.map +1 -0
- package/models/errors/financeableerror.js +20 -0
- package/models/errors/financeableerror.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.js +25 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/responsevalidationerror.js +66 -0
- package/models/errors/responsevalidationerror.js.map +1 -0
- package/models/errors/sdkvalidationerror.js +129 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/operations/createapplication.js +278 -0
- package/models/operations/createapplication.js.map +1 -0
- package/models/operations/getapplication.js +256 -0
- package/models/operations/getapplication.js.map +1 -0
- package/models/operations/index.js +24 -0
- package/models/operations/index.js.map +1 -0
- package/models/operations/listapplications.js +94 -0
- package/models/operations/listapplications.js.map +1 -0
- package/models/operations/supportingdocumentscreate.js +133 -0
- package/models/operations/supportingdocumentscreate.js.map +1 -0
- package/package.json +1 -16
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/sdk.js +23 -0
- package/sdk/sdk.js.map +1 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/abnstatus.ts +16 -0
- package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +241 -13
- package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +275 -19
- package/src/models/components/employerattributes.ts +97 -0
- package/src/models/components/employmentstatus.ts +17 -0
- package/src/models/components/employmenttype.ts +22 -0
- package/src/models/components/entityattributes.ts +9 -6
- package/src/models/components/entitytype.ts +215 -0
- package/src/models/components/index.ts +7 -0
- package/src/models/components/industry.ts +36 -0
- package/src/models/components/occupation.ts +226 -0
- package/src/models/components/personalloanpersonalapplicationrelationships.ts +272 -20
- package/tsconfig.json +40 -0
- package/types/async.d.ts +23 -0
- package/types/async.d.ts.map +1 -0
- package/types/async.js +44 -0
- package/types/async.js.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.js +66 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.js +29 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +27 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +83 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
- package/types/unrecognized.d.ts +16 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +34 -0
- package/types/unrecognized.js.map +1 -0
package/types/enums.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.inboundSchema = inboundSchema;
|
|
40
|
+
exports.inboundSchemaInt = inboundSchemaInt;
|
|
41
|
+
exports.outboundSchema = outboundSchema;
|
|
42
|
+
exports.outboundSchemaInt = outboundSchemaInt;
|
|
43
|
+
const z = __importStar(require("zod/v3"));
|
|
44
|
+
const unrecognized_js_1 = require("./unrecognized.js");
|
|
45
|
+
function inboundSchema(enumObj) {
|
|
46
|
+
const options = Object.values(enumObj);
|
|
47
|
+
return z.union([
|
|
48
|
+
...options.map(x => z.literal(x)),
|
|
49
|
+
z.string().transform(x => (0, unrecognized_js_1.unrecognized)(x)),
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
function inboundSchemaInt(enumObj) {
|
|
53
|
+
// For numeric enums, Object.values returns both numbers and string keys
|
|
54
|
+
const options = Object.values(enumObj).filter(v => typeof v === "number");
|
|
55
|
+
return z.union([
|
|
56
|
+
...options.map(x => z.literal(x)),
|
|
57
|
+
z.number().int().transform(x => (0, unrecognized_js_1.unrecognized)(x)),
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
function outboundSchema(_) {
|
|
61
|
+
return z.string();
|
|
62
|
+
}
|
|
63
|
+
function outboundSchemaInt(_) {
|
|
64
|
+
return z.number().int();
|
|
65
|
+
}
|
|
66
|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B,CAAI;IAEJ,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAS,CAAC;AACjC,CAAC"}
|
package/types/fp.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A monad that captures the result of a function call or an error if it was not
|
|
3
|
+
* successful. Railway programming, enabled by this type, can be a nicer
|
|
4
|
+
* alternative to traditional exception throwing because it allows functions to
|
|
5
|
+
* declare all _known_ errors with static types and then check for them
|
|
6
|
+
* exhaustively in application code. Thrown exception have a type of `unknown`
|
|
7
|
+
* and break out of regular control flow of programs making them harder to
|
|
8
|
+
* inspect and more verbose work with due to try-catch blocks.
|
|
9
|
+
*/
|
|
10
|
+
export type Result<T, E = unknown> = {
|
|
11
|
+
ok: true;
|
|
12
|
+
value: T;
|
|
13
|
+
error?: never;
|
|
14
|
+
} | {
|
|
15
|
+
ok: false;
|
|
16
|
+
value?: never;
|
|
17
|
+
error: E;
|
|
18
|
+
};
|
|
19
|
+
export declare function OK<V>(value: V): Result<V, never>;
|
|
20
|
+
export declare function ERR<E>(error: E): Result<never, E>;
|
|
21
|
+
/**
|
|
22
|
+
* unwrap is a convenience function for extracting a value from a result or
|
|
23
|
+
* throwing if there was an error.
|
|
24
|
+
*/
|
|
25
|
+
export declare function unwrap<T>(r: Result<T, unknown>): T;
|
|
26
|
+
/**
|
|
27
|
+
* unwrapAsync is a convenience function for resolving a value from a Promise
|
|
28
|
+
* of a result or rejecting if an error occurred.
|
|
29
|
+
*/
|
|
30
|
+
export declare function unwrapAsync<T>(pr: Promise<Result<T, unknown>>): Promise<T>;
|
|
31
|
+
//# sourceMappingURL=fp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fp.d.ts","sourceRoot":"","sources":["../src/types/fp.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,IAC7B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACrC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAE3C,wBAAgB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAEhD;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAEjD;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAKlD;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,CAAC,EACjC,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GAC9B,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
package/types/fp.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OK = OK;
|
|
7
|
+
exports.ERR = ERR;
|
|
8
|
+
exports.unwrap = unwrap;
|
|
9
|
+
exports.unwrapAsync = unwrapAsync;
|
|
10
|
+
function OK(value) {
|
|
11
|
+
return { ok: true, value };
|
|
12
|
+
}
|
|
13
|
+
function ERR(error) {
|
|
14
|
+
return { ok: false, error };
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* unwrap is a convenience function for extracting a value from a result or
|
|
18
|
+
* throwing if there was an error.
|
|
19
|
+
*/
|
|
20
|
+
function unwrap(r) {
|
|
21
|
+
if (!r.ok) {
|
|
22
|
+
throw r.error;
|
|
23
|
+
}
|
|
24
|
+
return r.value;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* unwrapAsync is a convenience function for resolving a value from a Promise
|
|
28
|
+
* of a result or rejecting if an error occurred.
|
|
29
|
+
*/
|
|
30
|
+
async function unwrapAsync(pr) {
|
|
31
|
+
const r = await pr;
|
|
32
|
+
if (!r.ok) {
|
|
33
|
+
throw r.error;
|
|
34
|
+
}
|
|
35
|
+
return r.value;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=fp.js.map
|
package/types/fp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fp.js","sourceRoot":"","sources":["../src/types/fp.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAeH,gBAEC;AAED,kBAEC;AAMD,wBAKC;AAMD,kCASC;AAhCD,SAAgB,EAAE,CAAI,KAAQ;IAC5B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED,SAAgB,GAAG,CAAI,KAAQ;IAC7B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,SAAgB,MAAM,CAAI,CAAqB;IAC7C,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,CAAC,CAAC,KAAK,CAAC;IAChB,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC;AACjB,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,WAAW,CAC/B,EAA+B;IAE/B,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,CAAC,CAAC,KAAK,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,CAAC,KAAK,CAAC;AACjB,CAAC"}
|
package/types/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.RFCDate = exports.createPageIterator = exports.isBlobLike = exports.blobLikeSchema = void 0;
|
|
21
|
+
var blobs_js_1 = require("./blobs.js");
|
|
22
|
+
Object.defineProperty(exports, "blobLikeSchema", { enumerable: true, get: function () { return blobs_js_1.blobLikeSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "isBlobLike", { enumerable: true, get: function () { return blobs_js_1.isBlobLike; } });
|
|
24
|
+
var operations_js_1 = require("./operations.js");
|
|
25
|
+
Object.defineProperty(exports, "createPageIterator", { enumerable: true, get: function () { return operations_js_1.createPageIterator; } });
|
|
26
|
+
var rfcdate_js_1 = require("./rfcdate.js");
|
|
27
|
+
Object.defineProperty(exports, "RFCDate", { enumerable: true, get: function () { return rfcdate_js_1.RFCDate; } });
|
|
28
|
+
__exportStar(require("./unrecognized.js"), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAEH,uCAAwD;AAA/C,0GAAA,cAAc,OAAA;AAAE,sGAAA,UAAU,OAAA;AAInC,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,oDAAkC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Result } from "./fp.js";
|
|
2
|
+
export type Paginator<V> = () => Promise<V & {
|
|
3
|
+
next: Paginator<V>;
|
|
4
|
+
}> | null;
|
|
5
|
+
export type PageIterator<V, PageState = unknown> = V & {
|
|
6
|
+
next: Paginator<V>;
|
|
7
|
+
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
8
|
+
"~next"?: PageState | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function createPageIterator<V>(page: V & {
|
|
11
|
+
next: Paginator<V>;
|
|
12
|
+
}, halt: (v: V) => boolean): {
|
|
13
|
+
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* This utility create a special iterator that yields a single value and
|
|
17
|
+
* terminates. It is useful in paginated SDK functions that have early return
|
|
18
|
+
* paths when things go wrong.
|
|
19
|
+
*/
|
|
20
|
+
export declare function haltIterator<V extends object>(v: V): PageIterator<V, undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
|
|
23
|
+
* When error results occur, the underlying error value is thrown.
|
|
24
|
+
*/
|
|
25
|
+
export declare function unwrapResultIterator<V, PageState>(iteratorPromise: Promise<PageIterator<Result<V, unknown>, PageState>>): Promise<PageIterator<V, PageState>>;
|
|
26
|
+
export declare const URL_OVERRIDE: unique symbol;
|
|
27
|
+
//# sourceMappingURL=operations.d.ts.map
|
|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CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.URL_OVERRIDE = void 0;
|
|
7
|
+
exports.createPageIterator = createPageIterator;
|
|
8
|
+
exports.haltIterator = haltIterator;
|
|
9
|
+
exports.unwrapResultIterator = unwrapResultIterator;
|
|
10
|
+
function createPageIterator(page, halt) {
|
|
11
|
+
return {
|
|
12
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
13
|
+
yield page;
|
|
14
|
+
if (halt(page)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
let p = page;
|
|
18
|
+
for (p = await p.next(); p != null; p = await p.next()) {
|
|
19
|
+
yield p;
|
|
20
|
+
if (halt(p)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* This utility create a special iterator that yields a single value and
|
|
29
|
+
* terminates. It is useful in paginated SDK functions that have early return
|
|
30
|
+
* paths when things go wrong.
|
|
31
|
+
*/
|
|
32
|
+
function haltIterator(v) {
|
|
33
|
+
return {
|
|
34
|
+
...v,
|
|
35
|
+
next: () => null,
|
|
36
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
37
|
+
yield v;
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
|
|
43
|
+
* When error results occur, the underlying error value is thrown.
|
|
44
|
+
*/
|
|
45
|
+
async function unwrapResultIterator(iteratorPromise) {
|
|
46
|
+
const resultIter = await iteratorPromise;
|
|
47
|
+
if (!resultIter.ok) {
|
|
48
|
+
throw resultIter.error;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
...resultIter.value,
|
|
52
|
+
next: unwrapPaginator(resultIter.next),
|
|
53
|
+
"~next": resultIter["~next"],
|
|
54
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
55
|
+
for await (const page of resultIter) {
|
|
56
|
+
if (!page.ok) {
|
|
57
|
+
throw page.error;
|
|
58
|
+
}
|
|
59
|
+
yield page.value;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function unwrapPaginator(paginator) {
|
|
65
|
+
return () => {
|
|
66
|
+
const nextResult = paginator();
|
|
67
|
+
if (nextResult == null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return nextResult.then((res) => {
|
|
71
|
+
if (!res.ok) {
|
|
72
|
+
throw res.error;
|
|
73
|
+
}
|
|
74
|
+
const out = {
|
|
75
|
+
...res.value,
|
|
76
|
+
next: unwrapPaginator(res.next),
|
|
77
|
+
};
|
|
78
|
+
return out;
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
exports.URL_OVERRIDE = Symbol("URL_OVERRIDE");
|
|
83
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/types/operations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAYH,gDAsBC;AAOD,oCAUC;AAMD,oDAsBC;AAnED,SAAgB,kBAAkB,CAChC,IAAgC,EAChC,IAAuB;IAIvB,OAAO;QACL,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,SAAS;YAC/C,MAAM,IAAI,CAAC;YACX,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACf,OAAO;YACT,CAAC;YAED,IAAI,CAAC,GAAuB,IAAI,CAAC;YACjC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,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,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,MAAM,GAAG,CAAC,KAAK,CAAC;YAClB,CAAC;YACD,MAAM,GAAG,GAAG;gBACV,GAAG,GAAG,CAAC,KAAK;gBACZ,IAAI,EAAE,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;aAChC,CAAC;YACF,OAAO,GAAG,CAAC;QACb,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class RFCDate {
|
|
2
|
+
private serialized;
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new RFCDate instance using today's date.
|
|
5
|
+
*/
|
|
6
|
+
static today(): RFCDate;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new RFCDate instance using the provided input.
|
|
9
|
+
* If a string is used then in must be in the format YYYY-MM-DD.
|
|
10
|
+
*
|
|
11
|
+
* @param date A Date object or a date string in YYYY-MM-DD format
|
|
12
|
+
* @example
|
|
13
|
+
* new RFCDate("2022-01-01")
|
|
14
|
+
* @example
|
|
15
|
+
* new RFCDate(new Date())
|
|
16
|
+
*/
|
|
17
|
+
constructor(date: Date | string);
|
|
18
|
+
toJSON(): string;
|
|
19
|
+
toString(): string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=rfcdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfcdate.d.ts","sourceRoot":"","sources":["../src/types/rfcdate.ts"],"names":[],"mappings":"AAMA,qBAAa,OAAO;IAClB,OAAO,CAAC,UAAU,CAAS;IAE3B;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,OAAO;IAIvB;;;;;;;;;OASG;gBACS,IAAI,EAAE,IAAI,GAAG,MAAM;IAoB/B,MAAM,IAAI,MAAM;IAIhB,QAAQ,IAAI,MAAM;CAGnB"}
|
package/types/rfcdate.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RFCDate = void 0;
|
|
7
|
+
const dateRE = /^\d{4}-\d{2}-\d{2}$/;
|
|
8
|
+
class RFCDate {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new RFCDate instance using today's date.
|
|
11
|
+
*/
|
|
12
|
+
static today() {
|
|
13
|
+
return new RFCDate(new Date());
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new RFCDate instance using the provided input.
|
|
17
|
+
* If a string is used then in must be in the format YYYY-MM-DD.
|
|
18
|
+
*
|
|
19
|
+
* @param date A Date object or a date string in YYYY-MM-DD format
|
|
20
|
+
* @example
|
|
21
|
+
* new RFCDate("2022-01-01")
|
|
22
|
+
* @example
|
|
23
|
+
* new RFCDate(new Date())
|
|
24
|
+
*/
|
|
25
|
+
constructor(date) {
|
|
26
|
+
if (typeof date === "string" && !dateRE.test(date)) {
|
|
27
|
+
throw new RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: " + date);
|
|
28
|
+
}
|
|
29
|
+
const value = new Date(date);
|
|
30
|
+
if (isNaN(+value)) {
|
|
31
|
+
throw new RangeError("RFCDate: invalid date provided: " + date);
|
|
32
|
+
}
|
|
33
|
+
this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length);
|
|
34
|
+
if (!dateRE.test(this.serialized)) {
|
|
35
|
+
throw new TypeError(`RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
toJSON() {
|
|
39
|
+
return this.toString();
|
|
40
|
+
}
|
|
41
|
+
toString() {
|
|
42
|
+
return this.serialized;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.RFCDate = RFCDate;
|
|
46
|
+
//# sourceMappingURL=rfcdate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfcdate.js","sourceRoot":"","sources":["../src/types/rfcdate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,MAAM,MAAM,GAAG,qBAAqB,CAAC;AAErC,MAAa,OAAO;IAGlB;;OAEG;IACH,MAAM,CAAC,KAAK;QACV,OAAO,IAAI,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,IAAmB;QAC7B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,MAAM,IAAI,UAAU,CAClB,0DAA0D,GAAG,IAAI,CAClE,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,MAAM,IAAI,UAAU,CAAC,kCAAkC,GAAG,IAAI,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,SAAS,CACjB,yDAAyD,IAAI,kBAAkB,IAAI,CAAC,UAAU,EAAE,CACjG,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF;AA/CD,0BA+CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../src/types/streams.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,UAAU,EAC7C,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAc1B"}
|
package/types/streams.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isReadableStream = isReadableStream;
|
|
7
|
+
function isReadableStream(val) {
|
|
8
|
+
if (typeof val !== "object" || val === null) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
// Check for the presence of methods specific to ReadableStream
|
|
12
|
+
const stream = val;
|
|
13
|
+
// ReadableStream has methods like getReader, cancel, and tee
|
|
14
|
+
return (typeof stream.getReader === "function" &&
|
|
15
|
+
typeof stream.cancel === "function" &&
|
|
16
|
+
typeof stream.tee === "function");
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=streams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../src/types/streams.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,4CAgBC;AAhBD,SAAgB,gBAAgB,CAC9B,GAAY;IAEZ,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,+DAA+D;IAC/D,MAAM,MAAM,GAAG,GAAiC,CAAC;IAEjD,6DAA6D;IAC7D,OAAO,CACL,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU;QACtC,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU;QACnC,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU,CACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const __brand: unique symbol;
|
|
2
|
+
export type Unrecognized<T> = T & {
|
|
3
|
+
[__brand]: "unrecognized";
|
|
4
|
+
};
|
|
5
|
+
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
|
+
export declare function startCountingUnrecognized(): {
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number) => number;
|
|
14
|
+
};
|
|
15
|
+
export { unrecognized };
|
|
16
|
+
//# sourceMappingURL=unrecognized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;kBACW,MAAM;EAQvB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.startCountingUnrecognized = startCountingUnrecognized;
|
|
7
|
+
exports.unrecognized = unrecognized;
|
|
8
|
+
function unrecognized(value) {
|
|
9
|
+
globalCount++;
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
let globalCount = 0;
|
|
13
|
+
let refCount = 0;
|
|
14
|
+
function startCountingUnrecognized() {
|
|
15
|
+
refCount++;
|
|
16
|
+
const start = globalCount;
|
|
17
|
+
return {
|
|
18
|
+
/**
|
|
19
|
+
* Ends counting and returns the delta.
|
|
20
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
21
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
22
|
+
* If not provided, records all counts since start().
|
|
23
|
+
*/
|
|
24
|
+
end: (delta) => {
|
|
25
|
+
const count = globalCount - start;
|
|
26
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
27
|
+
globalCount = start + (delta ?? count);
|
|
28
|
+
if (--refCount === 0)
|
|
29
|
+
globalCount = 0;
|
|
30
|
+
return count;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=unrecognized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,8DAkBC;AAEQ,oCAAY;AA3BrB,SAAS,YAAY,CAAI,KAAQ;IAC/B,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAClC,CAAC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAgB,yBAAyB;IACvC,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE;YACtB,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,qEAAqE;YACrE,WAAW,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;YACvC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
|