@osdk/client 2.2.0-beta.19 → 2.2.0-beta.20
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/CHANGELOG.md +13 -0
- package/build/browser/util/UserAgent.js +1 -1
- package/build/cjs/{Client-C6Gohd1t.d.cts → Client-CgL2LKN9.d.cts} +1 -1
- package/build/cjs/chunk-33GHS3X4.cjs +35 -37
- package/build/cjs/chunk-33GHS3X4.cjs.map +1 -1
- package/build/cjs/chunk-37QC7LR3.cjs +12 -12
- package/build/cjs/chunk-37QC7LR3.cjs.map +1 -1
- package/build/cjs/index.cjs +47 -47
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +1 -1
- package/build/cjs/public/internal.d.cts +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +35 -35
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +2 -2
- package/build/esm/util/UserAgent.js +1 -1
- package/build/types/index.d.ts +4 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/public/unstable-do-not-use.d.ts +3 -3
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/package.json +8 -8
package/build/cjs/index.cjs
CHANGED
|
@@ -55,7 +55,7 @@ function applyPageToken(payload, {
|
|
|
55
55
|
return pageToken ? {
|
|
56
56
|
...payload,
|
|
57
57
|
pageToken
|
|
58
|
-
} :
|
|
58
|
+
} : void 0;
|
|
59
59
|
}
|
|
60
60
|
async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
|
|
61
61
|
let payload = initialPayload;
|
|
@@ -72,7 +72,7 @@ async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
|
|
|
72
72
|
function createSimpleCache(map = /* @__PURE__ */ new Map(), fn) {
|
|
73
73
|
function get(key) {
|
|
74
74
|
let r = map.get(key);
|
|
75
|
-
if (r ===
|
|
75
|
+
if (r === void 0 && fn !== void 0) {
|
|
76
76
|
return set(key, fn(key));
|
|
77
77
|
} else {
|
|
78
78
|
return r;
|
|
@@ -120,7 +120,7 @@ function createSimpleAsyncCache(type, fn, createCacheLocal = createSimpleCache)
|
|
|
120
120
|
var cachedAllOntologies;
|
|
121
121
|
async function getOntologyVersionForRid(ctx, ontologyRid) {
|
|
122
122
|
cachedAllOntologies ??= await client_unstable.loadAllOntologies(ctx, {});
|
|
123
|
-
!cachedAllOntologies.ontologies[ontologyRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "ontology should be loaded") : invariant__default.default(false) :
|
|
123
|
+
!cachedAllOntologies.ontologies[ontologyRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "ontology should be loaded") : invariant__default.default(false) : void 0;
|
|
124
124
|
return cachedAllOntologies.ontologies[ontologyRid].currentOntologyVersion;
|
|
125
125
|
}
|
|
126
126
|
var strongMemoAsync = (fn) => createSimpleAsyncCache("strong", fn).get;
|
|
@@ -162,7 +162,7 @@ var MetadataClient = class {
|
|
|
162
162
|
[objectTypeRid]: await this.ontologyVersion("")
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
|
-
!linkTypes.linkTypes[objectTypeRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "link type should be loaded") : invariant__default.default(false) :
|
|
165
|
+
!linkTypes.linkTypes[objectTypeRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "link type should be loaded") : invariant__default.default(false) : void 0;
|
|
166
166
|
const ret = {};
|
|
167
167
|
for (const l of linkTypes.linkTypes[objectTypeRid]) {
|
|
168
168
|
const helper = ({
|
|
@@ -232,22 +232,22 @@ var MetadataClient = class {
|
|
|
232
232
|
interfaceTypes: [],
|
|
233
233
|
typeGroups: [],
|
|
234
234
|
loadRedacted: false,
|
|
235
|
-
includeObjectTypeCount:
|
|
235
|
+
includeObjectTypeCount: void 0,
|
|
236
236
|
includeObjectTypesWithoutSearchableDatasources: true,
|
|
237
|
-
includeEntityMetadata:
|
|
237
|
+
includeEntityMetadata: void 0,
|
|
238
238
|
actionTypes: [],
|
|
239
|
-
includeTypeGroupEntitiesCount:
|
|
240
|
-
entityMetadata:
|
|
239
|
+
includeTypeGroupEntitiesCount: void 0,
|
|
240
|
+
entityMetadata: void 0
|
|
241
241
|
};
|
|
242
|
-
const entities = await client_unstable.bulkLoadOntologyEntities(this.#ctx,
|
|
243
|
-
!entities.objectTypes[0]?.objectType ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "object type should be loaded") : invariant__default.default(false) :
|
|
242
|
+
const entities = await client_unstable.bulkLoadOntologyEntities(this.#ctx, void 0, body);
|
|
243
|
+
!entities.objectTypes[0]?.objectType ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "object type should be loaded") : invariant__default.default(false) : void 0;
|
|
244
244
|
return entities.objectTypes[0].objectType;
|
|
245
245
|
});
|
|
246
246
|
ontologyVersion = strongMemoAsync(async (_) => getOntologyVersionForRid(this.#ctx, await this.#client.ontologyRid));
|
|
247
247
|
};
|
|
248
248
|
var metadataCacheClient = weakMemoAsync((client) => Promise.resolve(new MetadataClient(client)));
|
|
249
249
|
function createObjectPropertyMapping(conjureOT) {
|
|
250
|
-
!(conjureOT.primaryKeys.length === 1) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `only one primary key supported, got ${conjureOT.primaryKeys.length}`) : invariant__default.default(false) :
|
|
250
|
+
!(conjureOT.primaryKeys.length === 1) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `only one primary key supported, got ${conjureOT.primaryKeys.length}`) : invariant__default.default(false) : void 0;
|
|
251
251
|
const pkRid = conjureOT.primaryKeys[0];
|
|
252
252
|
const pkProperty = Object.values(conjureOT.propertyTypes).find((a) => a.rid === pkRid);
|
|
253
253
|
if (!pkProperty) {
|
|
@@ -279,7 +279,7 @@ function createBulkLinksAsyncIterFactory(ctx) {
|
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
281
|
ctx.logger?.debug("Preparing to fetch bulk links");
|
|
282
|
-
!objs.every((a) => a.$objectType === objs[0].$objectType) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) :
|
|
282
|
+
!objs.every((a) => a.$objectType === objs[0].$objectType) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) : void 0;
|
|
283
283
|
const mcc = await metadataCacheClient(ctx);
|
|
284
284
|
const helper = await mcc.forObjectByApiName(objs[0].$objectType);
|
|
285
285
|
const [objectTypeRid, propertyMapping, fullLinkMapping] = await Promise.all([helper.getRid(), helper.getPropertyMapping(), helper.getLinkMapping()]);
|
|
@@ -291,21 +291,21 @@ function createBulkLinksAsyncIterFactory(ctx) {
|
|
|
291
291
|
}
|
|
292
292
|
const req = {
|
|
293
293
|
objectSetContext: {
|
|
294
|
-
forkRid:
|
|
294
|
+
forkRid: void 0,
|
|
295
295
|
objectSetFilterContext: {
|
|
296
296
|
parameterOverrides: {}
|
|
297
297
|
},
|
|
298
|
-
ontologyBranchRid:
|
|
299
|
-
owningRid:
|
|
300
|
-
reportUsage:
|
|
301
|
-
workstateRid:
|
|
298
|
+
ontologyBranchRid: void 0,
|
|
299
|
+
owningRid: void 0,
|
|
300
|
+
reportUsage: void 0,
|
|
301
|
+
workstateRid: void 0
|
|
302
302
|
},
|
|
303
303
|
responseOptions: {
|
|
304
304
|
includeObjectSetEntities: true,
|
|
305
305
|
includeUsageCost: false
|
|
306
306
|
},
|
|
307
307
|
pageSize: 1e3,
|
|
308
|
-
pageToken:
|
|
308
|
+
pageToken: void 0,
|
|
309
309
|
linksRequests: [{
|
|
310
310
|
directedLinkTypes: Object.values(linkMapping).map(({
|
|
311
311
|
directedLinkTypeRid
|
|
@@ -318,7 +318,7 @@ function createBulkLinksAsyncIterFactory(ctx) {
|
|
|
318
318
|
})))
|
|
319
319
|
}]
|
|
320
320
|
};
|
|
321
|
-
const bulkLinksIter = pageRequestAsAsyncIter(client_unstable.getBulkLinksPage.bind(
|
|
321
|
+
const bulkLinksIter = pageRequestAsAsyncIter(client_unstable.getBulkLinksPage.bind(void 0, makeConjureContext(ctx, "object-set-service/api")), getResults, applyPageToken, req);
|
|
322
322
|
for await (const item of bulkLinksIter) {
|
|
323
323
|
const {
|
|
324
324
|
objectIdentifier
|
|
@@ -479,7 +479,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
481
|
const edits = response.edits;
|
|
482
|
-
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits :
|
|
482
|
+
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
483
483
|
} else {
|
|
484
484
|
const response = await chunk37QC7LR3_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
485
485
|
parameters: await remapActionParams(parameters, client),
|
|
@@ -495,7 +495,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
495
495
|
throw new ActionValidationError(response.validation);
|
|
496
496
|
}
|
|
497
497
|
const edits = response.edits;
|
|
498
|
-
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits :
|
|
498
|
+
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
async function remapActionParams(params, client) {
|
|
@@ -995,7 +995,7 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
995
995
|
const rawValue = rawObject[p];
|
|
996
996
|
const propDef = objectDef.properties[p];
|
|
997
997
|
if (process.env.NODE_ENV !== "production") {
|
|
998
|
-
!(propDef != null && typeof propDef.type === "string" && specialPropertyTypes.has(propDef.type)) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) :
|
|
998
|
+
!(propDef != null && typeof propDef.type === "string" && specialPropertyTypes.has(propDef.type)) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) : void 0;
|
|
999
999
|
}
|
|
1000
1000
|
if (propDef.type === "attachment") {
|
|
1001
1001
|
if (Array.isArray(rawValue)) {
|
|
@@ -1013,7 +1013,7 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1013
1013
|
type: "Point",
|
|
1014
1014
|
coordinates: rawValue.position
|
|
1015
1015
|
}
|
|
1016
|
-
} :
|
|
1016
|
+
} : void 0);
|
|
1017
1017
|
}
|
|
1018
1018
|
if (propDef.type === "mediaReference") {
|
|
1019
1019
|
return new MediaReferencePropertyImpl({
|
|
@@ -1028,12 +1028,12 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1028
1028
|
// src/object/convertWireToOsdkObjects.ts
|
|
1029
1029
|
async function convertWireToOsdkObjects(client, objects, interfaceApiName, forceRemoveRid = false, derivedPropertyTypesByName, selectedProps, strictNonNull = false) {
|
|
1030
1030
|
fixObjectPropertiesInPlace(objects, forceRemoveRid);
|
|
1031
|
-
const ifaceDef = interfaceApiName ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName) :
|
|
1032
|
-
const ifaceSelected = ifaceDef ? selectedProps ?? Object.keys(ifaceDef.properties) :
|
|
1031
|
+
const ifaceDef = interfaceApiName ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName) : void 0;
|
|
1032
|
+
const ifaceSelected = ifaceDef ? selectedProps ?? Object.keys(ifaceDef.properties) : void 0;
|
|
1033
1033
|
const ret = [];
|
|
1034
1034
|
for (const rawObj of objects) {
|
|
1035
1035
|
const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
|
|
1036
|
-
!objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) :
|
|
1036
|
+
!objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : void 0;
|
|
1037
1037
|
let objProps;
|
|
1038
1038
|
let conforming = true;
|
|
1039
1039
|
if (ifaceDef && ifaceSelected) {
|
|
@@ -1061,11 +1061,11 @@ async function convertWireToOsdkObjects2(client, objects, interfaceApiName, deri
|
|
|
1061
1061
|
const ret = [];
|
|
1062
1062
|
for (const rawObj of objects) {
|
|
1063
1063
|
const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
|
|
1064
|
-
!objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) :
|
|
1065
|
-
const interfaceToObjMapping = interfaceApiName ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] :
|
|
1064
|
+
!objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : void 0;
|
|
1065
|
+
const interfaceToObjMapping = interfaceApiName ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] : void 0;
|
|
1066
1066
|
const ifaceSelected = interfaceApiName && interfaceToObjMapping ? selectedProps ? Object.keys(interfaceToObjMapping).filter((val) => {
|
|
1067
1067
|
selectedProps?.includes(interfaceToObjMapping[val]);
|
|
1068
|
-
}) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] :
|
|
1068
|
+
}) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : void 0;
|
|
1069
1069
|
let objProps;
|
|
1070
1070
|
let conforming = true;
|
|
1071
1071
|
if (interfaceApiName && ifaceSelected) {
|
|
@@ -1095,7 +1095,7 @@ function reframeAsObjectInPlace(objectDef, interfaceApiName, rawObj) {
|
|
|
1095
1095
|
if (sptProp in rawObj) {
|
|
1096
1096
|
const value = rawObj[sptProp];
|
|
1097
1097
|
delete rawObj[sptProp];
|
|
1098
|
-
if (value !==
|
|
1098
|
+
if (value !== void 0) {
|
|
1099
1099
|
newProps[regularProp] = value;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
@@ -1160,7 +1160,7 @@ function createClientCache(fn) {
|
|
|
1160
1160
|
cache.set(client.clientCacheKey, /* @__PURE__ */ new Map());
|
|
1161
1161
|
}
|
|
1162
1162
|
let r = cache.get(client.clientCacheKey).get(key);
|
|
1163
|
-
if (r ===
|
|
1163
|
+
if (r === void 0 && fn !== void 0) {
|
|
1164
1164
|
return set(client, key, fn(client, key));
|
|
1165
1165
|
} else {
|
|
1166
1166
|
return r;
|
|
@@ -1238,7 +1238,7 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1238
1238
|
let objectDef = await loadFullObjectMetadata(client3, key);
|
|
1239
1239
|
const interfaceDefs = Object.fromEntries((await Promise.all(objectDef.implements?.map((i) => ret.getInterfaceDefinition(i)) ?? [])).map((i) => [i.apiName, {
|
|
1240
1240
|
def: i,
|
|
1241
|
-
handler:
|
|
1241
|
+
handler: void 0
|
|
1242
1242
|
}]));
|
|
1243
1243
|
const fullObjectDef = {
|
|
1244
1244
|
...objectDef,
|
|
@@ -1274,7 +1274,7 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1274
1274
|
};
|
|
1275
1275
|
|
|
1276
1276
|
// src/util/UserAgent.ts
|
|
1277
|
-
var USER_AGENT = `osdk-client/${"2.2.0-beta.
|
|
1277
|
+
var USER_AGENT = `osdk-client/${"2.2.0-beta.20"}`;
|
|
1278
1278
|
|
|
1279
1279
|
// src/createMinimalClient.ts
|
|
1280
1280
|
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk33GHS3X4_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
@@ -1449,7 +1449,7 @@ async function remapQueryParams(params, client, paramTypes) {
|
|
|
1449
1449
|
async function remapQueryResponse(client, responseDataType, responseValue, definitions) {
|
|
1450
1450
|
if (responseValue == null) {
|
|
1451
1451
|
if (responseDataType.nullable) {
|
|
1452
|
-
return
|
|
1452
|
+
return void 0;
|
|
1453
1453
|
} else {
|
|
1454
1454
|
throw new Error("Got null response when nullable was not allowed");
|
|
1455
1455
|
}
|
|
@@ -1513,10 +1513,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1513
1513
|
}
|
|
1514
1514
|
case "map": {
|
|
1515
1515
|
const map = {};
|
|
1516
|
-
!Array.isArray(responseValue) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected array entry") : invariant__default.default(false) :
|
|
1516
|
+
!Array.isArray(responseValue) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected array entry") : invariant__default.default(false) : void 0;
|
|
1517
1517
|
for (const entry of responseValue) {
|
|
1518
|
-
!entry.key ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected key") : invariant__default.default(false) :
|
|
1519
|
-
!entry.value ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected value") : invariant__default.default(false) :
|
|
1518
|
+
!entry.key ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected key") : invariant__default.default(false) : void 0;
|
|
1519
|
+
!entry.value ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected value") : invariant__default.default(false) : void 0;
|
|
1520
1520
|
const key = responseDataType.keyType.type === "object" ? getObjectSpecifier(entry.key, responseDataType.keyType.object, definitions) : entry.key;
|
|
1521
1521
|
const value = await remapQueryResponse(client, responseDataType.valueType, entry.value, definitions);
|
|
1522
1522
|
map[key] = value;
|
|
@@ -1634,7 +1634,7 @@ function getObjectSpecifier(primaryKey, objectTypeApiName, definitions) {
|
|
|
1634
1634
|
function createQueryObjectResponse(primaryKey, objectDef) {
|
|
1635
1635
|
return {
|
|
1636
1636
|
$apiName: objectDef.apiName,
|
|
1637
|
-
$title:
|
|
1637
|
+
$title: void 0,
|
|
1638
1638
|
$objectType: objectDef.apiName,
|
|
1639
1639
|
$primaryKey: primaryKey,
|
|
1640
1640
|
$objectSpecifier: createObjectSpecifierFromPrimaryKey(objectDef, primaryKey)
|
|
@@ -1644,16 +1644,16 @@ function createQueryObjectResponse(primaryKey, objectDef) {
|
|
|
1644
1644
|
// src/createClient.ts
|
|
1645
1645
|
var ActionInvoker = class {
|
|
1646
1646
|
constructor(clientCtx, actionDef) {
|
|
1647
|
-
this.applyAction = applyAction.bind(
|
|
1648
|
-
this.batchApplyAction = applyAction.bind(
|
|
1647
|
+
this.applyAction = applyAction.bind(void 0, clientCtx, actionDef);
|
|
1648
|
+
this.batchApplyAction = applyAction.bind(void 0, clientCtx, actionDef);
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
1651
|
var QueryInvoker = class {
|
|
1652
1652
|
constructor(clientCtx, queryDef) {
|
|
1653
|
-
this.executeFunction = applyQuery.bind(
|
|
1653
|
+
this.executeFunction = applyQuery.bind(void 0, clientCtx, queryDef);
|
|
1654
1654
|
}
|
|
1655
1655
|
};
|
|
1656
|
-
function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvider, options =
|
|
1656
|
+
function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
1657
1657
|
if (typeof ontologyRid === "string") {
|
|
1658
1658
|
if (!ontologyRid.startsWith("ri.")) {
|
|
1659
1659
|
throw new Error("Invalid ontology RID");
|
|
@@ -1717,7 +1717,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1717
1717
|
throw new Error("not implemented");
|
|
1718
1718
|
}
|
|
1719
1719
|
}
|
|
1720
|
-
const fetchMetadata = fetchMetadataInternal.bind(
|
|
1720
|
+
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
1721
1721
|
const symbolClientContext2 = "__osdkClientContext";
|
|
1722
1722
|
const client = Object.defineProperties(clientFn, {
|
|
1723
1723
|
[chunk37QC7LR3_cjs.symbolClientContext]: {
|
|
@@ -1735,7 +1735,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1735
1735
|
});
|
|
1736
1736
|
return client;
|
|
1737
1737
|
}
|
|
1738
|
-
var createClient = createClientInternal.bind(
|
|
1738
|
+
var createClient = createClientInternal.bind(void 0, chunk33GHS3X4_cjs.createObjectSet);
|
|
1739
1739
|
function createWithRid(rids) {
|
|
1740
1740
|
const withRid = {
|
|
1741
1741
|
type: "static",
|
|
@@ -1743,13 +1743,13 @@ function createWithRid(rids) {
|
|
|
1743
1743
|
};
|
|
1744
1744
|
return withRid;
|
|
1745
1745
|
}
|
|
1746
|
-
function createPlatformClient(baseUrl, tokenProvider, options =
|
|
1746
|
+
function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
1747
1747
|
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);
|
|
1748
1748
|
}
|
|
1749
1749
|
var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
1750
1750
|
var extractDate = (dateTime) => {
|
|
1751
|
-
!(dateTime.length < 33) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Invalid date format. Provided input is too long.") : invariant__default.default(false) :
|
|
1752
|
-
!isoRegex.test(dateTime) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant__default.default(false) :
|
|
1751
|
+
!(dateTime.length < 33) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Invalid date format. Provided input is too long.") : invariant__default.default(false) : void 0;
|
|
1752
|
+
!isoRegex.test(dateTime) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant__default.default(false) : void 0;
|
|
1753
1753
|
return extractDateFromIsoString(dateTime);
|
|
1754
1754
|
};
|
|
1755
1755
|
var extractDateInUTC = (date) => {
|