@gbg/go-core 0.0.1-alpha.18 → 0.0.1-alpha.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/LICENSE.md +21 -0
- package/README.md +4 -9
- package/dist/commonjs/funcs/devices-add.d.ts +2 -0
- package/dist/commonjs/funcs/devices-add.d.ts.map +1 -1
- package/dist/commonjs/funcs/devices-add.js +3 -1
- package/dist/commonjs/funcs/devices-add.js.map +1 -1
- package/dist/commonjs/funcs/instances-delete.d.ts +2 -0
- package/dist/commonjs/funcs/instances-delete.d.ts.map +1 -1
- package/dist/commonjs/funcs/instances-delete.js +3 -1
- package/dist/commonjs/funcs/instances-delete.js.map +1 -1
- package/dist/commonjs/funcs/journeys-get-state.d.ts +2 -0
- package/dist/commonjs/funcs/journeys-get-state.d.ts.map +1 -1
- package/dist/commonjs/funcs/journeys-get-state.js +3 -1
- package/dist/commonjs/funcs/journeys-get-state.js.map +1 -1
- package/dist/commonjs/funcs/journeys-start.d.ts +2 -0
- package/dist/commonjs/funcs/journeys-start.d.ts.map +1 -1
- package/dist/commonjs/funcs/journeys-start.js +3 -1
- package/dist/commonjs/funcs/journeys-start.js.map +1 -1
- package/dist/commonjs/funcs/tasks-get-schema.d.ts +2 -0
- package/dist/commonjs/funcs/tasks-get-schema.d.ts.map +1 -1
- package/dist/commonjs/funcs/tasks-get-schema.js +3 -1
- package/dist/commonjs/funcs/tasks-get-schema.js.map +1 -1
- package/dist/commonjs/funcs/tasks-list-schema.d.ts +2 -0
- package/dist/commonjs/funcs/tasks-list-schema.d.ts.map +1 -1
- package/dist/commonjs/funcs/tasks-list-schema.js +3 -1
- package/dist/commonjs/funcs/tasks-list-schema.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +20 -5
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -1
- package/dist/commonjs/lib/files.js +19 -0
- package/dist/commonjs/lib/files.js.map +1 -1
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +0 -1
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +8 -4
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +20 -10
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/lib/url.d.ts.map +1 -1
- package/dist/commonjs/lib/url.js +4 -2
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/operations/post-auth-realms-go-protocol-openid-connect-token.d.ts +1 -1
- package/dist/commonjs/models/operations/post-auth-realms-go-protocol-openid-connect-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/post-auth-realms-go-protocol-openid-connect-token.js +3 -1
- package/dist/commonjs/models/operations/post-auth-realms-go-protocol-openid-connect-token.js.map +1 -1
- package/dist/esm/funcs/devices-add.d.ts +2 -0
- package/dist/esm/funcs/devices-add.d.ts.map +1 -1
- package/dist/esm/funcs/devices-add.js +3 -1
- package/dist/esm/funcs/devices-add.js.map +1 -1
- package/dist/esm/funcs/instances-delete.d.ts +2 -0
- package/dist/esm/funcs/instances-delete.d.ts.map +1 -1
- package/dist/esm/funcs/instances-delete.js +3 -1
- package/dist/esm/funcs/instances-delete.js.map +1 -1
- package/dist/esm/funcs/journeys-get-state.d.ts +2 -0
- package/dist/esm/funcs/journeys-get-state.d.ts.map +1 -1
- package/dist/esm/funcs/journeys-get-state.js +3 -1
- package/dist/esm/funcs/journeys-get-state.js.map +1 -1
- package/dist/esm/funcs/journeys-start.d.ts +2 -0
- package/dist/esm/funcs/journeys-start.d.ts.map +1 -1
- package/dist/esm/funcs/journeys-start.js +3 -1
- package/dist/esm/funcs/journeys-start.js.map +1 -1
- package/dist/esm/funcs/tasks-get-schema.d.ts +2 -0
- package/dist/esm/funcs/tasks-get-schema.d.ts.map +1 -1
- package/dist/esm/funcs/tasks-get-schema.js +3 -1
- package/dist/esm/funcs/tasks-get-schema.js.map +1 -1
- package/dist/esm/funcs/tasks-list-schema.d.ts +2 -0
- package/dist/esm/funcs/tasks-list-schema.d.ts.map +1 -1
- package/dist/esm/funcs/tasks-list-schema.js +3 -1
- package/dist/esm/funcs/tasks-list-schema.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +20 -5
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -1
- package/dist/esm/lib/files.js +18 -0
- package/dist/esm/lib/files.js.map +1 -1
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +0 -1
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +8 -4
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.d.ts +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +20 -10
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/url.d.ts.map +1 -1
- package/dist/esm/lib/url.js +4 -2
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/operations/post-auth-realms-go-protocol-openid-connect-token.d.ts +1 -1
- package/dist/esm/models/operations/post-auth-realms-go-protocol-openid-connect-token.d.ts.map +1 -1
- package/dist/esm/models/operations/post-auth-realms-go-protocol-openid-connect-token.js +3 -1
- package/dist/esm/models/operations/post-auth-realms-go-protocol-openid-connect-token.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/devices-add.ts +3 -1
- package/src/funcs/instances-delete.ts +3 -1
- package/src/funcs/journeys-get-state.ts +3 -1
- package/src/funcs/journeys-start.ts +3 -1
- package/src/funcs/tasks-get-schema.ts +3 -1
- package/src/funcs/tasks-list-schema.ts +3 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +23 -4
- package/src/lib/files.ts +22 -0
- package/src/lib/matchers.ts +3 -2
- package/src/lib/sdks.ts +7 -5
- package/src/lib/security.ts +15 -4
- package/src/lib/url.ts +16 -14
- package/src/models/operations/post-auth-realms-go-protocol-openid-connect-token.ts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/lib/url.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;AAE9D,wBAAgB,UAAU,CACxB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;CAAE,GAC9C,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/lib/url.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;AAE9D,wBAAgB,UAAU,CACxB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;CAAE,GAC9C,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAuB7B"}
|
package/dist/esm/lib/url.js
CHANGED
|
@@ -5,7 +5,8 @@ const hasOwn = Object.prototype.hasOwnProperty;
|
|
|
5
5
|
export function pathToFunc(pathPattern, options) {
|
|
6
6
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
7
7
|
return function buildURLPath(params = {}) {
|
|
8
|
-
return pathPattern
|
|
8
|
+
return pathPattern
|
|
9
|
+
.replace(paramRE, function (_, placeholder) {
|
|
9
10
|
if (!hasOwn.call(params, placeholder)) {
|
|
10
11
|
throw new Error(`Parameter '${placeholder}' is required`);
|
|
11
12
|
}
|
|
@@ -16,7 +17,8 @@ export function pathToFunc(pathPattern, options) {
|
|
|
16
17
|
return options?.charEncoding === "percent"
|
|
17
18
|
? encodeURIComponent(`${value}`)
|
|
18
19
|
: `${value}`;
|
|
19
|
-
})
|
|
20
|
+
})
|
|
21
|
+
.replace(/^\/+/, "");
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=url.js.map
|
package/dist/esm/lib/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/lib/url.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAI/C,MAAM,UAAU,UAAU,CACxB,WAAmB,EACnB,OAA+C;IAE/C,MAAM,OAAO,GAAG,oCAAoC,CAAC;IAErD,OAAO,SAAS,YAAY,CAAC,SAAkC,EAAE;QAC/D,OAAO,WAAW,
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/lib/url.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAI/C,MAAM,UAAU,UAAU,CACxB,WAAmB,EACnB,OAA+C;IAE/C,MAAM,OAAO,GAAG,oCAAoC,CAAC;IAErD,OAAO,SAAS,YAAY,CAAC,SAAkC,EAAE;QAC/D,OAAO,WAAW;aACf,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,WAAW;YACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC;gBACtC,MAAM,IAAI,KAAK,CAAC,cAAc,WAAW,eAAe,CAAC,CAAC;YAC5D,CAAC;YAED,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;YAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC3D,MAAM,IAAI,KAAK,CACb,cAAc,WAAW,8BAA8B,CACxD,CAAC;YACJ,CAAC;YAED,OAAO,OAAO,EAAE,YAAY,KAAK,SAAS;gBACxC,CAAC,CAAC,kBAAkB,CAAC,GAAG,KAAK,EAAE,CAAC;gBAChC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC;aACD,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4-mini";
|
|
|
2
2
|
import { ClosedEnum } from "../../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
5
|
-
export declare const PostAuthRealmsGoProtocolOpenidConnectTokenServerList: readonly ["https://
|
|
5
|
+
export declare const PostAuthRealmsGoProtocolOpenidConnectTokenServerList: readonly ["https://eu.platform.go.gbgplc.com", "https://us.platform.go.gbgplc.com", "https://au.platform.go.gbgplc.com"];
|
|
6
6
|
/**
|
|
7
7
|
* Must always be set to 'password'.
|
|
8
8
|
*/
|
package/dist/esm/models/operations/post-auth-realms-go-protocol-openid-connect-token.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-auth-realms-go-protocol-openid-connect-token.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/post-auth-realms-go-protocol-openid-connect-token.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,eAAO,MAAM,oDAAoD,
|
|
1
|
+
{"version":3,"file":"post-auth-realms-go-protocol-openid-connect-token.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/post-auth-realms-go-protocol-openid-connect-token.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,eAAO,MAAM,oDAAoD,0HAIvD,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,SAAS;;CAEZ,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAErD,MAAM,MAAM,iDAAiD,GAAG;IAC9D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,SAAS,CAEpE,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,0DAA0D,GAAG;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gEAAgE,EAC3E,CAAC,CAAC,WAAW,CACX,0DAA0D,EAC1D,iDAAiD,CAgBlD,CAAC;AAEJ,wBAAgB,uDAAuD,CACrE,iDAAiD,EAC/C,iDAAiD,GAClD,MAAM,CAMR;AAED,gBAAgB;AAChB,eAAO,MAAM,gEAAgE,EAC3E,CAAC,CAAC,WAAW,CAAC,kDAAkD,EAAE,OAAO,CActE,CAAC;AAEN,wBAAgB,0DAA0D,CACxE,UAAU,EAAE,MAAM,GACjB,eAAe,CAChB,kDAAkD,EAClD,kBAAkB,CACnB,CASA"}
|
|
@@ -6,7 +6,9 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import * as types from "../../types/primitives.js";
|
|
8
8
|
export const PostAuthRealmsGoProtocolOpenidConnectTokenServerList = [
|
|
9
|
-
"https://
|
|
9
|
+
"https://eu.platform.go.gbgplc.com",
|
|
10
|
+
"https://us.platform.go.gbgplc.com",
|
|
11
|
+
"https://au.platform.go.gbgplc.com",
|
|
10
12
|
];
|
|
11
13
|
/**
|
|
12
14
|
* Must always be set to 'password'.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-auth-realms-go-protocol-openid-connect-token.js","sourceRoot":"","sources":["../../../../src/models/operations/post-auth-realms-go-protocol-openid-connect-token.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AAGnD,MAAM,CAAC,MAAM,oDAAoD,GAAG;IAClE,
|
|
1
|
+
{"version":3,"file":"post-auth-realms-go-protocol-openid-connect-token.js","sourceRoot":"","sources":["../../../../src/models/operations/post-auth-realms-go-protocol-openid-connect-token.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AAGnD,MAAM,CAAC,MAAM,oDAAoD,GAAG;IAClE,mCAAmC;IACnC,mCAAmC;IACnC,mCAAmC;CAC3B,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,QAAQ,EAAE,UAAU;CACZ,CAAC;AA+CX,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAAoC,CAAC,CAAC,IAAI,CAC7E,SAAS,CACV,CAAC;AAWF,gBAAgB;AAChB,MAAM,CAAC,MAAM,gEAAgE,GAIvE,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,wBAAwB;CACpC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;QACrB,YAAY,EAAE,eAAe;QAC7B,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEJ,MAAM,UAAU,uDAAuD,CACrE,iDACmD;IAEnD,OAAO,IAAI,CAAC,SAAS,CACnB,gEAAgE,CAAC,KAAK,CACpE,iDAAiD,CAClD,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,gEAAgE,GACE,CAAC;KAC3E,IAAI,CACH,CAAC,CAAC,MAAM,CAAC;IACP,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC5C,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC1C,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAC3C,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEN,MAAM,UAAU,0DAA0D,CACxE,UAAkB;IAKlB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,gEAAgE,CAAC,KAAK,CACpE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,gFAAgF,CACjF,CAAC;AACJ,CAAC"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gbg/go-core",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.20",
|
|
4
4
|
"author": "Speakeasy",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"tshy": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@eslint/js": "^9.26.0",
|
|
34
34
|
"eslint": "^9.26.0",
|
|
35
35
|
"globals": "^15.14.0",
|
|
36
|
-
"tshy": "^
|
|
36
|
+
"tshy": "^3.3.2",
|
|
37
37
|
"typescript": "~5.8.3",
|
|
38
38
|
"typescript-eslint": "^8.26.0"
|
|
39
39
|
},
|
package/src/funcs/devices-add.ts
CHANGED
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Create Connect Secret
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.customerAccess} from the global security.
|
|
33
35
|
*/
|
|
34
36
|
export function devicesAdd(
|
|
35
37
|
client: GoCore,
|
|
@@ -98,7 +100,7 @@ async function $do(
|
|
|
98
100
|
|
|
99
101
|
const secConfig = await extractSecurity(client._options.customerAccess);
|
|
100
102
|
const securityInput = secConfig == null ? {} : { customerAccess: secConfig };
|
|
101
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
102
104
|
|
|
103
105
|
const context = {
|
|
104
106
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Delete instance
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.customerAccess} from the global security.
|
|
33
35
|
*/
|
|
34
36
|
export function instancesDelete(
|
|
35
37
|
client: GoCore,
|
|
@@ -101,7 +103,7 @@ async function $do(
|
|
|
101
103
|
|
|
102
104
|
const secConfig = await extractSecurity(client._options.customerAccess);
|
|
103
105
|
const securityInput = secConfig == null ? {} : { customerAccess: secConfig };
|
|
104
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
105
107
|
|
|
106
108
|
const context = {
|
|
107
109
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get State Data
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.customerAccess} from the global security.
|
|
33
35
|
*/
|
|
34
36
|
export function journeysGetState(
|
|
35
37
|
client: GoCore,
|
|
@@ -101,7 +103,7 @@ async function $do(
|
|
|
101
103
|
|
|
102
104
|
const secConfig = await extractSecurity(client._options.customerAccess);
|
|
103
105
|
const securityInput = secConfig == null ? {} : { customerAccess: secConfig };
|
|
104
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
105
107
|
|
|
106
108
|
const context = {
|
|
107
109
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Start Journey
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.customerAccess} from the global security.
|
|
33
35
|
*/
|
|
34
36
|
export function journeysStart(
|
|
35
37
|
client: GoCore,
|
|
@@ -98,7 +100,7 @@ async function $do(
|
|
|
98
100
|
|
|
99
101
|
const secConfig = await extractSecurity(client._options.customerAccess);
|
|
100
102
|
const securityInput = secConfig == null ? {} : { customerAccess: secConfig };
|
|
101
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
102
104
|
|
|
103
105
|
const context = {
|
|
104
106
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get Task Schema
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.customerAccess} from the global security.
|
|
33
35
|
*/
|
|
34
36
|
export function tasksGetSchema(
|
|
35
37
|
client: GoCore,
|
|
@@ -101,7 +103,7 @@ async function $do(
|
|
|
101
103
|
|
|
102
104
|
const secConfig = await extractSecurity(client._options.customerAccess);
|
|
103
105
|
const securityInput = secConfig == null ? {} : { customerAccess: secConfig };
|
|
104
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
105
107
|
|
|
106
108
|
const context = {
|
|
107
109
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get Tasks Schema
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.customerAccess} from the global security.
|
|
33
35
|
*/
|
|
34
36
|
export function tasksListSchema(
|
|
35
37
|
client: GoCore,
|
|
@@ -101,7 +103,7 @@ async function $do(
|
|
|
101
103
|
|
|
102
104
|
const secConfig = await extractSecurity(client._options.customerAccess);
|
|
103
105
|
const securityInput = secConfig == null ? {} : { customerAccess: secConfig };
|
|
104
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
105
107
|
|
|
106
108
|
const context = {
|
|
107
109
|
options: client._options,
|
package/src/lib/config.ts
CHANGED
|
@@ -60,8 +60,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
export const SDK_METADATA = {
|
|
61
61
|
language: "typescript",
|
|
62
62
|
openapiDocVersion: "1.0.0",
|
|
63
|
-
sdkVersion: "0.0.1-alpha.
|
|
64
|
-
genVersion: "2.
|
|
63
|
+
sdkVersion: "0.0.1-alpha.20",
|
|
64
|
+
genVersion: "2.873.1",
|
|
65
65
|
userAgent:
|
|
66
|
-
"speakeasy-sdk/typescript 0.0.1-alpha.
|
|
66
|
+
"speakeasy-sdk/typescript 0.0.1-alpha.20 2.873.1 1.0.0 @gbg/go-core",
|
|
67
67
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -479,6 +479,23 @@ export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited);
|
|
|
479
479
|
export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited);
|
|
480
480
|
export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
|
|
481
481
|
|
|
482
|
+
function isBlobLike(val: unknown): val is Blob {
|
|
483
|
+
if (val instanceof Blob) {
|
|
484
|
+
return true;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
const tag = val[Symbol.toStringTag];
|
|
492
|
+
if (tag !== "Blob" && tag !== "File") {
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return "stream" in val && typeof val.stream === "function";
|
|
497
|
+
}
|
|
498
|
+
|
|
482
499
|
export function appendForm(
|
|
483
500
|
fd: FormData,
|
|
484
501
|
key: string,
|
|
@@ -487,10 +504,12 @@ export function appendForm(
|
|
|
487
504
|
): void {
|
|
488
505
|
if (value == null) {
|
|
489
506
|
return;
|
|
490
|
-
} else if (value
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
507
|
+
} else if (isBlobLike(value)) {
|
|
508
|
+
if (fileName) {
|
|
509
|
+
fd.append(key, value as Blob, fileName);
|
|
510
|
+
} else {
|
|
511
|
+
fd.append(key, value as Blob);
|
|
512
|
+
}
|
|
494
513
|
} else if (Array.isArray(value)) {
|
|
495
514
|
value.forEach((v) => {
|
|
496
515
|
appendForm(fd, key, v);
|
package/src/lib/files.ts
CHANGED
|
@@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null {
|
|
|
80
80
|
|
|
81
81
|
return mimeTypes[ext] || null;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Creates a Blob from file content with the given MIME type.
|
|
86
|
+
*
|
|
87
|
+
* Node.js Buffers are Uint8Array subclasses that may share a pooled
|
|
88
|
+
* ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing
|
|
89
|
+
* such a Buffer directly to `new Blob([buf])` can include the entire
|
|
90
|
+
* underlying pool on some runtimes, producing a Blob with extra bytes
|
|
91
|
+
* that corrupts multipart uploads.
|
|
92
|
+
*
|
|
93
|
+
* Copying into a standalone Uint8Array ensures the Blob receives only the
|
|
94
|
+
* intended bytes regardless of runtime behaviour.
|
|
95
|
+
*/
|
|
96
|
+
export function bytesToBlob(
|
|
97
|
+
content: Uint8Array<ArrayBufferLike> | ArrayBuffer | Blob | string,
|
|
98
|
+
contentType: string,
|
|
99
|
+
): Blob {
|
|
100
|
+
if (content instanceof Uint8Array) {
|
|
101
|
+
return new Blob([new Uint8Array(content)], { type: contentType });
|
|
102
|
+
}
|
|
103
|
+
return new Blob([content as BlobPart], { type: contentType });
|
|
104
|
+
}
|
package/src/lib/matchers.ts
CHANGED
|
@@ -251,8 +251,9 @@ export function match<T, E>(
|
|
|
251
251
|
raw = body;
|
|
252
252
|
break;
|
|
253
253
|
default:
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
throw new Error(
|
|
255
|
+
`Unsupported response type: ${encoding satisfies never}`,
|
|
256
|
+
);
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
if (matcher.enc === "fail") {
|
package/src/lib/sdks.ts
CHANGED
|
@@ -127,13 +127,15 @@ export class ClientSDK {
|
|
|
127
127
|
if (!base) {
|
|
128
128
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
const baseURL = new URL(base);
|
|
131
|
+
let reqURL: URL;
|
|
133
132
|
if (path) {
|
|
134
|
-
|
|
135
|
-
reqURL
|
|
133
|
+
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
134
|
+
reqURL = new URL(path, baseURL);
|
|
135
|
+
} else {
|
|
136
|
+
reqURL = baseURL;
|
|
136
137
|
}
|
|
138
|
+
reqURL.hash = "";
|
|
137
139
|
|
|
138
140
|
let finalQuery = query || "";
|
|
139
141
|
|
package/src/lib/security.ts
CHANGED
|
@@ -198,8 +198,7 @@ export function resolveSecurity(
|
|
|
198
198
|
applyBearer(state, spec);
|
|
199
199
|
break;
|
|
200
200
|
default:
|
|
201
|
-
spec satisfies never;
|
|
202
|
-
throw SecurityError.unrecognizedType(type);
|
|
201
|
+
throw SecurityError.unrecognizedType((spec satisfies never, type));
|
|
203
202
|
}
|
|
204
203
|
});
|
|
205
204
|
|
|
@@ -241,8 +240,9 @@ function applyBearer(
|
|
|
241
240
|
|
|
242
241
|
export function resolveGlobalSecurity(
|
|
243
242
|
security: Partial<models.Security> | null | undefined,
|
|
243
|
+
allowedFields?: number[],
|
|
244
244
|
): SecurityState | null {
|
|
245
|
-
|
|
245
|
+
let inputs: SecurityInput[][] = [
|
|
246
246
|
[
|
|
247
247
|
{
|
|
248
248
|
fieldName: "Authorization",
|
|
@@ -250,7 +250,18 @@ export function resolveGlobalSecurity(
|
|
|
250
250
|
value: security?.customerAccess ?? env().GO_CUSTOMER_ACCESS,
|
|
251
251
|
},
|
|
252
252
|
],
|
|
253
|
-
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
if (allowedFields) {
|
|
256
|
+
inputs = allowedFields.map((i) => {
|
|
257
|
+
if (i < 0 || i >= inputs.length) {
|
|
258
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
259
|
+
}
|
|
260
|
+
return inputs[i]!;
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return resolveSecurity(...inputs);
|
|
254
265
|
}
|
|
255
266
|
|
|
256
267
|
export async function extractSecurity<
|
package/src/lib/url.ts
CHANGED
|
@@ -13,21 +13,23 @@ export function pathToFunc(
|
|
|
13
13
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
-
return pathPattern
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return pathPattern
|
|
17
|
+
.replace(paramRE, function (_, placeholder) {
|
|
18
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
19
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const value = params[placeholder];
|
|
23
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return options?.charEncoding === "percent"
|
|
30
|
+
? encodeURIComponent(`${value}`)
|
|
31
|
+
: `${value}`;
|
|
32
|
+
})
|
|
33
|
+
.replace(/^\/+/, "");
|
|
32
34
|
};
|
|
33
35
|
}
|
|
@@ -11,7 +11,9 @@ import * as types from "../../types/primitives.js";
|
|
|
11
11
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
12
|
|
|
13
13
|
export const PostAuthRealmsGoProtocolOpenidConnectTokenServerList = [
|
|
14
|
-
"https://
|
|
14
|
+
"https://eu.platform.go.gbgplc.com",
|
|
15
|
+
"https://us.platform.go.gbgplc.com",
|
|
16
|
+
"https://au.platform.go.gbgplc.com",
|
|
15
17
|
] as const;
|
|
16
18
|
|
|
17
19
|
/**
|