@outfoxx/sunday 1.1.0-beta.9 → 2.0.0-beta.1
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 +2 -0
- package/build/date-time-types.d.ts +35 -0
- package/build/date-time-types.js +699 -0
- package/build/date-time-types.js.map +1 -0
- package/build/{esm/event-parser.d.ts → event-parser.d.ts} +1 -1
- package/build/{esm/event-parser.js → event-parser.js} +10 -12
- package/build/event-parser.js.map +1 -0
- package/build/{esm/fetch-event-source.d.ts → fetch-event-source.d.ts} +26 -18
- package/build/fetch-event-source.js +365 -0
- package/build/fetch-event-source.js.map +1 -0
- package/build/fetch-transport.d.ts +32 -0
- package/build/fetch-transport.js +311 -0
- package/build/fetch-transport.js.map +1 -0
- package/build/fetch.d.ts +9 -0
- package/build/fetch.js +140 -0
- package/build/fetch.js.map +1 -0
- package/build/{esnext/header-parameters.js → header-parameters.js} +31 -2
- package/build/header-parameters.js.map +1 -0
- package/build/index.d.ts +27 -0
- package/build/index.js +42 -0
- package/build/index.js.map +1 -0
- package/build/{main/logger.d.ts → logger.d.ts} +9 -0
- package/build/logger.js +36 -0
- package/build/logger.js.map +1 -0
- package/build/media-type-codecs/any-text-decoder.d.ts +7 -0
- package/build/{esm/media-type-codecs → media-type-codecs}/any-text-decoder.js +9 -9
- package/build/media-type-codecs/any-text-decoder.js.map +1 -0
- package/build/media-type-codecs/any-text-encoder.d.ts +6 -0
- package/build/{esm/media-type-codecs → media-type-codecs}/any-text-encoder.js +9 -5
- package/build/media-type-codecs/any-text-encoder.js.map +1 -0
- package/build/media-type-codecs/binary-decoder.d.ts +7 -0
- package/build/{esnext/media-type-codecs → media-type-codecs}/binary-decoder.js +13 -9
- package/build/media-type-codecs/binary-decoder.js.map +1 -0
- package/build/media-type-codecs/binary-encoder.d.ts +6 -0
- package/build/{esnext/media-type-codecs → media-type-codecs}/binary-encoder.js +12 -8
- package/build/media-type-codecs/binary-encoder.js.map +1 -0
- package/build/media-type-codecs/cbor-decoder.d.ts +13 -0
- package/build/media-type-codecs/cbor-decoder.js +38 -0
- package/build/media-type-codecs/cbor-decoder.js.map +1 -0
- package/build/media-type-codecs/cbor-encoder.d.ts +12 -0
- package/build/media-type-codecs/cbor-encoder.js +36 -0
- package/build/media-type-codecs/cbor-encoder.js.map +1 -0
- package/build/{esm/media-type-codecs → media-type-codecs}/cbor-tags.d.ts +2 -0
- package/build/{esnext/media-type-codecs → media-type-codecs}/cbor-tags.js +2 -0
- package/build/media-type-codecs/cbor-tags.js.map +1 -0
- package/build/media-type-codecs/default-policies.d.ts +3 -0
- package/build/media-type-codecs/default-policies.js +33 -0
- package/build/media-type-codecs/default-policies.js.map +1 -0
- package/build/media-type-codecs/json-decoder.d.ts +14 -0
- package/build/media-type-codecs/json-decoder.js +40 -0
- package/build/media-type-codecs/json-decoder.js.map +1 -0
- package/build/media-type-codecs/json-encoder.d.ts +13 -0
- package/build/media-type-codecs/json-encoder.js +43 -0
- package/build/media-type-codecs/json-encoder.js.map +1 -0
- package/build/media-type-codecs/media-type-decoder.d.ts +14 -0
- package/build/{esm/media-type-codecs → media-type-codecs}/media-type-decoder.js +1 -2
- package/build/media-type-codecs/media-type-decoder.js.map +1 -0
- package/build/{main/media-type-codecs → media-type-codecs}/media-type-decoders.d.ts +6 -8
- package/build/media-type-codecs/media-type-decoders.js +63 -0
- package/build/media-type-codecs/media-type-decoders.js.map +1 -0
- package/build/{main/media-type-codecs → media-type-codecs}/media-type-encoder.d.ts +3 -3
- package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoder.js +2 -4
- package/build/media-type-codecs/media-type-encoder.js.map +1 -0
- package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoders.d.ts +6 -8
- package/build/media-type-codecs/media-type-encoders.js +65 -0
- package/build/media-type-codecs/media-type-encoders.js.map +1 -0
- package/build/media-type-codecs/www-form-url-encoder.d.ts +31 -0
- package/build/media-type-codecs/www-form-url-encoder.js +281 -0
- package/build/media-type-codecs/www-form-url-encoder.js.map +1 -0
- package/build/{esm/media-type.js → media-type.js} +23 -23
- package/build/media-type.js.map +1 -0
- package/build/operation-response.d.ts +33 -0
- package/build/operation-response.js +140 -0
- package/build/operation-response.js.map +1 -0
- package/build/operation.d.ts +54 -0
- package/build/operation.js +87 -0
- package/build/operation.js.map +1 -0
- package/build/problem.d.ts +35 -0
- package/build/problem.js +122 -0
- package/build/problem.js.map +1 -0
- package/build/request-adapters.d.ts +23 -0
- package/build/request-adapters.js +53 -0
- package/build/request-adapters.js.map +1 -0
- package/build/schema-builtins.d.ts +21 -0
- package/build/schema-builtins.js +201 -0
- package/build/schema-builtins.js.map +1 -0
- package/build/schema-policy.d.ts +31 -0
- package/build/schema-policy.js +41 -0
- package/build/schema-policy.js.map +1 -0
- package/build/schema-runtime.d.ts +36 -0
- package/build/schema-runtime.js +77 -0
- package/build/schema-runtime.js.map +1 -0
- package/build/{esnext/sunday-error.d.ts → sunday-error.d.ts} +2 -3
- package/build/{esm/sunday-error.js → sunday-error.js} +9 -4
- package/build/sunday-error.js.map +1 -0
- package/build/transport.d.ts +39 -0
- package/build/{esnext/logger.js → transport.js} +1 -1
- package/build/transport.js.map +1 -0
- package/build/{esm/url-template.js → url-template.js} +5 -3
- package/build/url-template.js.map +1 -0
- package/build/util/async-iterables.d.ts +15 -0
- package/build/util/async-iterables.js +179 -0
- package/build/util/async-iterables.js.map +1 -0
- package/build/util/errors.js +65 -0
- package/build/util/errors.js.map +1 -0
- package/build/util/nullify.d.ts +5 -0
- package/build/util/nullify.js +37 -0
- package/build/util/nullify.js.map +1 -0
- package/build/util/numbers.d.ts +11 -0
- package/build/{esnext/util/temporal.js → util/numbers.js} +14 -4
- package/build/util/numbers.js.map +1 -0
- package/build/util/subscriptions.d.ts +16 -0
- package/build/util/subscriptions.js +78 -0
- package/build/util/subscriptions.js.map +1 -0
- package/build/{esm/util/any.js → util/unknowns.js} +2 -3
- package/build/util/unknowns.js.map +1 -0
- package/package.json +58 -58
- package/build/esm/any-type.d.ts +0 -4
- package/build/esm/any-type.js +0 -15
- package/build/esm/any-type.js.map +0 -1
- package/build/esm/class-type.d.ts +0 -2
- package/build/esm/class-type.js +0 -15
- package/build/esm/class-type.js.map +0 -1
- package/build/esm/date-time-types.d.ts +0 -2
- package/build/esm/date-time-types.js +0 -16
- package/build/esm/date-time-types.js.map +0 -1
- package/build/esm/event-parser.js.map +0 -1
- package/build/esm/fetch-event-source.js +0 -290
- package/build/esm/fetch-event-source.js.map +0 -1
- package/build/esm/fetch-request-factory.d.ts +0 -34
- package/build/esm/fetch-request-factory.js +0 -181
- package/build/esm/fetch-request-factory.js.map +0 -1
- package/build/esm/fetch.d.ts +0 -7
- package/build/esm/fetch.js +0 -90
- package/build/esm/fetch.js.map +0 -1
- package/build/esm/header-parameters.js +0 -53
- package/build/esm/header-parameters.js.map +0 -1
- package/build/esm/index.d.ts +0 -26
- package/build/esm/index.js +0 -40
- package/build/esm/index.js.map +0 -1
- package/build/esm/logger.d.ts +0 -8
- package/build/esm/logger.js +0 -15
- package/build/esm/logger.js.map +0 -1
- package/build/esm/media-type-codecs/any-text-decoder.d.ts +0 -7
- package/build/esm/media-type-codecs/any-text-decoder.js.map +0 -1
- package/build/esm/media-type-codecs/any-text-encoder.d.ts +0 -5
- package/build/esm/media-type-codecs/any-text-encoder.js.map +0 -1
- package/build/esm/media-type-codecs/binary-decoder.d.ts +0 -6
- package/build/esm/media-type-codecs/binary-decoder.js +0 -29
- package/build/esm/media-type-codecs/binary-decoder.js.map +0 -1
- package/build/esm/media-type-codecs/binary-encoder.d.ts +0 -5
- package/build/esm/media-type-codecs/binary-encoder.js +0 -26
- package/build/esm/media-type-codecs/binary-encoder.js.map +0 -1
- package/build/esm/media-type-codecs/cbor-decoder.d.ts +0 -39
- package/build/esm/media-type-codecs/cbor-decoder.js +0 -426
- package/build/esm/media-type-codecs/cbor-decoder.js.map +0 -1
- package/build/esm/media-type-codecs/cbor-encoder.d.ts +0 -43
- package/build/esm/media-type-codecs/cbor-encoder.js +0 -236
- package/build/esm/media-type-codecs/cbor-encoder.js.map +0 -1
- package/build/esm/media-type-codecs/cbor-tags.js +0 -18
- package/build/esm/media-type-codecs/cbor-tags.js.map +0 -1
- package/build/esm/media-type-codecs/json-decoder.d.ts +0 -39
- package/build/esm/media-type-codecs/json-decoder.js +0 -380
- package/build/esm/media-type-codecs/json-decoder.js.map +0 -1
- package/build/esm/media-type-codecs/json-encoder.d.ts +0 -44
- package/build/esm/media-type-codecs/json-encoder.js +0 -273
- package/build/esm/media-type-codecs/json-encoder.js.map +0 -1
- package/build/esm/media-type-codecs/media-type-decoder.d.ts +0 -11
- package/build/esm/media-type-codecs/media-type-decoder.js.map +0 -1
- package/build/esm/media-type-codecs/media-type-decoders.d.ts +0 -18
- package/build/esm/media-type-codecs/media-type-decoders.js +0 -58
- package/build/esm/media-type-codecs/media-type-decoders.js.map +0 -1
- package/build/esm/media-type-codecs/media-type-encoder.d.ts +0 -12
- package/build/esm/media-type-codecs/media-type-encoder.js +0 -24
- package/build/esm/media-type-codecs/media-type-encoder.js.map +0 -1
- package/build/esm/media-type-codecs/media-type-encoders.d.ts +0 -18
- package/build/esm/media-type-codecs/media-type-encoders.js +0 -60
- package/build/esm/media-type-codecs/media-type-encoders.js.map +0 -1
- package/build/esm/media-type-codecs/www-form-url-encoder.d.ts +0 -59
- package/build/esm/media-type-codecs/www-form-url-encoder.js +0 -192
- package/build/esm/media-type-codecs/www-form-url-encoder.js.map +0 -1
- package/build/esm/media-type.js.map +0 -1
- package/build/esm/problem.d.ts +0 -31
- package/build/esm/problem.js +0 -158
- package/build/esm/problem.js.map +0 -1
- package/build/esm/request-factory.d.ts +0 -44
- package/build/esm/request-factory.js +0 -15
- package/build/esm/request-factory.js.map +0 -1
- package/build/esm/result-response.d.ts +0 -4
- package/build/esm/result-response.js +0 -15
- package/build/esm/result-response.js.map +0 -1
- package/build/esm/sunday-error.d.ts +0 -11
- package/build/esm/sunday-error.js.map +0 -1
- package/build/esm/url-template.js.map +0 -1
- package/build/esm/util/any.js.map +0 -1
- package/build/esm/util/base64.d.ts +0 -5
- package/build/esm/util/base64.js +0 -77
- package/build/esm/util/base64.js.map +0 -1
- package/build/esm/util/error.js +0 -26
- package/build/esm/util/error.js.map +0 -1
- package/build/esm/util/hex.d.ts +0 -4
- package/build/esm/util/hex.js +0 -32
- package/build/esm/util/hex.js.map +0 -1
- package/build/esm/util/rxjs.d.ts +0 -5
- package/build/esm/util/rxjs.js +0 -31
- package/build/esm/util/rxjs.js.map +0 -1
- package/build/esm/util/stream-rxjs.d.ts +0 -2
- package/build/esm/util/stream-rxjs.js +0 -39
- package/build/esm/util/stream-rxjs.js.map +0 -1
- package/build/esm/util/temporal.d.ts +0 -2
- package/build/esm/util/temporal.js +0 -31
- package/build/esm/util/temporal.js.map +0 -1
- package/build/esnext/any-type.d.ts +0 -4
- package/build/esnext/any-type.js +0 -15
- package/build/esnext/any-type.js.map +0 -1
- package/build/esnext/class-type.d.ts +0 -2
- package/build/esnext/class-type.js +0 -15
- package/build/esnext/class-type.js.map +0 -1
- package/build/esnext/date-time-types.d.ts +0 -2
- package/build/esnext/date-time-types.js +0 -16
- package/build/esnext/date-time-types.js.map +0 -1
- package/build/esnext/event-parser.d.ts +0 -17
- package/build/esnext/event-parser.js +0 -153
- package/build/esnext/event-parser.js.map +0 -1
- package/build/esnext/fetch-event-source.d.ts +0 -58
- package/build/esnext/fetch-event-source.js +0 -290
- package/build/esnext/fetch-event-source.js.map +0 -1
- package/build/esnext/fetch-request-factory.d.ts +0 -34
- package/build/esnext/fetch-request-factory.js +0 -181
- package/build/esnext/fetch-request-factory.js.map +0 -1
- package/build/esnext/fetch.d.ts +0 -7
- package/build/esnext/fetch.js +0 -90
- package/build/esnext/fetch.js.map +0 -1
- package/build/esnext/header-parameters.d.ts +0 -3
- package/build/esnext/header-parameters.js.map +0 -1
- package/build/esnext/index.d.ts +0 -26
- package/build/esnext/index.js +0 -40
- package/build/esnext/index.js.map +0 -1
- package/build/esnext/logger.d.ts +0 -8
- package/build/esnext/logger.js.map +0 -1
- package/build/esnext/media-type-codecs/any-text-decoder.d.ts +0 -7
- package/build/esnext/media-type-codecs/any-text-decoder.js +0 -29
- package/build/esnext/media-type-codecs/any-text-decoder.js.map +0 -1
- package/build/esnext/media-type-codecs/any-text-encoder.d.ts +0 -5
- package/build/esnext/media-type-codecs/any-text-encoder.js +0 -23
- package/build/esnext/media-type-codecs/any-text-encoder.js.map +0 -1
- package/build/esnext/media-type-codecs/binary-decoder.d.ts +0 -6
- package/build/esnext/media-type-codecs/binary-decoder.js.map +0 -1
- package/build/esnext/media-type-codecs/binary-encoder.d.ts +0 -5
- package/build/esnext/media-type-codecs/binary-encoder.js.map +0 -1
- package/build/esnext/media-type-codecs/cbor-decoder.d.ts +0 -39
- package/build/esnext/media-type-codecs/cbor-decoder.js +0 -426
- package/build/esnext/media-type-codecs/cbor-decoder.js.map +0 -1
- package/build/esnext/media-type-codecs/cbor-encoder.d.ts +0 -43
- package/build/esnext/media-type-codecs/cbor-encoder.js +0 -236
- package/build/esnext/media-type-codecs/cbor-encoder.js.map +0 -1
- package/build/esnext/media-type-codecs/cbor-tags.d.ts +0 -4
- package/build/esnext/media-type-codecs/cbor-tags.js.map +0 -1
- package/build/esnext/media-type-codecs/json-decoder.d.ts +0 -39
- package/build/esnext/media-type-codecs/json-decoder.js +0 -380
- package/build/esnext/media-type-codecs/json-decoder.js.map +0 -1
- package/build/esnext/media-type-codecs/json-encoder.d.ts +0 -44
- package/build/esnext/media-type-codecs/json-encoder.js +0 -273
- package/build/esnext/media-type-codecs/json-encoder.js.map +0 -1
- package/build/esnext/media-type-codecs/media-type-decoder.d.ts +0 -11
- package/build/esnext/media-type-codecs/media-type-decoder.js +0 -19
- package/build/esnext/media-type-codecs/media-type-decoder.js.map +0 -1
- package/build/esnext/media-type-codecs/media-type-decoders.d.ts +0 -18
- package/build/esnext/media-type-codecs/media-type-decoders.js +0 -58
- package/build/esnext/media-type-codecs/media-type-decoders.js.map +0 -1
- package/build/esnext/media-type-codecs/media-type-encoder.d.ts +0 -12
- package/build/esnext/media-type-codecs/media-type-encoder.js.map +0 -1
- package/build/esnext/media-type-codecs/media-type-encoders.js +0 -60
- package/build/esnext/media-type-codecs/media-type-encoders.js.map +0 -1
- package/build/esnext/media-type-codecs/www-form-url-encoder.d.ts +0 -59
- package/build/esnext/media-type-codecs/www-form-url-encoder.js +0 -192
- package/build/esnext/media-type-codecs/www-form-url-encoder.js.map +0 -1
- package/build/esnext/media-type.d.ts +0 -94
- package/build/esnext/media-type.js +0 -305
- package/build/esnext/media-type.js.map +0 -1
- package/build/esnext/problem.d.ts +0 -31
- package/build/esnext/problem.js +0 -158
- package/build/esnext/problem.js.map +0 -1
- package/build/esnext/request-factory.d.ts +0 -44
- package/build/esnext/request-factory.js +0 -15
- package/build/esnext/request-factory.js.map +0 -1
- package/build/esnext/result-response.d.ts +0 -4
- package/build/esnext/result-response.js +0 -15
- package/build/esnext/result-response.js.map +0 -1
- package/build/esnext/sunday-error.js +0 -31
- package/build/esnext/sunday-error.js.map +0 -1
- package/build/esnext/url-template.d.ts +0 -6
- package/build/esnext/url-template.js +0 -31
- package/build/esnext/url-template.js.map +0 -1
- package/build/esnext/util/any.d.ts +0 -2
- package/build/esnext/util/any.js +0 -24
- package/build/esnext/util/any.js.map +0 -1
- package/build/esnext/util/base64.d.ts +0 -5
- package/build/esnext/util/base64.js +0 -77
- package/build/esnext/util/base64.js.map +0 -1
- package/build/esnext/util/error.d.ts +0 -2
- package/build/esnext/util/error.js +0 -26
- package/build/esnext/util/error.js.map +0 -1
- package/build/esnext/util/hex.d.ts +0 -4
- package/build/esnext/util/hex.js +0 -32
- package/build/esnext/util/hex.js.map +0 -1
- package/build/esnext/util/rxjs.d.ts +0 -5
- package/build/esnext/util/rxjs.js +0 -31
- package/build/esnext/util/rxjs.js.map +0 -1
- package/build/esnext/util/stream-rxjs.d.ts +0 -2
- package/build/esnext/util/stream-rxjs.js +0 -39
- package/build/esnext/util/stream-rxjs.js.map +0 -1
- package/build/esnext/util/temporal.d.ts +0 -2
- package/build/esnext/util/temporal.js.map +0 -1
- package/build/main/any-type.d.ts +0 -4
- package/build/main/any-type.js +0 -16
- package/build/main/any-type.js.map +0 -1
- package/build/main/class-type.d.ts +0 -2
- package/build/main/class-type.js +0 -16
- package/build/main/class-type.js.map +0 -1
- package/build/main/date-time-types.d.ts +0 -2
- package/build/main/date-time-types.js +0 -27
- package/build/main/date-time-types.js.map +0 -1
- package/build/main/event-parser.d.ts +0 -17
- package/build/main/event-parser.js +0 -157
- package/build/main/event-parser.js.map +0 -1
- package/build/main/fetch-event-source.d.ts +0 -58
- package/build/main/fetch-event-source.js +0 -294
- package/build/main/fetch-event-source.js.map +0 -1
- package/build/main/fetch-request-factory.d.ts +0 -34
- package/build/main/fetch-request-factory.js +0 -185
- package/build/main/fetch-request-factory.js.map +0 -1
- package/build/main/fetch.d.ts +0 -7
- package/build/main/fetch.js +0 -94
- package/build/main/fetch.js.map +0 -1
- package/build/main/header-parameters.d.ts +0 -3
- package/build/main/header-parameters.js +0 -56
- package/build/main/header-parameters.js.map +0 -1
- package/build/main/index.d.ts +0 -26
- package/build/main/index.js +0 -52
- package/build/main/index.js.map +0 -1
- package/build/main/logger.js +0 -16
- package/build/main/logger.js.map +0 -1
- package/build/main/media-type-codecs/any-text-decoder.d.ts +0 -7
- package/build/main/media-type-codecs/any-text-decoder.js +0 -33
- package/build/main/media-type-codecs/any-text-decoder.js.map +0 -1
- package/build/main/media-type-codecs/any-text-encoder.d.ts +0 -5
- package/build/main/media-type-codecs/any-text-encoder.js +0 -27
- package/build/main/media-type-codecs/any-text-encoder.js.map +0 -1
- package/build/main/media-type-codecs/binary-decoder.d.ts +0 -6
- package/build/main/media-type-codecs/binary-decoder.js +0 -33
- package/build/main/media-type-codecs/binary-decoder.js.map +0 -1
- package/build/main/media-type-codecs/binary-encoder.d.ts +0 -5
- package/build/main/media-type-codecs/binary-encoder.js +0 -30
- package/build/main/media-type-codecs/binary-encoder.js.map +0 -1
- package/build/main/media-type-codecs/cbor-decoder.d.ts +0 -39
- package/build/main/media-type-codecs/cbor-decoder.js +0 -430
- package/build/main/media-type-codecs/cbor-decoder.js.map +0 -1
- package/build/main/media-type-codecs/cbor-encoder.d.ts +0 -43
- package/build/main/media-type-codecs/cbor-encoder.js +0 -240
- package/build/main/media-type-codecs/cbor-encoder.js.map +0 -1
- package/build/main/media-type-codecs/cbor-tags.d.ts +0 -4
- package/build/main/media-type-codecs/cbor-tags.js +0 -21
- package/build/main/media-type-codecs/cbor-tags.js.map +0 -1
- package/build/main/media-type-codecs/json-decoder.d.ts +0 -39
- package/build/main/media-type-codecs/json-decoder.js +0 -384
- package/build/main/media-type-codecs/json-decoder.js.map +0 -1
- package/build/main/media-type-codecs/json-encoder.d.ts +0 -44
- package/build/main/media-type-codecs/json-encoder.js +0 -277
- package/build/main/media-type-codecs/json-encoder.js.map +0 -1
- package/build/main/media-type-codecs/media-type-decoder.d.ts +0 -11
- package/build/main/media-type-codecs/media-type-decoder.js +0 -23
- package/build/main/media-type-codecs/media-type-decoder.js.map +0 -1
- package/build/main/media-type-codecs/media-type-decoders.js +0 -62
- package/build/main/media-type-codecs/media-type-decoders.js.map +0 -1
- package/build/main/media-type-codecs/media-type-encoder.js +0 -29
- package/build/main/media-type-codecs/media-type-encoder.js.map +0 -1
- package/build/main/media-type-codecs/media-type-encoders.d.ts +0 -18
- package/build/main/media-type-codecs/media-type-encoders.js +0 -64
- package/build/main/media-type-codecs/media-type-encoders.js.map +0 -1
- package/build/main/media-type-codecs/www-form-url-encoder.d.ts +0 -59
- package/build/main/media-type-codecs/www-form-url-encoder.js +0 -196
- package/build/main/media-type-codecs/www-form-url-encoder.js.map +0 -1
- package/build/main/media-type.d.ts +0 -94
- package/build/main/media-type.js +0 -309
- package/build/main/media-type.js.map +0 -1
- package/build/main/problem.d.ts +0 -31
- package/build/main/problem.js +0 -161
- package/build/main/problem.js.map +0 -1
- package/build/main/request-factory.d.ts +0 -44
- package/build/main/request-factory.js +0 -16
- package/build/main/request-factory.js.map +0 -1
- package/build/main/result-response.d.ts +0 -4
- package/build/main/result-response.js +0 -16
- package/build/main/result-response.js.map +0 -1
- package/build/main/sunday-error.d.ts +0 -11
- package/build/main/sunday-error.js +0 -35
- package/build/main/sunday-error.js.map +0 -1
- package/build/main/url-template.d.ts +0 -6
- package/build/main/url-template.js +0 -35
- package/build/main/url-template.js.map +0 -1
- package/build/main/util/any.d.ts +0 -2
- package/build/main/util/any.js +0 -29
- package/build/main/util/any.js.map +0 -1
- package/build/main/util/base64.d.ts +0 -5
- package/build/main/util/base64.js +0 -80
- package/build/main/util/base64.js.map +0 -1
- package/build/main/util/error.d.ts +0 -2
- package/build/main/util/error.js +0 -31
- package/build/main/util/error.js.map +0 -1
- package/build/main/util/hex.d.ts +0 -4
- package/build/main/util/hex.js +0 -35
- package/build/main/util/hex.js.map +0 -1
- package/build/main/util/rxjs.d.ts +0 -5
- package/build/main/util/rxjs.js +0 -36
- package/build/main/util/rxjs.js.map +0 -1
- package/build/main/util/stream-rxjs.d.ts +0 -2
- package/build/main/util/stream-rxjs.js +0 -43
- package/build/main/util/stream-rxjs.js.map +0 -1
- package/build/main/util/temporal.d.ts +0 -2
- package/build/main/util/temporal.js +0 -36
- package/build/main/util/temporal.js.map +0 -1
- /package/build/{esm/header-parameters.d.ts → header-parameters.d.ts} +0 -0
- /package/build/{esm/media-type.d.ts → media-type.d.ts} +0 -0
- /package/build/{esm/url-template.d.ts → url-template.d.ts} +0 -0
- /package/build/{esm/util/error.d.ts → util/errors.d.ts} +0 -0
- /package/build/{esm/util/any.d.ts → util/unknowns.d.ts} +0 -0
package/build/main/problem.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
23
|
-
};
|
|
24
|
-
var Problem_1;
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Problem = void 0;
|
|
27
|
-
const fetch_1 = require("./fetch");
|
|
28
|
-
const jackson_js_1 = require("@outfoxx/jackson-js");
|
|
29
|
-
let Problem = Problem_1 = class Problem extends Error {
|
|
30
|
-
constructor(spec) {
|
|
31
|
-
var _a;
|
|
32
|
-
super(`${spec.status.toString()} ${spec.type} - ${spec.title}`);
|
|
33
|
-
const src = spec;
|
|
34
|
-
const json = Object.assign({}, src);
|
|
35
|
-
this.type = (_a = Problem_1.parseURL(json.type)) !== null && _a !== void 0 ? _a : new URL('about:blank');
|
|
36
|
-
delete json.type;
|
|
37
|
-
this.status = json.status;
|
|
38
|
-
delete json.status;
|
|
39
|
-
this.title = json.title;
|
|
40
|
-
delete json.title;
|
|
41
|
-
this.detail = json.detail;
|
|
42
|
-
delete json.detail;
|
|
43
|
-
this.instance = Problem_1.parseURL(json.instance);
|
|
44
|
-
delete json.instance;
|
|
45
|
-
if (Object.keys(json).length != 0) {
|
|
46
|
-
this._parameters = json;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
get parameters() {
|
|
50
|
-
return this._parameters;
|
|
51
|
-
}
|
|
52
|
-
setParameter(key, value) {
|
|
53
|
-
var _a;
|
|
54
|
-
this._parameters = (_a = this._parameters) !== null && _a !== void 0 ? _a : {};
|
|
55
|
-
this._parameters[key] = value;
|
|
56
|
-
}
|
|
57
|
-
toString() {
|
|
58
|
-
var _a, _b;
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
-
const self = this;
|
|
61
|
-
const url = self.request ? (_a = self.request) === null || _a === void 0 ? void 0 : _a.url : undefined;
|
|
62
|
-
const response = (_b = self.response) === null || _b === void 0 ? void 0 : _b.example;
|
|
63
|
-
return JSON.stringify({
|
|
64
|
-
type: this.type,
|
|
65
|
-
status: this.status,
|
|
66
|
-
title: this.title,
|
|
67
|
-
detail: this.detail,
|
|
68
|
-
instance: this.instance,
|
|
69
|
-
url,
|
|
70
|
-
response,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
static fromStatus(status, title) {
|
|
74
|
-
return new Problem_1({
|
|
75
|
-
type: 'about:blank',
|
|
76
|
-
title,
|
|
77
|
-
status,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
static async fromResponse(response) {
|
|
81
|
-
const [bodyExcerpt, body] = await fetch_1.ResponseExample.bodyExcerpt(response, 256);
|
|
82
|
-
return new Problem_1({
|
|
83
|
-
type: 'about:blank',
|
|
84
|
-
title: response.statusText,
|
|
85
|
-
status: response.status,
|
|
86
|
-
request: {
|
|
87
|
-
url: response.url,
|
|
88
|
-
},
|
|
89
|
-
response: {
|
|
90
|
-
headers: response.headers,
|
|
91
|
-
ok: response.ok,
|
|
92
|
-
redirected: response.redirected,
|
|
93
|
-
status: response.status,
|
|
94
|
-
statusText: response.statusText,
|
|
95
|
-
type: response.type,
|
|
96
|
-
url: response.url,
|
|
97
|
-
body,
|
|
98
|
-
example: fetch_1.ResponseExample.build(response, bodyExcerpt),
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
static parseURL(value) {
|
|
103
|
-
if (value == null) {
|
|
104
|
-
return undefined;
|
|
105
|
-
}
|
|
106
|
-
if (value instanceof URL) {
|
|
107
|
-
return value;
|
|
108
|
-
}
|
|
109
|
-
if (typeof value == 'string') {
|
|
110
|
-
return new URL(value);
|
|
111
|
-
}
|
|
112
|
-
return new URL(`${value}`);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
__decorate([
|
|
116
|
-
(0, jackson_js_1.JsonProperty)(),
|
|
117
|
-
(0, jackson_js_1.JsonClassType)({ type: () => [URL] }),
|
|
118
|
-
__metadata("design:type", URL)
|
|
119
|
-
], Problem.prototype, "type", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, jackson_js_1.JsonProperty)(),
|
|
122
|
-
(0, jackson_js_1.JsonClassType)({ type: () => [String] }),
|
|
123
|
-
__metadata("design:type", String)
|
|
124
|
-
], Problem.prototype, "title", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
(0, jackson_js_1.JsonProperty)(),
|
|
127
|
-
(0, jackson_js_1.JsonClassType)({ type: () => [Number] }),
|
|
128
|
-
__metadata("design:type", Number)
|
|
129
|
-
], Problem.prototype, "status", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
(0, jackson_js_1.JsonProperty)(),
|
|
132
|
-
(0, jackson_js_1.JsonClassType)({ type: () => [String] }),
|
|
133
|
-
__metadata("design:type", String)
|
|
134
|
-
], Problem.prototype, "detail", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
(0, jackson_js_1.JsonProperty)(),
|
|
137
|
-
(0, jackson_js_1.JsonClassType)({ type: () => [URL] }),
|
|
138
|
-
__metadata("design:type", URL)
|
|
139
|
-
], Problem.prototype, "instance", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
(0, jackson_js_1.JsonIgnore)(),
|
|
142
|
-
__metadata("design:type", Object)
|
|
143
|
-
], Problem.prototype, "_parameters", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
(0, jackson_js_1.JsonClassType)({ type: () => [Object] }),
|
|
146
|
-
(0, jackson_js_1.JsonAnyGetter)(),
|
|
147
|
-
__metadata("design:type", Object),
|
|
148
|
-
__metadata("design:paramtypes", [])
|
|
149
|
-
], Problem.prototype, "parameters", null);
|
|
150
|
-
__decorate([
|
|
151
|
-
(0, jackson_js_1.JsonAnySetter)(),
|
|
152
|
-
__metadata("design:type", Function),
|
|
153
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
154
|
-
__metadata("design:returntype", void 0)
|
|
155
|
-
], Problem.prototype, "setParameter", null);
|
|
156
|
-
Problem = Problem_1 = __decorate([
|
|
157
|
-
(0, jackson_js_1.JsonCreator)({ mode: jackson_js_1.JsonCreatorMode.DELEGATING }),
|
|
158
|
-
__metadata("design:paramtypes", [Object])
|
|
159
|
-
], Problem);
|
|
160
|
-
exports.Problem = Problem;
|
|
161
|
-
//# sourceMappingURL=problem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"problem.js","sourceRoot":"","sources":["../../src/problem.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;AAEjC,mCAA0C;AAC1C,oDAQ6B;AAqB7B,IAAa,OAAO,eAApB,MAAa,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;8BACnB,GAAG;yCAAC;AAGtB;IADC,IAAA,uBAAU,GAAE;;4CACiC;AAI9C;IAFC,IAAA,0BAAa,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACvC,IAAA,0BAAa,GAAE;;;yCAGf;AAGD;IADC,IAAA,0BAAa,GAAE;;;;2CAIf;AAlCU,OAAO;IADnB,IAAA,wBAAW,EAAC,EAAE,IAAI,EAAE,4BAAe,CAAC,UAAU,EAAE,CAAC;;GACrC,OAAO,CA8HnB;AA9HY,0BAAO"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { AnyType } from './any-type';
|
|
3
|
-
import { ClassType, ConstructableClassType } from './class-type';
|
|
4
|
-
import { MediaType } from './media-type';
|
|
5
|
-
import { TextMediaTypeDecoder } from './media-type-codecs/media-type-decoder';
|
|
6
|
-
import { Problem } from './problem';
|
|
7
|
-
import { ResultResponse } from './result-response';
|
|
8
|
-
import { URLTemplate } from './url-template';
|
|
9
|
-
import { Logger } from './logger';
|
|
10
|
-
export interface RequestFactory {
|
|
11
|
-
readonly baseUrl: URLTemplate;
|
|
12
|
-
registerProblem(type: URL | string, problemType: ConstructableClassType<Problem>): void;
|
|
13
|
-
request(requestSpec: RequestSpec<unknown>): Observable<Request>;
|
|
14
|
-
response(request: Request, dataExpected?: boolean): Observable<Response>;
|
|
15
|
-
response<B>(requestSpec: RequestSpec<B>, dataExpected?: boolean): Observable<Response>;
|
|
16
|
-
resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<R>]): Observable<ResultResponse<R>>;
|
|
17
|
-
resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Array<unknown>>, ClassType<R>]): Observable<ResultResponse<Array<R>>>;
|
|
18
|
-
resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Set<unknown>>, ClassType<R>]): Observable<ResultResponse<Set<R>>>;
|
|
19
|
-
resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: AnyType): Observable<ResultResponse<R>>;
|
|
20
|
-
resultResponse<B>(requestSpec: RequestSpec<B>): Observable<ResultResponse<void>>;
|
|
21
|
-
result<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<R>]): Observable<R>;
|
|
22
|
-
result<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Array<unknown>>, ClassType<R>]): Observable<Array<R>>;
|
|
23
|
-
result<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Set<unknown>>, ClassType<R>]): Observable<Set<R>>;
|
|
24
|
-
result<B, R>(requestSpec: RequestSpec<B>, resultType: AnyType): Observable<R>;
|
|
25
|
-
result<B>(requestSpec: RequestSpec<B>): Observable<void>;
|
|
26
|
-
eventSource(requestSpec: RequestSpec<void>): ExtEventSource;
|
|
27
|
-
eventStream<E>(requestSpec: RequestSpec<void>, decoder: (decoder: TextMediaTypeDecoder, event: string | undefined, id: string | undefined, data: string, logger?: Logger) => E | undefined): Observable<E>;
|
|
28
|
-
}
|
|
29
|
-
export interface ExtEventSource extends EventSource {
|
|
30
|
-
connect(): void;
|
|
31
|
-
}
|
|
32
|
-
export declare type RequestMethod = 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
33
|
-
export interface RequestSpec<B> {
|
|
34
|
-
method: RequestMethod;
|
|
35
|
-
pathTemplate: string;
|
|
36
|
-
pathParameters?: Record<string, unknown>;
|
|
37
|
-
queryParameters?: Record<string, unknown>;
|
|
38
|
-
body?: B;
|
|
39
|
-
bodyType?: AnyType;
|
|
40
|
-
contentTypes?: MediaType[];
|
|
41
|
-
acceptTypes?: MediaType[];
|
|
42
|
-
headers?: Record<string, unknown>;
|
|
43
|
-
}
|
|
44
|
-
export declare type RequestAdapter = (request: Request) => Observable<Request>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
//# sourceMappingURL=request-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-factory.js","sourceRoot":"","sources":["../../src/request-factory.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
//# sourceMappingURL=result-response.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result-response.js","sourceRoot":"","sources":["../../src/result-response.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class SundayError extends Error {
|
|
2
|
-
url: string;
|
|
3
|
-
httpVersion: string;
|
|
4
|
-
status: number;
|
|
5
|
-
statusText: string;
|
|
6
|
-
headers: Headers;
|
|
7
|
-
body: unknown | undefined;
|
|
8
|
-
responseExample: string;
|
|
9
|
-
constructor(message: string, url: string, httpVersion: string, status: number, statusText: string, headers: Headers, body: unknown | undefined, responseExample: string);
|
|
10
|
-
static fromResponse(message: string, response: Response): Promise<SundayError>;
|
|
11
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SundayError = void 0;
|
|
17
|
-
const fetch_1 = require("./fetch");
|
|
18
|
-
class SundayError extends Error {
|
|
19
|
-
constructor(message, url, httpVersion, status, statusText, headers, body, responseExample) {
|
|
20
|
-
super(message);
|
|
21
|
-
this.url = url;
|
|
22
|
-
this.httpVersion = httpVersion;
|
|
23
|
-
this.status = status;
|
|
24
|
-
this.statusText = statusText;
|
|
25
|
-
this.headers = headers;
|
|
26
|
-
this.body = body;
|
|
27
|
-
this.responseExample = responseExample;
|
|
28
|
-
}
|
|
29
|
-
static async fromResponse(message, response) {
|
|
30
|
-
const [bodyExcerpt, body] = await fetch_1.ResponseExample.bodyExcerpt(response, 256);
|
|
31
|
-
return new SundayError(message, response.url, '?.?', response.status, response.statusText, response.headers, body, fetch_1.ResponseExample.build(response, bodyExcerpt));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.SundayError = SundayError;
|
|
35
|
-
//# sourceMappingURL=sunday-error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sunday-error.js","sourceRoot":"","sources":["../../src/sunday-error.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,mCAA0C;AAE1C,MAAa,WAAY,SAAQ,KAAK;IACpC,YACE,OAAe,EACR,GAAW,EACX,WAAmB,EACnB,MAAc,EACd,UAAkB,EAClB,OAAgB,EAChB,IAAyB,EACzB,eAAuB;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QARR,QAAG,GAAH,GAAG,CAAQ;QACX,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAS;QAChB,SAAI,GAAJ,IAAI,CAAqB;QACzB,oBAAe,GAAf,eAAe,CAAQ;IAGhC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,OAAe,EACf,QAAkB;QAElB,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,MAAM,uBAAe,CAAC,WAAW,CAC3D,QAAQ,EACR,GAAG,CACJ,CAAC;QAEF,OAAO,IAAI,WAAW,CACpB,OAAO,EACP,QAAQ,CAAC,GAAG,EACZ,KAAK,EACL,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,UAAU,EACnB,QAAQ,CAAC,OAAO,EAChB,IAAI,EACJ,uBAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAC7C,CAAC;IACJ,CAAC;CACF;AAlCD,kCAkCC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.URLTemplate = void 0;
|
|
17
|
-
const uri_template_lite_1 = require("uri-template-lite");
|
|
18
|
-
class URLTemplate {
|
|
19
|
-
constructor(template, parameters = {}) {
|
|
20
|
-
this.template = template;
|
|
21
|
-
this.parameters = parameters;
|
|
22
|
-
}
|
|
23
|
-
complete(relativeTemplate, parameters) {
|
|
24
|
-
const allParameters = Object.assign({}, this.parameters, parameters);
|
|
25
|
-
const baseTempl = this.template.endsWith('/')
|
|
26
|
-
? this.template.slice(0, -1)
|
|
27
|
-
: this.template;
|
|
28
|
-
const relTempl = relativeTemplate.startsWith('/') || !relativeTemplate.length
|
|
29
|
-
? relativeTemplate
|
|
30
|
-
: `/${relativeTemplate}`;
|
|
31
|
-
return new URL(uri_template_lite_1.URI.expand(baseTempl + relTempl, allParameters));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.URLTemplate = URLTemplate;
|
|
35
|
-
//# sourceMappingURL=url-template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"url-template.js","sourceRoot":"","sources":["../../src/url-template.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,yDAAwC;AAExC,MAAa,WAAW;IACtB,YACS,QAAgB,EAChB,aAAsC,EAAE;QADxC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAA8B;IAC9C,CAAC;IAEJ,QAAQ,CAAC,gBAAwB,EAAE,UAAmC;QACpE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC3C,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5B,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QAClB,MAAM,QAAQ,GACZ,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM;YAC1D,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,IAAI,gBAAgB,EAAE,CAAC;QAE7B,OAAO,IAAI,GAAG,CAAC,uBAAG,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAClE,CAAC;CACF;AAlBD,kCAkBC"}
|
package/build/main/util/any.d.ts
DELETED
package/build/main/util/any.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.unknownSet = exports.unknownGet = void 0;
|
|
17
|
-
function unknownGet(obj, key) {
|
|
18
|
-
var _a;
|
|
19
|
-
return (_a = obj) === null || _a === void 0 ? void 0 : _a[key];
|
|
20
|
-
}
|
|
21
|
-
exports.unknownGet = unknownGet;
|
|
22
|
-
function unknownSet(obj, key, value) {
|
|
23
|
-
if (obj == null) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
obj[key] = value;
|
|
27
|
-
}
|
|
28
|
-
exports.unknownSet = unknownSet;
|
|
29
|
-
//# sourceMappingURL=any.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"any.js","sourceRoot":"","sources":["../../../src/util/any.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,SAAgB,UAAU,CAAc,GAAY,EAAE,GAAW;;IAC/D,OAAO,MAAC,GAA+B,0CAAG,GAAG,CAAM,CAAC;AACtD,CAAC;AAFD,gCAEC;AAED,SAAgB,UAAU,CAAI,GAAY,EAAE,GAAW,EAAE,KAAQ;IAC/D,IAAI,GAAG,IAAI,IAAI,EAAE;QACf,OAAO;KACR;IACA,GAA+B,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChD,CAAC;AALD,gCAKC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.Base64 = void 0;
|
|
17
|
-
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
18
|
-
/* tslint:disable:no-bitwise */
|
|
19
|
-
// Use a lookup table to find the index.
|
|
20
|
-
const lookup = new Uint8Array(256);
|
|
21
|
-
for (let i = 0; i < chars.length; i++) {
|
|
22
|
-
lookup[chars.charCodeAt(i)] = i;
|
|
23
|
-
}
|
|
24
|
-
var Base64;
|
|
25
|
-
(function (Base64) {
|
|
26
|
-
function encode(buffer) {
|
|
27
|
-
return encodeSlice(buffer, 0, buffer.byteLength);
|
|
28
|
-
}
|
|
29
|
-
Base64.encode = encode;
|
|
30
|
-
function encodeSlice(buffer, offset, length) {
|
|
31
|
-
const bytes = new Uint8Array(buffer, offset, length);
|
|
32
|
-
const len = bytes.length;
|
|
33
|
-
let base64 = '';
|
|
34
|
-
for (let i = 0; i < len; i += 3) {
|
|
35
|
-
base64 += chars[bytes[i] >> 2];
|
|
36
|
-
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
|
|
37
|
-
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
|
|
38
|
-
base64 += chars[bytes[i + 2] & 63];
|
|
39
|
-
}
|
|
40
|
-
if (len % 3 === 2) {
|
|
41
|
-
base64 = base64.substring(0, base64.length - 1) + '=';
|
|
42
|
-
}
|
|
43
|
-
else if (len % 3 === 1) {
|
|
44
|
-
base64 = base64.substring(0, base64.length - 2) + '==';
|
|
45
|
-
}
|
|
46
|
-
return base64;
|
|
47
|
-
}
|
|
48
|
-
Base64.encodeSlice = encodeSlice;
|
|
49
|
-
function decode(base64) {
|
|
50
|
-
base64 = base64.replace(/[ \n]+/g, '');
|
|
51
|
-
const length = base64.length;
|
|
52
|
-
let bufferLength = Math.floor(length * 0.75);
|
|
53
|
-
let i;
|
|
54
|
-
let p = 0;
|
|
55
|
-
let encoded1;
|
|
56
|
-
let encoded2;
|
|
57
|
-
let encoded3;
|
|
58
|
-
let encoded4;
|
|
59
|
-
if (base64[length - 1] === '=') {
|
|
60
|
-
bufferLength--;
|
|
61
|
-
if (base64[length - 2] === '=') {
|
|
62
|
-
bufferLength--;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const arrayBuffer = new ArrayBuffer(bufferLength);
|
|
66
|
-
const bytes = new Uint8Array(arrayBuffer);
|
|
67
|
-
for (i = 0; i < length; i += 4) {
|
|
68
|
-
encoded1 = lookup[base64.charCodeAt(i)];
|
|
69
|
-
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
|
70
|
-
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
|
71
|
-
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
|
72
|
-
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
|
|
73
|
-
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
|
74
|
-
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
|
|
75
|
-
}
|
|
76
|
-
return arrayBuffer;
|
|
77
|
-
}
|
|
78
|
-
Base64.decode = decode;
|
|
79
|
-
})(Base64 = exports.Base64 || (exports.Base64 = {}));
|
|
80
|
-
//# sourceMappingURL=base64.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../src/util/base64.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,MAAM,KAAK,GACT,kEAAkE,CAAC;AAErE,+BAA+B;AAE/B,wCAAwC;AACxC,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACjC;AAED,IAAiB,MAAM,CAiEtB;AAjED,WAAiB,MAAM;IACrB,SAAgB,MAAM,CAAC,MAAuB;QAC5C,OAAO,WAAW,CAAC,MAAM,EAAE,C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CAAC,CAAC;YAE5C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;YAC/C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;YACtD,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;SACtD;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAlCe,aAAM,SAkCrB,CAAA;AACH,CAAC,EAjEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAiEtB"}
|
package/build/main/util/error.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.errorToMessage = exports.isError = void 0;
|
|
17
|
-
function isError(value) {
|
|
18
|
-
return value instanceof Error;
|
|
19
|
-
}
|
|
20
|
-
exports.isError = isError;
|
|
21
|
-
function errorToMessage(value, defMsg) {
|
|
22
|
-
return isError(value) ? value.message : defMsg !== null && defMsg !== void 0 ? defMsg : `${fmtMsg(value)}`;
|
|
23
|
-
}
|
|
24
|
-
exports.errorToMessage = errorToMessage;
|
|
25
|
-
function fmtMsg(value) {
|
|
26
|
-
if (value instanceof Object) {
|
|
27
|
-
return JSON.stringify(value);
|
|
28
|
-
}
|
|
29
|
-
return `${value}`;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/util/error.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,SAAgB,OAAO,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,KAAK,CAAC;AAChC,CAAC;AAFD,0BAEC;AAED,SAAgB,cAAc,CAAC,KAAc,EAAE,MAAe;IAC5D,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACvE,CAAC;AAFD,wCAEC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,KAAK,YAAY,MAAM,EAAE;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAC9B;IACD,OAAO,GAAG,KAAK,EAAE,CAAC;AACpB,CAAC"}
|
package/build/main/util/hex.d.ts
DELETED
package/build/main/util/hex.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.Hex = void 0;
|
|
17
|
-
var Hex;
|
|
18
|
-
(function (Hex) {
|
|
19
|
-
function decode(hex) {
|
|
20
|
-
hex = hex.replace(/^0x/, '').replace(/\s/g, '');
|
|
21
|
-
const values = hex.match(/[\da-f]{2}/gi);
|
|
22
|
-
if (!values || values.length != hex.length / 2) {
|
|
23
|
-
throw Error(`Invalid hex string`);
|
|
24
|
-
}
|
|
25
|
-
return new Uint8Array(values.map((b) => parseInt(b, 16))).buffer;
|
|
26
|
-
}
|
|
27
|
-
Hex.decode = decode;
|
|
28
|
-
function encode(buffer, separator = '') {
|
|
29
|
-
return Array.from(new Uint8Array(buffer))
|
|
30
|
-
.map((value) => value.toString(16).padStart(2, '0'))
|
|
31
|
-
.join(separator);
|
|
32
|
-
}
|
|
33
|
-
Hex.encode = encode;
|
|
34
|
-
})(Hex = exports.Hex || (exports.Hex = {}));
|
|
35
|
-
//# sourceMappingURL=hex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hex.js","sourceRoot":"","sources":["../../../src/util/hex.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,IAAiB,GAAG,CAenB;AAfD,WAAiB,GAAG;IAClB,SAAgB,MAAM,CAAC,GAAW;QAChC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;SACnC;QACD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,CAAC;IAPe,UAAM,SAOrB,CAAA;IAED,SAAgB,MAAM,CAAC,MAAmB,EAAE,SAAS,GAAG,EAAE;QACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;aACtC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;aACnD,IAAI,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;IAJe,UAAM,SAIrB,CAAA;AACH,CAAC,EAfgB,GAAG,GAAH,WAAG,KAAH,WAAG,QAenB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ClassType } from '../class-type';
|
|
3
|
-
import { Problem } from '../problem';
|
|
4
|
-
export declare function nullifyNotFound<T>(): (source: Observable<T>) => Observable<T | null>;
|
|
5
|
-
export declare function nullifyResponse<T>(statuses: number[], problemTypes: ClassType<Problem>[]): (source: Observable<T>) => Observable<T | null>;
|
package/build/main/util/rxjs.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Outfox, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.nullifyResponse = exports.nullifyNotFound = void 0;
|
|
17
|
-
const rxjs_1 = require("rxjs");
|
|
18
|
-
const problem_1 = require("../problem");
|
|
19
|
-
function nullifyNotFound() {
|
|
20
|
-
return nullifyResponse([404], []);
|
|
21
|
-
}
|
|
22
|
-
exports.nullifyNotFound = nullifyNotFound;
|
|
23
|
-
function nullifyResponse(statuses, problemTypes) {
|
|
24
|
-
return function (source) {
|
|
25
|
-
return source.pipe((0, rxjs_1.catchError)((error) => {
|
|
26
|
-
const errorType = error.constructor;
|
|
27
|
-
if (error instanceof problem_1.Problem &&
|
|
28
|
-
(statuses.includes(error.status) || problemTypes.includes(errorType))) {
|
|
29
|
-
return (0, rxjs_1.from)([null]);
|
|
30
|
-
}
|
|
31
|
-
return (0, rxjs_1.throwError)(() => error);
|
|
32
|
-
}));
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
exports.nullifyResponse = nullifyResponse;
|
|
36
|
-
//# sourceMappingURL=rxjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rxjs.js","sourceRoot":"","sources":["../../../src/util/rxjs.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,+BAAgE;AAEhE,wCAAqC;AAErC,SAAgB,eAAe;IAG7B,OAAO,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAJD,0CAIC;AAED,SAAgB,eAAe,CAC7B,QAAkB,EAClB,YAAkC;IAElC,OAAO,UAAa,MAAqB;QACvC,OAAO,MAAM,CAAC,IAAI,CAChB,IAAA,iBAAU,EAAC,CAAC,KAAK,EAAE,EAAE;YACnB,MAAM,SAAS,GAAG,KAAK,CAAC,WAAiC,CAAC;YAC1D,IACE,KAAK,YAAY,iBAAO;gBACxB,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EACrE;gBACA,OAAO,IAAA,WAAI,EAAC,CAAC,IAAI,CAAC,CAAC,CAAC;aACrB;YACD,OAAO,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAlBD,0CAkBC"}
|